I'm trying to add a section that will include calibration data stored in data flash and loaded in RAM at startup.
The firmware can modify these data in RAM and erase/program the data flash block with updated values.
So I created these sections in the .lcf file:
{
.calibration_dataflash : {}
.fee1_dataflash : {}
.fee2_dataflash2 : {}
.history_dataflash : {}
} > internal_dataflash
__CALIB_ROM_START = ADDR(.calibration_dataflash);
GROUP :
{
.calibration LOAD(__CALIB_ROM_START):
{
| | . = ALIGN (0x4); |
| | *(.calibration_data) |
| | . = ALIGN (0x4); |
| | *(.calibration_crc) |
| | . = ALIGN (0x8); |
}
} > calibration_ram
__CALIB_RAM_START = ADDR(.calibration);
__CALIB_RAM_END = ADDR(.calibration) + SIZEOF(.calibration);
In my header file I defined:
#pragma section ".calibration"
#define __CALIBRATION __declspec(section ".calibration")
But at compilation I have the following error:
>Linker command file output section '.calibration' has a type or input which
>is incompatible with
>section '.calibration' in file
I searched in many files and discussions but I haven't found the solution. Any idea ?
Environment: CW 10.5 for MPC5604B