2026-02-17 6:44 PM
Hello.. i am writing a FD-CAN handler "fdcan1". I dun understand why it appears both in the micro's RAM and Flash? Can anyone advise? see screenshot for the memory detail.
2026-02-17 7:33 PM
The initial value for non-zero global variables is stored in flash. When the program starts, they are copied to RAM. This is the expected behavior. They need to have space reserved for them in FLASH in order to store the initial value.
During program execution, the variable lives in RAM. It's location in FLASH is only accessed during program initialization.
In contrast, global variables which are zero-initialized do not take up any room in FLASH and only "live" in RAM.