MAX78000 and MAX78002 have a built-in, permanent bootloader that allows low level communication with a host.
This bootloader can be used to load firmware through a simple serial interface either by another System-On-Chip (SOC) or a PC. This feature can be very useful for over-the-air (OTA) updates. Refer to the MAX78000 User Guide for a complete list of commands and detailed descriptions of the internal bootloader.
Access to the following pins is necessary in order to use the internal bootloader:
P0.29
P0.0
RSTIN
The following steps explain the process on the EVKITs:
-
Turn on the board and make sure the
USB -> serial
is functional by opening a serial terminal window on the virtual comport. -
Turn off the board and make sure the SWD cable is disconnected from the board.
-
Turn on the board and connect
P0.29
andP0.0
toGND
. -
Press the reset button on the board and release it. You should see a prompt (
ULDR>
) from the bootloader on the serial port. Disconnect bothP0.29
andP0.0
fromGND
. -
At this stage you may want to test communication by typing "i" in the terminal followed by Enter. The part should respond by sending its unique serial number (USN) as shown below.
-
The internal bootloader only accepts files in
.srec
format, but MaximSDK does not generate this format by default; SREC has to be explicitly enabled.-
For Eclipse users: Right-click on the project and select properties. Under the C/C++ build option, un-click the box shown and type
make release
. Hit Apply and rebuild your project.Make sure that the
.srec
file is built by looking at the Eclipse output. -
For Command-line users: Simply add
release
to the command line.$ make release ...
-
-
You need to know the size of your code in order to know how many flash pages you have to erase. In the case of the example below there are two pages.
-
Once the pages are erased, type "l" for load and the bootloader prompts you for the SREC file.
-
You may drag and drop the SREC file if your terminal application allows it, and it should start loading the code:
-
When finished, type "q" to exit the bootloader. The new code should execute immediately.