I have a strange issue, that on a bootloading project of mine worked if compiled with ARM Compiler 6.12 but did not if compiled with 6.13.1.
The function of the firmware is very simple: when it boots, it checks a (volatile) memory location for new FW, if found, it compute the CRC of its content and compares against the written CRC. If they match, it writes the FW into non-volatile location and sets MSP to where the main FW starts.
The boot loader FW could run, but it somehow altered a piece of memory which was not touched by the image compiled with 6.12, even though I have specifically marked that area as EMPTY in the scatter file, and the pointer used to read that memory is a CONST pointer. I have made sure that the memory wasn't altered by the main FW.
I have read the release notes of 6.13, nothing seems to fit my problem.
I have tried to compare the listing of disassembled files from the two AXF, but was overwhelmed by the number of difference. Is there any quick way by which I can spot the difference?
Thanks in advance.
Hello Seng Tak Goh,
The most common way to debug such an issue is to set a debug watchpoint on that address, so that the code will stop whenever a write (SToRe) occurs at that address.
Which debug tools are you using? If Arm DS or MDK, I can help you with this.
Thanks for your reply.
I am using MDK.
I tried as per your suggestion to set write access breakpoint but it was not easy for me, as the instructions of the bootloading program are loaded into SRAM for execution, so I can't define the breakpoints when the main firmware is running. The uVision tool prevented me from setting any breakpoints for the bootloading firmware whether via breakpoint window nor the command window.
Please advise how to get around this.
I have discovered a clue, that the Data Setup Time parameter of my FSMC peripheral (on STM32F407 MCU, interfacing with an asynchronous SRAM, where new firmware image is stored) was at the edge. And this did not impose an issue if compiled with 6.12.
So if I maintain the parameter at the edge and compile with 6.12 I have no issue.
If compiled to 6.13 with that parameter with a margin I won't have a problem.
I think 6.13.1 has brought some change in terms of the performance thus working at the edge does matter now.
Hi Seng Tak,
Sorry for slow reply, I have been out of the office for a few days.
From the above, do I understand that you now have things working - do you need any further information from me?
View all questions in Arm Compilers forum