I have a c++ project where I would like to create some objects in RAM, and I do it like this :
struct A
{
void foo();
int v[10];
};
#pragma CODE_SECTION( "FuncInRam" )
void A:foo()
{}
#pragma DATA_SECTION( "Objects_Memory_Block" )
static A a;
where in my cmd file, I defined this :
Objects_Memory_Block : > RAM_L4, PAGE = 1
FuncInRam : LOAD = FLASHA,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
And I copy the functions from flash to RAM in the main().
So, is this enough to create an object in RAM_L4? Or, do I need to do something more?
Also, where are it's member variables placed? Also in RAM_L4?