cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, How can we share a variable between boot loader and firmware ?

SAnan
Associate

I am using STM32F030C6 micro controller. 

In my firmware, I need to keep a variable in RAM location 0x2000000. This variable is accessed by both boot loader and firmware. So a reset should not affect its value. 

So how can we declare such a variable ? I have tried “static volatile uint32_t Boot_Share __attribute__( ( section( "NoInit")) );�?

‘Boot_Share ’ is the variable. Please help me in this

1 REPLY 1
SAnan
Associate

Hey Guys,

I have done this...

I kept the Boot_Share variable in RAM's starting location (0x20000000). And in configuration settings, RAM's Starting address changed to 0x20000004. So the variable stored in 0x20000000 will not be affected by reset.

Thank you