Skip to main content
Pedram
Associate III
February 11, 2018
Question

Define the variable at the specified address in the IAR

  • February 11, 2018
  • 3 replies
  • 1494 views
Posted on February 11, 2018 at 09:12

Hello friends

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

Thanks

    This topic has been closed for replies.

    3 replies

    David SIORPAES
    ST Employee
    February 11, 2018
    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;
    Pedram
    PedramAuthor
    Associate III
    February 11, 2018
    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
    PedramAuthor
    Associate III
    February 11, 2018
    Posted on February 11, 2018 at 11:31

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

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

    up