Hi Kremer,
well, I followed your advice, which indeed is the best possible solution I can think of; I have implemented it but... something is wrong!
I have written the bootloader which fits in the first 0x0fff locations (two pages), I have simulated it and it _seems_ to work fine.
I have then prepared a second, very simple application (a LED flasher... what a fantasy!), I have compiled it with the linker directive:
flash (RX) : ORIGIN = 0x00001000, LENGTH = 0x0003F000
the end of the startup code is as follows:
jsr BootLoader
move.l #0x00001000,a0
move.l (a0),sp
move.l #0x00001004,a0
move.l (a0),a0
jmp (a0)
which means that, when the bootloader exits, it moves the SP to 0x1000 and the PC to 0x1004.
This should start the led blinking but... no luck!
Am I missing something? How can I debug it with codewarrior? I don't think there is a way to put together two different codes... Can someone please help me find the problem?
Thanks a lot!
Paolo.
P.S: the main application is built with the Codewarrior stationery for the 52235, therefore starting from MCF_52235_vectors.s. Could this be the problem?