PlatformIO Community

[Solved] Create __attribute__((section)) Arduino

Hi,
how to create section memory sram for(Arduino Due)
40k buffer start address 0x20000000

MEMORY in file.ld
{
rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 /* Flash, 512K /
sram0 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00008000 /
sram1, 32K global /
sram1 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 /
sram1, 64K data /
ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /
sram, 96K */
}
//---------------------------------
see what I already tested and it did not work:

typedef struct {
volatile uint8_t MYBASE_EXE_LOADER[ 40 * 1024];
} MY_EXE_POINTER;
#define MYREG_BASE_EXE (0x20000000u)
#define _MYENTRY_POINTER ((MY_EXE_POINTER *)MYREG_BASE_EXE )

and

volatile uint8_t attribute((section (".data"))) sfbuffer[40 * 1024];

//----------------------------------
compiling ok, runtine bad.

thanks,
Carlos.

Hi, Solved
problems is:
ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /* base sram, 96K */

thanks,
Carlos.