cancel
Showing results for 
Search instead for 
Did you mean: 

Define the variable at the specified address in the IAR

Pedram
Associate III
Posted on February 11, 2018 at 09:12

Hello friends

how can Define the const variable at the specified address in the IAR

Thanks

4 REPLIES 4
David SIORPAES
ST Employee
Posted on February 11, 2018 at 09:45

You can use the 'location' pragma as in this example:

#pragma location=0x08004000

const uint32_t x=1;
Posted on February 11, 2018 at 10:10

 ,

 ,

Thanks , ,Does the following code properly occupy Sectors 2 and 3? , STM32F407ZE

♯ pragma location=0x08008000

 ,

const uint32_t fake[32768],
Pedram
Associate III
Posted on February 11, 2018 at 11:31

I want to define  a big variable on Sectors 2 and 3

Pedram
Associate III
Posted on February 12, 2018 at 08:25

up