Skip to main content
SAnan
Associate
April 10, 2019
Question

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

  • April 10, 2019
  • 1 reply
  • 591 views

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

This topic has been closed for replies.

1 reply

SAnan
SAnanAuthor
Associate
October 23, 2019

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