This shows you the differences between two versions of the page.
manual:sdcard_demo [2014/07/24 17:14] voorburg created |
manual:sdcard_demo [2019/09/24 22:03] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Firmware updates from SD-card ====== | ||
- | |||
- | ===== Bootloader configuration ===== | ||
- | In order to perform firmware updates with the OpenBLT from SD-card, double-check that the file system configured in "blt_conf.h". The following macro should have a value of 1. If this macro did not yet have a value of 1, the bootloader should be rebuild after making the change. | ||
- | <code> | ||
- | #define BOOT_FILE_SYS_ENABLE (1) | ||
- | </code> | ||
- | |||
- | |||
- | ===== SD-card preparation and update procedure ===== | ||
- | The demo bootloaders that support firmware updates from SD-card are configured to look for a S-record firmware filename with a predetermined name in the root directory on the SD-card. The filename is configured as a constant character array **firmwareFilename[]** in hooks.c. Here is the example for the STM32-E407 demo: | ||
- | <code> | ||
- | static const blt_char firmwareFilename[] = "/demoprog_olimex_stm32e407.srec"; | ||
- | </code> | ||
- | |||
- | To prepare the SD-card, perform the following steps: | ||
- | - Insert the SD-card into your PC and store the firmware file (as specified by **firmwareFilename[]**) in its root directory. For the demo programs, you can find this file in the ".\**Prog**\bin\" directory. | ||
- | - Insert the SD-card into the card holder on the microcontroller board. | ||
- | - Reset the microcontroller to start the firmware update. Once done, the newly programmed firmware is automatically started. | ||
- | |||
- | Note that the bootloader demo is configured to output log messages to a serial terminal. This enables you to view the progress of the firmware update with a terminal program such as Putty. The communication speed is typically 57600 bits/sec. Additionally, the log messages are written to a file called **bootlog.txt** on the SD-card, which can optionally be checked for verification purposes. | ||
- | |||
- | {{:manual:demos:sdcard_firmware_update_logging.gif?|}} | ||
- | |||