PlatformIO Community

Memory Violation ATSAM3X8

Hi,
project PIO, ATSAM3X8, Framework Arduino.
simple bootloader on Flash, loader code in RAM call code, execute.
load code call direct ( my entry_main_ram) 0x20000000 area ok.

see: run ok , file flash.ld and sram.ld compiling separately (flash)

void entry_main_ram(){ 
uint32_t led =0;
 while(1){
     digitalWrite( L1, led );
      led ^=1;
   }
}
//----------------------
problems violation cause reset processor:
void entry_main_ram(){ 
bool bl = true;            // add it, reset processor , call
 while(1){
     
    digitalWrite( L1, bl = !bl ); not effects, in flash ok
  set_invet_led();  simple call reset processor

  }
}
//---------------------see list call reset processor
Serial.begin(9600); reset processor
pmc_enable_periph_clk(ID_CAN0); reset processor
can_init(CAN0, 84000000, 500); reset processor

execute code on ram error.
thanks,
Carlos.

hi,
problems solved,

thanks,
Carlos.

Hi, can you quickly explain how you solved the issue? It might help the community if anyone has similar issues.
Thanks