I know this is an old post, but I'm trying to combine Bootloader and App code into a single project. Has anything changed in the last few years? Is it still best to keep these as seperate projects?
Can anyone confirm if the PRM trick mentioned above works?
I would recommend to keep the bootloader and application as separate projects. For the app project you can then have two different targets
Sten
Sten, on the second bullet point, did you mean to say "an application target" instead of "a bootloader target"?
This approach works, but is just very cumbersome during development as I have to build the .S19 file with the compiler, convert that into a .hex file, and then we use Hyperterminal to load that .hex file onto the unit. So, I'll loose a fair amount of time loading and testing small changes.
Yes, the second target is the 'plain' (without included bootloader) application, intended to be downloaded with the bootloader.
In the developing phase you can download the 'procuction' target (application with included bootloader) to your hardware over the BDM if you prefer that. Then it is up to your bootloader if you have to convert the s19-file to hex and what tools to use to transmit it. My bootloader accepts s19-files directly and we have a dedicated Windows-application for the transmission (and I have found that to be faster and more conveniant than attaching the Cyclone and downloading over the BDM).
/Sten
Sten, I'm slowly absorbing much of this and am beginning to understand.
I would like to try your suggested approach, but I do not have a PRM file (that I'm aware of). I have an LCF file. Is that the same?
Note: I'm using CW6.3 to develop for a MCF51CN128 chip.
Also, I tried the copy/paste option for the S19 files. It seemed to work, but I got a few odd results I wasn't expecting. I'm digging into those now to try and figure out what's going on.
A couple of differences to note: My S-records start with S0 and S7, not S0 and S9 as mentioned in a previous post.
Does it matter where I copy the Bootloader's S3 records into the Application's S19 file?
Sorry ignisuti, I do not know how to do this for ColdFire, I've been using the approach on HCS08 (CW6.3) and HCS12 (CW5.0). Maybe someone else can help you?
/Sten
No problem. I think you have me going down the right path. I just need to do a little more digging.
THANKS!
Hello,
- combine the two srecords and then flash the combined one. The merging can be done with the burner utility, or with any more or less smart script. Just drop the S0 and S9 frames (on the first and last line).
Why not simply paste the bootloader S-records (minus the S0 and S9 lines) straight into the application S19 file, using a suitable text editor.
Regards,
Mac
I have thougth about the same question, and I do not have a tested solution, but I have been thinking in the direction of to somehow merge the bootloader's S19-file into the applications S19-file, either during the compile/link-process or when the debugger is started.
Has anybode done something like this, and how to do it?