STMicroelectronics / amazon-freertos-ST

ST vendor contribution to amazon freertos
9 stars 4 forks source link

Amazon freeRTOS bootloader issue! #3

Closed namhuynhece closed 7 months ago

namhuynhece commented 3 years ago

Hello,

We're developing our project using STM32H743VIT6. I think there is a bug in amazon freertos bootloader project. Most of the time device is booted ok as below log: _Bootloader version 00.09.00

[BOOT_PAL_WatchdogInit] Watchdog initialization complete. [prvBOOT_Init] Watchdog timer initialized. [prvBOOT_Init] Crypto initialized.

[prvValidateImage] Validating image at Bank : 0 [prvValidateImage] Valid magic code at: 0x08040000 [prvValidateImage] Valid image flags: 0xfc at: 0x08040000 [prvValidateImage] Hardware ID is valid. [prvValidateImage] Addresses are valid. [prvValidateImage] Crypto signature is valid.

[prvValidateImage] Validating image at Bank : 1 [prvValidateImage] No application image or magic code present at: 0x08120000 [prvBOOT_ValidateImages] Validation failed for image at 0x08120000 [BOOT_FLASH_EraseBank] Bank erased at : 0x08120000

[prvBOOT_ValidateImages] Booting image with sequence number 290 at 0x08040000

[BOOT_PALLaunchApplicationDesc] Booting image.

However some times after a power on reset the bootloader hangs forever at below regardless many times it is reset:

_Bootloader version 00.09.00

[BOOT_PAL_WatchdogInit] Watchdog initialization complete. [prvBOOT_Init] Watchdog timer initialized. [prvBOOT_Init] Crypto initialized.

[prvValidateImage] Validating image at Bank : 0 [prvValidateImage] Valid magic code at: 0x08040000 [prvValidateImage] Valid image flags: 0xfc at: 0x08040000 [prvValidateImage] Hardware ID is valid. [prvValidateImage] Addresses are valid. [prvValidateImage] Crypto signature is valid._

Note that our application doesn't touch Flash memory for storing anything. This is very critical issue as device would fail to boot upon a reset.

Thanks, NH

benutz commented 1 year ago

Hi @namhuynhece,

were you ever able to fix this issue? I'm running into the same problem.

Thanks

benutz commented 1 year ago

Fixed the issue. The bootloader ran into a Hardfault, probably because I was using the wrong FLASH_VOLTAGE_RANGE when deleting flash contents via HAL_FLASHEx_Erase.

ALABSTM commented 7 months ago

Hi @namhuynhece,

Please excuse this late reply. As indicated in the README.md file, issues should be reported to the support channels indicated below.

https://github.com/STMicroelectronics/amazon-freertos-ST/blob/a1833c167e30379a4c7b03c5e6de4711c26ef731/README.md?plain=1#L7

Please allow me to close this issue. Thank you for your comprehension.

With regards,