Dear All,
I'm new to embedded programming and I'm now developing an application to run on a STM32F4 MCU, I'll have to access internal memory to get status or I/Os and other information by means of a HMI using a RS-232 interface to pool this information.
I would like to know the best approach to code my C application to make sure that the internal memory variable's address won't change from time to time, especially when I add new variables to the code. If this happens it will be a pain to re point the HMI to the correct memory address back again.
I though about using a big array for all the variables and then using a #define for those array offsets so I can know what's each memory address is for. Arrays are consecutive memory address so at least I know nothing is going to change in between them, but the starting address could change which could mess all of the rest of the addresses.
Best regards,
Blukrr
I'm new to embedded programming and I'm now developing an application to run on a STM32F4 MCU, I'll have to access internal memory to get status or I/Os and other information by means of a HMI using a RS-232 interface to pool this information.
I would like to know the best approach to code my C application to make sure that the internal memory variable's address won't change from time to time, especially when I add new variables to the code. If this happens it will be a pain to re point the HMI to the correct memory address back again.
I though about using a big array for all the variables and then using a #define for those array offsets so I can know what's each memory address is for. Arrays are consecutive memory address so at least I know nothing is going to change in between them, but the starting address could change which could mess all of the rest of the addresses.
Best regards,
Blukrr