AnsweredAssumed Answered

Moving non-CW projects to CW - Freescale HC(S)08

Question asked by John Moore on Jun 25, 2006
Latest reply on Jun 26, 2006 by CrasyCat
I have a large number of products which were coded in a non-standard assembly language (for the Freescale (was Motorola) 05 line.

I now want to convert these to build (and more importantly, debug) on the (S)08.

I have figured out how to write a program to convert the assembler syntax to use the CW assembler and linker to build the finaly binaries.

However, I want to use Freescale's on-chip debugger with these on the S08. This leads to the following questions:

1) Do I need to use CW to run the debugger? Even if not, I suspect I want to in order to get source level debugging.

2) If 1 is yes, exactly how exactly do I do this from existing files? I can create a bunch of assembly files for each project. But then, what is the easiest (hopefully scriptable) way to set things up so that CW can use these for debug - presumably with a project for each set (corresponding to one of my products)?

I have tried doing it by hand, creating CW projects and importing files, and it hasn't worked out. I must be doing something wrong.

Also, with the large number of projects, even if I did have a procedure that worked, it would be nicer to be able to script it.

Hopefully somebody can at least tell me how to take a collection of existing assembly files and turn them into a CW project using the CW GUI, and even better how to do it by creating directories and control files directly so that CW will just recognizs each top directgory as an already complete project.


I need to use multiple relocatable sections, as my current assembler allows the creation of an arbitrary number of sections. My current assembler uses a single source file (with includes) and works in absolute mode, producing a nice absolute listing - easy for debugging without a source-code ICE. I don't believe this is even possible with the CW assembler, so I believe I need the relocatable mode and hence the ICE in order to be able to debug without doing tons of hex arithmetic from the map and relative listings. Comments?

Thanks in advance.