Hi Sir:
The MCU will occurred the MemManage fault after executed a specific program(on web page OTA function during erase flash), this issue wase not happens on the EVM board,below show as register status after fault occurred:
SDK version:
FreeRTOS version: V10.3.0
May I have your recommend for the next step?
Best Regards
Edward
Solved! Go to Solution.
Hi Omar:
We found this issue is related to heap and stack region settings in lwip_httpscli_ota_enet example code. By default, both heap and stack are put into Default region, which is SRAM_DTC in this example project. It has no problem with smaller image size, but if firmware image is larger than specific size (ex: 1MB), it will cause system crash during flash programming. By setting heap to SRAM_DTC, and setting stack to SRAM_ITC (and enlarged heap to 200K+), this code is able to run normally without issue.
I think this should be a configuration issue with default project settings, maybe it is necessary to report to IDE team or SDK team to modify this configuration in the future release.
Thank you.
Hi Omar:
We found this issue is related to heap and stack region settings in lwip_httpscli_ota_enet example code. By default, both heap and stack are put into Default region, which is SRAM_DTC in this example project. It has no problem with smaller image size, but if firmware image is larger than specific size (ex: 1MB), it will cause system crash during flash programming. By setting heap to SRAM_DTC, and setting stack to SRAM_ITC (and enlarged heap to 200K+), this code is able to run normally without issue.
I think this should be a configuration issue with default project settings, maybe it is necessary to report to IDE team or SDK team to modify this configuration in the future release.
Thank you.
Hello
I hope you are well.
The issue you are having is because the processor attempted a load or store at a location that does not permit the operation. Could you please share with me the memory configuration? At the moment of crash, to what direction are you trying to access?
Additionally, Add the following to the FreeRTOSConfig.h
#define configTASK_RETURN_ADDRESS 0
Best regards,
Omar
Hi Omar:
Thanks for your kindly reply, please see my answer below.
Could you please share with me the memory configuration?
A: Please refer below fig for more details.
At the moment of crash, to what direction are you trying to access?
A: An crash occurred before entering the function "mflash_drv_sector_erase_internal". At the moment, input value sector_addr=0x240000.
Additionally, Add the following to the FreeRTOSConfig.h
#define configTASK_RETURN_ADDRESS 0
A: The constants define has been added on the file. please refer fig below.
Best Regards
Edward