Newbie-Q: CodeWarrior, HCS12, and P&E Micro

Gentle Denizens:

Up until 6 months ago, I was a complete newcomer to Motorola, its HCS12 line, and to the CodeWarrior CW12 suite of tools. I am on the tail end of a (so far) successful project; now I need to find a production solution for our external vendor who will be programming our target boards before they ship them to us.

I have been using CodeWarrior's intrinsic P&E debug tool to effectively program the target during development. However, at $2000+ a seat, it seems that CodeWarrior is an overly expensive and overly powerful solution for production. I assumed that using P&E Micro's Prog12Z was the next natural step, since I was using a P&E Micro BDM multilink cable during development.

Unfortunately for me, though, I am having problems. I attribute nearly all of this to my near zero experience with any of these tools.

I am using CodeWarrior CW12, Prog12Z, and the micro is Motorola's MC9S12A64. As an option in CodeWarrior, I am producing an .S12 file. In Prog12Z, I choose either 9S12dj64_1k.12P or 9S12dj64_64k.12P (I am not sure which I am supposed to use). When I use the _1k.12P, I also have to specify a starting range. I have been giving this my best try (though, apparently, not good enough as I have yet to succeed). Next, I specify the proper .S12 file. When I go to program the module, I get a message from Prog12Z that an address in the .S12 file is not within proper range, and programming fails.

With my lack of basic understanding, I am not sure what I should try next. I have sent off a request for support to P&E, but haven't gotten a response, yet. Also, their help files are not terribly helpful.

I guess what would be most helpful, for me, is to hear from someone who has taken a CodeWarrior HCS12 project through to development, and then used P&E Micro's Prog12Z as the production tool. I need to hear the general steps involved, and all the gotcha's.

Thanks in advance,


Reply to
Thunder Weasel
Loading thread data ...

there are diffrent ways to interprete a banking address for the HC12. Assume your Linker setup does not match the loader interpretation. Eg. there are 20 or 24 bit addresses possible. Some see the HC12 range as 1 Mbyte and others see it as 4 Mbyte with "holes" inside becouse the bank switched area does not occupy all the logical

64 kBytes and is shared with common areas what appear within all banks.

The 1 Mbyte approach allows the linkers to wrap over the bank boarders while the 4 Mbyte approach requires to skip the mirrored common areas within each 64k segment inside the linear long address range.

The trouble starts as soon as you not take the linker and loader (from debugger) of the same manufacturer. Even emulator manufacturers have diffrent attempts to load the S-record address. Furthermore not all tools can program the Eeprom and generate error messages for this locations. Make shure your linker does not generate initialized data for RAM locations without loading them at runtime. Program will run in debugger but flash programmer generates error and will not run stand alone.

You can also try the Cosmic Compiler download from

formatting link
Instead S-record they have proprietary format where its not requiered to take care for those details. To load with 3rd party tools they have included some hex converter file conversion utilies what allows diffrent S-record generation. Nevertheless it should be feasable to setup the linker command file for generation of the correct "dialect" directly

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.