> > 4) code in RAM: actually I don?t need it for performance but to log
> > data to the program flash, because the EEPROM is too small for my
> > needs. To my understanding the program flash of the STM8 doesn?t
> > support execute-while-write, so I need the actual flash write&erase
> > routines in RAM?? At least the Cosmic compiler (and STM8 boot
> > loader) require that. The Cosmic compiler supports that via #pragma
> > and linker settings. Can this be done in SDCC as well and, if yes,
> > how? A small example would be highly welcome? ;-)
> 
> It should be possible e.g. by having the code that goes into RAM in a
> separate file and using the --codeseg option to sdcc and -b option to
> the linker.

I don't think this is enough. It will be located and linked at the 
destination address. But you probably need a copy in flash that at 
startup is copied to ram. So you need to post-process the linked 
object (hex-file) to move it. And then you need a routine for making 
the copy.

Maarten

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to