Skip to main content
Graduate
September 19, 2024
Solved

How can I define an array[512] at RAM_D1(@0x24000000) with STM32 VSCode extension?

  • September 19, 2024
  • 1 reply
  • 3831 views

I am new user of stm32h750, and I try developing it with STM32 vscode extension, it is great!

For sci_dma, I need a buffer at RAM_D1(@0x24000000) , how can I define the array?

I can only define a pointer at the address and it works: 

uint8_t *p = (uint8_t *)0x24000000;

 

But how about a char_buffer[n]?

 

Please kindly help me, thank you.

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

    7e382f66-0c9c-4436-8043-a6d926c206b0.png

    in STM32H743IITx_FLASH.ld

    add

    ._D1_Area :
    {
     . = ALIGN(4);
     . = ALIGN(4);
    } >RAM_D1

     and

    __attribute__((section("._D1_Area"))) float char_buffer[n] = {0};

     

    Sorry, I overlooked something.

    1 reply

    Graduate
    September 22, 2024

    try like

    __attribute__((section("._DTCM_Area"))) float adcBuf[3] = {0};
    
    __attribute__((section(".RAM_D1"))) float char_buffer[n] = {0};
    prof89Author
    Graduate
    September 24, 2024

    Thanks a lot.

    I will try and report back my result.