Skip to main content
RZHU.1
Associate III
October 1, 2020
Solved

What should I do if I want to identify an array to the address of 0x24000000? My IDE is STM32CubeIDE.

  • October 1, 2020
  • 2 replies
  • 833 views

..

    This topic has been closed for replies.
    Best answer by TDK

    The easiest would be to just use a pointer that points to that address.

    You could also define a separate section in the linker file and assign the array to that section.

    uint32_t * array = (uint32_t *) 0x24000000;
     
    array[0] = 1;
    array[1] = 67;
    // etc...

    2 replies

    RZHU.1
    RZHU.1Author
    Associate III
    October 1, 2020

    Sorry, I mean "define", not identify. My English is too bad...

    TDK
    TDKBest answer
    October 1, 2020

    The easiest would be to just use a pointer that points to that address.

    You could also define a separate section in the linker file and assign the array to that section.

    uint32_t * array = (uint32_t *) 0x24000000;
     
    array[0] = 1;
    array[1] = 67;
    // etc...

    "If you feel a post has answered your question, please click ""Accept as Solution""."