S-Record output for Bootloader

cancel
Showing results for 
Search instead for 
Did you mean: 

S-Record output for Bootloader

530 Views
Contributor I

I am currently using MC56f82748 and implementing a bootloader and bootloadable application. I attached an example s-record output from Codewarrior 10 for the application code. Three s-records were produced after compiling. From what I already read:

.p.s - s-record for program memory

.x.s - s-record for data memory

.s - combination of program and data

I tried using the .s file only for bootloading but the program was unable to run when performing a power reset. 

After checking the file, I noticed that the data memory part of the s-record has only zeros for the data so I tried using the .p.s file to bootload and was able to successfully run the program even after reset.

Looking at the s-records, I can see that the program memory started from 0x0000000 while the data memory started at 0x0200000000. According to AN4860 page 4 the program and data map of the MC56f82748 is as follows

pastedImage_1.png

It seems that the .x.s file is pertaining to addresses that isn't existing in its data memory map model and it is causing the program flash to be overwritten. Can someone explain to me why the .x.s record were like that? Or am I just missing something in the generation of the s-record.

Labels (1)
0 Kudos
5 Replies

76 Views
Contributor IV

Hi Renan,

I have just started working on a bootloader for the 56f82746.  I was initially going to try to modify the bootloader for the 56F84789 since I could not find any bootloader for the 56f82746.

Are you still working with the code shown in your post at https://community.nxp.com/thread/469908 or are you creating something different.

Are you using CAN bus or Serial SCI?

Maybe if we both work at it we can get it running.

Thanks,

Pete

0 Kudos

76 Views
Contributor I

Hi Pete,

I am still working on the same code I posted on the thread you mentioned. As of now, I got it to work using Serial SCI, the same that is used. The cause of the issue on that thread was because of the wrong output of s-record produced by codewarrior as mentioned in this thread. 

As of now I am trying to port the same bootloader but using I2C bus.

Renan

0 Kudos

76 Views
Contributor IV

Hi Renan, et al.,

Wondering if you have tried downloading firmware with the bootloader then making a change in the code and then downloading the new version.

It does not appear to be erasing the old version (except for the first page) when programming the new version.  Appears to just overwrite it.

I was testing this with my code that flashes a Live LED (it's at 0x2E90) and when I change one value for the timing, it just overwrites the flash location so the timing is not correct, increase the time and it gets shorter due to other bits being set from 1 to 0.

Have you tried that and what have you seen?

It pretty much looks like there is no code to erase other pages as they are being programmed.  I am looking into a good way to fix that.

Thanks,

Pete

0 Kudos

76 Views
NXP TechSupport
NXP TechSupport

Hi Renan,

To avoid misunderstanding, Please send me your demo project for the generated s record file you attached. Thanks.

Jennie Zhang

0 Kudos

76 Views
Contributor I

Hi ZhangJennie,

I tried creating a new project and copying the contents of the previous one. I was able to produce the right S-records but now the old project is also producing the right s-records. I can't send a demo project now because I wasn't able to reproduce the issue of the old project.

The only difference is that now I am currently on windows 10, the previous one was on windows 7. 

Renan

0 Kudos