9S12P Codewarrior S-Record problem with CyclonePro

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

9S12P Codewarrior S-Record problem with CyclonePro

Jump to solution
1,140 Views
cjbourassa
Contributor I

Hello.

 

I have a brain wracking issue that I can't seem to figure out.

 

I've got a simple program for my 9S12P128 created in Codewarrior and it runs great in the debugger. Now I'm trying to use the .phy file to program the microcontroller using PROG12Z from PE Micro.

 

I have the Codewarrior (12v5.1) burner settings set to not generate S7 records. I have the correct processor family selected and I'm debugging / programming using the Cyclone Pro.

 

Here is a copy of what the normally generated .phy and .s19 files look like in the bin folder of my project.

 

Project.abs.phy

8160_8160.jpgPHY.JPG.jpg

Project.abs.s19

 

8161_8161.jpgS19.JPG.jpg

I know that I can not use the .s19 file to program my microcontroller because it requires physical addressing. Therefore I need to use the .phy file. However, when I use PROG12Z from PE Micro, it gives me an error and tells me that there isn't any data.

 

The weird thing is that when I use their tool to convert the .s19 to a .phy file, I get a different looking .phy file than what codewarrior produces.

 

8162_8162.jpgCONVERTED PHY.JPG.jpg

Using the above .phy file to program my microcontroller, it doesn't work. I'm sure it doesn't work because there is no S8 or S9 record that tells the program where to start....and I have no idea why.

 

This is my first time posting and I hope I'm not posting this issue in the wrong place or leaving out too much information. I've been reading everywhere about this and can't find any other person who has this issue. They all seem to use the Codewarrior generated phy file with no issues.

 

Thanks for taking a look at my problem.

 

Regards, CJ

Labels (1)
Tags (4)
0 Kudos
1 Solution
620 Views
kef2
Senior Contributor IV

The problem is CW uses wrong *.bbl file for S12P. Project wizard added file is for derivative with PPAGEs 0x1?..0x1F. And S12P has PPAGEs 8..0xF. This is why phy records addresses are not properly converted. See attached bbl. It would be nice if you make service request for this.

For S12P variants with less than 6k of RAM you may need to edit this line in BBL file:

len = 0x1400    /* = 0x4000-0x1400-ramsize*/

^^ this is only required in case you want to use all nonbanked flash at 0x1400. With less than 6k you have more nonbanked flash at 0x1400. If aren't using this area, then you don't need to change anything, it should work.

View solution in original post

0 Kudos
3 Replies
620 Views
cjbourassa
Contributor I

Everything is working now, Edward. Mistake on my end that's too embarrassing to admit.

Thanks!!

0 Kudos
621 Views
kef2
Senior Contributor IV

The problem is CW uses wrong *.bbl file for S12P. Project wizard added file is for derivative with PPAGEs 0x1?..0x1F. And S12P has PPAGEs 8..0xF. This is why phy records addresses are not properly converted. See attached bbl. It would be nice if you make service request for this.

For S12P variants with less than 6k of RAM you may need to edit this line in BBL file:

len = 0x1400    /* = 0x4000-0x1400-ramsize*/

^^ this is only required in case you want to use all nonbanked flash at 0x1400. With less than 6k you have more nonbanked flash at 0x1400. If aren't using this area, then you don't need to change anything, it should work.

0 Kudos
620 Views
cjbourassa
Contributor I

Thanks, Edward. The newly generated phy file from Codewarrior looks like this now:

newest .phy file

NewPHY.JPG.jpg

I'm encouraged that it looks very similar to the .phy file that was converted using the Log2Phys tool from PE Micro. The same addresses are used. However, I am still unsuccessful in getting my program to run.

I will make sure to put in a service request for this issue, and I feel a little guilty taking advantage of your time and knowledge. Your help with the .bbl file is something I never would have figured out.

I've made an extremely simple program that flashes an LED on and off and programmed my micro controller with that. It doesn't work. The only thing I can think of is that the micro controller doesn't know where to start the program. Something as trivial as 10 lines of code should be easily done.

Another EE here suggested manually altering and parsing the phy file to figure out what's going on, but I'm not entirely sure why the correct file isn't being generated in the first place.

Regards, CJ

0 Kudos