Do all the below steps with battery INSERTED in Bell device. In case of any problems, you can hard-reset Bell by pulling out the battery.
Use D1_eMMC_FlashLoader to burn MCU fuses on Bell device and perform eMMC low-level partitioning:
Ozone
- Run Ozone.
- Open FLDebug.jdebug from [D1_eMMC_FlashLoader].
- Power up the device by connecting the USB-C cable
- Run the program.
- USB MSC host should be available.
MCUXpresso Integrated Development Environment
- Download and install MCUXpresso Integrated Development Environment (IDE) from www.nxp.com
- Download, configure and install MCUXpresso Software Development Kit (SDK) from www.nxp.com (choose proper CPU model)
- Create a new project for [D1_eMMC_FlashLoader] in MCUXpresso
- Configure to debug with J-Link
- Power up the device by connecting the USB-C cable
In case of flashing the device for the first time, you need to format the storage to FAT32 in order for the desktop OS to detect it. On Linux, using GParted:
- Select correct USB MSC device from a device pull-up menu
- Choose Device > Create Partition Table... and create a MS-DOS partition table
- Add a partition and format it to FAT32
- Apply changes and restart device
On macOS, using Disk Utility:
- Choose View > Show All Devices
- In the sidebar, select the disk you want to format.
- Click the Erase button in the toolbar.
- In the Erase dialog, click the Scheme pop-up menu, then choose Master Boot Record partition scheme.
- Click the Format pop-up menu, then choose MS-DOS (FAT)
- (Optionally) Enter a name for the volume.
- Click Erase, then click Done.
When reconnected to PC, USB MSC should be presented to the host.
Use the master-bell
branch from ecoboot to build ecoboot.bin
. Instructions are provided in the repository's README.md.
You can flash bootloader in two ways:
-
Copy it to the Bell filesystem while
D1_eMMC_FlashLoader
is running and unmount the device properly. Wait a few seconds before stoppingD1_eMMC_FlashLoader
and rebooting the device. -
Run
ecoboot.bin
with J-Link using tools provided on themaster-bell
branch of ecoboot repository. Copyecoboot.bin
to the mounted USB MSC device (to its root folder). Unmount USB MSC device and wait a few seconds before rebooting.
Note: If running on P1 Bell prototype, both switches, placed next to JTAG connector, have to be in the OFF position to run bootloader from board after flashing.
Do below steps using MuditaOS
Use lsblk
to check Bell device letter (e.g. /dev/sda
)
To configure Bell image, use:
./configure.sh bell rt1051 RelWithDebInfo -DWITH_BOARD_REVISION=6
To build Bell image use standard build command, either 'make' or 'ninja'.
You can do it in two ways:
- Use
sudo dd if=./BellHybrid.img of=/dev/sdX conv=sparse status=progress
to copy Bell image to Bell device. BellHybrid.img
is being build with BellHybrid-disk-img target.
- Use
sudo ./pureflash BellHybrid.img /dev/sdX
Pureflash tool is placed in build directory. It will download previously built image into /dev/sdX device and verify its contents.
You can run properly build BellHybrid image using J-Link and provided tools. To do that use the script from the root project directory:
- ./StartJLinkServer.sh T6
- ./run.sh --product BellHybrid build-bell-rt1051-(buildtype)