AnsweredAssumed Answered flashiap(driver_example) operate failed

Question asked by Zhihong Li on Dec 30, 2019
Latest reply on Jan 18, 2020 by Quincy Wang

flashiap(driver_example) in sdk 2.7.0 of lpc55s69 is operating in hardfault

reason: runCmdFuncOption was declare in struct struct BootloaderTree. when iap function(such as: FLASH_Erase) was called, BOOTLOADER_API_TREE_POINTER, where is mapped in rom address, was wrote. Then, it results in hardfault.


It is recommanded that it was re written as below.

typedef struct BootloaderTree
void (*runBootloader)(void *arg); /*!< Function to start the bootloader executing. */
standard_version_t bootloader_version; /*!< Bootloader version number. */
const char *copyright; /*!< Copyright string. */
const uint32_t *reserved; /*!< Do NOT use. */
flash_driver_interface_t flashDriver;

function_command_option_t runCmdFuncOption;

} bootloader_tree_t;
function_command_option_t runCmdFuncOption;



POST: the last 8k flash is recommanded never iap. At lease, I have never operated succeed.