_declspec(text2)voidSupervisioneComandi(void)
and I put the following lines on the .lcf file
.text : // here I want to put the code in FLASH
{
___VECTOR_RAM = .;
.= ___VECTOR_RAM + 0x400;
.= ALIGN(0x04);
*(.text)
*(.init)
*(.fini)
*(.rodata)
__START_DATA_ROM = .;
} > ram1
// here I want to put the initialized data, the ROM values to initialize the data starts from __START_DATA_ROM
.data: AT(__START_DATA_ROM)
{
___DATA_RAM = .;
*(.data)
___DATA_END = .;
} > ram2
// here I want to put the sram code; the ROM image of that code will be immediatly after the initialization data
.text2 : AT(__START_DATA_ROM + ___DATA_END - ___DATA_RAM)
{
___SRAM_START = .;
*(.text2)
___SRAM_END = .;
} > sram
and this works.
My problem is, I have some other files, wich code I want also to run in SRAM, but they comes from a third-part graphic library, so I am unlikely to modify directly the source code.
Putting a line like this :
.text2 : AT(__START_DATA_ROM + ___DATA_END - ___DATA_RAM)
{
___SRAM_START = .;
*(.text2)
gdisp.c (.text)
___SRAM_END = .;
} > sram
doesn't work, because the file code of gdisp.c will be first captured in the ram1 section.
In the previous command-line based compiler, I do it directly by adding a switch when compiling , but in the CodeWarrior IDE, it is possible to assign some compilation switch only to a file?
Or, is there someone havings some other hints to do this operation?
Thank you
Stefano
// here I want to put the sram code; the ROM image of that code will be immediately after the initialization data
.text2 : AT(__START_DATA_ROM)
{
___SRAM_START = .;
gdisp.c (.text)
*(.text2)
___SRAM_END = .;
} > sram
.text : // here I want to put the code in FLASH
{
___VECTOR_RAM = .;
.= ___VECTOR_RAM + 0x400;
.= ALIGN(0x04);
*(.text)
*(.init)
*(.fini)
*(.rodata)
__START_DATA_ROM = .;
} > ram1
// here I want to put the initialized data, the ROM values to initialize the data starts from __START_DATA_ROM
.data: AT(__START_DATA_ROM + SIZEOF(.text2))
{
___DATA_RAM = .;
*(.data)
___DATA_END = .;
} > ram2
I did try with CodeWarrior for Coldfire V7.0 and it is working fine.