Hello,
I'm currently trying to make a project written for the MCF52259 Eval Board compatible with the USB Mass storage device bootloader supplied by Freescale. I have read the documentation for the bootloader as well as application note AN3927 ("Freescale S08 USB Mass Storage Device Bootloader") which describes the bootloader in detail and even gives step-by step guide to making a project compatible with it.
There are 2 problems that prevent me from accomplishing this task:
1. I don't have experience regarding the linker command file (LCF) and I have troubles adapting the current Linker file structure into what the application note recommends.
To make things clear: my project's memory structure is defined this way:
MEMORY {
vectorrom (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000020
code (RX) : ORIGIN = 0x00000500, LENGTH = 0x0007FB00
vectorram (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400
userram (RWX) : ORIGIN = 0x20000400, LENGTH = 0x00005C00
} - just as described in application note AN4329 ("Relocating Code and Data Using the CodeWarrior Linker Command File (LCF) for ColdFire Architecture")
and bootloader-compatible LCF's memory structure looks like this:
{
vectorflash(RX) : ORIGIN = 0x00000000, LENGTH = 0x00000418
bootcode (RX): ORIGIN = 0x00000420, LENGTH = 0x00003BE0
flash (RX) : ORIGIN = 0x00004010, LENGTH = 0x0007BFF0
vectorram(RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400
sram (RWX) : ORIGIN = 0x20000400, LENGTH = 0x00005A00
ipsbar (RWX) : ORIGIN = 0x40000000, LENGTH = 0x0
}
And although some sections have similar structure and sizes, they aren't identical and I don't know which should I keep and what to do with the other sections.
2. The files in the Application note don't match the ones in the 'MCF5225x Bootloader_1.2' archive:
instead of having 'mcf5225x_vectors.s' i have 'exceptions.c' (which seems to be written for V1 MCFs, despite the lab being about '5225x') and 'V2_Bootloader.lib' is missing completely. Also the project I'm working on already has the file 'exceptions.c', which I've replaced with the new one - but I've got no idea if they're compatible.
I know this issue might seem trivial but I'm treading new grounds and I can't get over this without some help. So if you have any thoughts on this please share them !
Thanks for reading 