2023-12-06 07:59 AM
Was working on an EVAL board stm32G474RE which has FLASH of 512K and RAM of 128K. Everything was working fine on the EVAL board. Now we received the actual hardware which is a stm32g474CBU. Very similar to the EVAL board but the FLASH 128K and RAM of 128K.
Very few changes were required for the new micro like the linker file. But started noticing a strange behavior where some of the global variables that were initialized in the code, did not have their values. As in the moment the program is downloaded and I hit the breakpoint in the main function, the values for the global variables are not there and just 0xFFs.
It appears that the values of the global variables were not even copied from the flash to the .data section of the memory.
text data bss dec hex
59416 11528 26768 97712 17db0
Any ideas. As I mentioned before, the code works perfectly on the EVAL board which has pretty much the same micro.
Solved! Go to Solution.
2023-12-12 04:37 PM
You were right