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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,511 次查看
gustnado
Contributor I
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.

NOTE:

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.
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
512 次查看
CrasyCat
Specialist III

Hello

Basically you first have to decide if you want to build from batch or if you want to use the IDE.

HCS08 tools are all available as stand alone tools, so it is possible to work without IDE if you wish.

To start the debugger just start the hiwave.exe executable stored in directory {Install}\prog. I would recommend to start it with from your current directory.
In order to make sure you can perform source level debugging, you will have to provide some path information to the debugger. I would recommend you to do it the following way:
    - Start the debugger
    - Load your application (*.abs)
    - Select "File" -> "Configuration"
    - Activate the "Environment" tab
    - Add path to your source file to the "General Path" (actually for assembly source file we need the path to the .dbg file generated by the macro assembler)
    - Once this is done, select "File" -> "Save Configuration" and save the configuration in a file called project.ini located in your current directory.

Then you have to decide whether you want to use absolute or relocatable assembly. Both are possible with CodeWarrior Assembler.
To build relocatable code use option -F2.
To build absolute assembly code directly (You do not need a linker then), use option -FA2.

You can also create an absolute assembly project using the IDE. Please look at the attached technical note for more info. 

CrasyCat

 

TN245.pdf

 

 

Message Edited by t.dowe on 2009-09-16 10:41 AM

在原帖中查看解决方案

0 项奖励
回复
1 回复
513 次查看
CrasyCat
Specialist III

Hello

Basically you first have to decide if you want to build from batch or if you want to use the IDE.

HCS08 tools are all available as stand alone tools, so it is possible to work without IDE if you wish.

To start the debugger just start the hiwave.exe executable stored in directory {Install}\prog. I would recommend to start it with from your current directory.
In order to make sure you can perform source level debugging, you will have to provide some path information to the debugger. I would recommend you to do it the following way:
    - Start the debugger
    - Load your application (*.abs)
    - Select "File" -> "Configuration"
    - Activate the "Environment" tab
    - Add path to your source file to the "General Path" (actually for assembly source file we need the path to the .dbg file generated by the macro assembler)
    - Once this is done, select "File" -> "Save Configuration" and save the configuration in a file called project.ini located in your current directory.

Then you have to decide whether you want to use absolute or relocatable assembly. Both are possible with CodeWarrior Assembler.
To build relocatable code use option -F2.
To build absolute assembly code directly (You do not need a linker then), use option -FA2.

You can also create an absolute assembly project using the IDE. Please look at the attached technical note for more info. 

CrasyCat

 

TN245.pdf

 

 

Message Edited by t.dowe on 2009-09-16 10:41 AM
0 项奖励
回复