CW08-V5 Absolute Assembly

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

CW08-V5 Absolute Assembly

Jump to solution
11,980 Views
glork
Contributor I
Hi All. I'm trying to address an application for the 'QG8. I had to upgrade my CW from 3.0 to 5.0. The application wants to be absolute assembly; its fairly simple and straight-forward, doesn't need extra baggage like a "C wrapper", beans, processor expert, etc.
The problem is that, after I've written my program, I can't flash it. When I launch the debugger I get failures due to link errors.
I don't get it. I have the system set for absolute assembly. I-don't-want-to-link-anything.
Cries for help to the code warrior staff are worse than useless, their resposnes typically don't really address the issue.
Ron
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,227 Views
CrasyCat
Specialist III
Hello
Attached technical note explains how to configure an absolute assembly project in CodeWarrior HC08 V5.0.
 
I hope this helps.
 
CrasyCat
 
Message Edited by t.dowe on 2009-09-16 10:43 AM

View solution in original post

0 Kudos
Reply
12 Replies
1,227 Views
glork
Contributor I
To CrasyCat:
Your response was fast, to the point and, best of all, seems to work. Good on yer and many thanks.
ron
0 Kudos
Reply
1,227 Views
bigmac
Specialist III

Hello Ron,

To avoid the complex directory structure of a CW project, you can run the CW Assembler program(a08hc.exe) independently from the IDE.  Doing it this way, absolute assembly seems to be implicit, with all the include files necessary, located in the same directory as the primary .asm file.  However, you also need to have a config.ini file in the directory, and load this prior to assembly, so that the assembler can find the include files.  All output files generated by the assembler also go to the one directory.  Note that the .S19 file actually has the extension .SX.

This method works well with "drag and drop".  Perhaps others can point out any likely problems and deficiencies with the method.

I use this approach for adapting existing projects, previously assembled with P&E CASM08, to now assemble using CW.

Regards,
Mac

 

0 Kudos
Reply
1,227 Views
glork
Contributor I
Hello Bigmac. This response may be quite helpful once I've slain my current set of dragons. I appreciate that CW tries to be all things to all people but that makes it so complex and cumbersome that most people hate it. I tend to prefer a simpler environment, and I have a text editor (named "Boxer" of all things) that is much better than anything else I've found (I know CW allows third-party editors, but only grudgingly). When I get time (yeah, right) I may try to build a custom environment and your suggestions are quite relevant to that. ron
0 Kudos
Reply
1,227 Views
bigmac
Specialist III

Hello Ron,

To clarify a couple of points -

With the assembly method outlined in my previous post, since I am not using the CW IDE, I need to use my own text editor of choice anyway.  The assembler program, when used alone, doesn't know anything about default text editors.  The assember window is only accessed when I need to assemble the code - when this is done, it's back to my text editor window to do any corrections.

In my previous post I referred to a 'config.ini' file.  Of course this should have been a 'project.ini' file.  This is necessary only so the assembler can find the include files within the current directory, and by initially using the File/Load Configuration assembler menu item.

Regards,
Mac

 

0 Kudos
Reply
1,227 Views
CrasyCat
Specialist III

Hello

Just a side note. If you want to use the macro assembler in stand alone mode you can get rid of the project.ini file if using the options -ENV.

For instance to indicate paths where the assembler should look at, add option
-ENV"GENPATH=MyDir1;MyDir2;"

So in stand alone or batch mode you can use the assembler without any config file. All configuration settings can be done within a -ENV option.

Just FYI if someone is interested....

CrasyCat

0 Kudos
Reply
1,227 Views
bigmac
Specialist III

Hello CrasyCat,

Is there any way that the assembler can be setup, perhaps using the -ENV option, so that it can find files "in the current directory", whatever that may be?

It would appear that the -ENV option requires that each directory be specifically named.  The problem with this is that, whenever I create a new project directory, I need to manually update the assembler configuration.  Puting a "default" project.ini file in my working directory seemed to be the only work-around.

Regards,
Mac

 

0 Kudos
Reply
1,227 Views
CrasyCat
Specialist III

Hello

Basically the directory where you start the assembler from is the current directory.

So just start the assembler from your project directory using the DOS command

"C:\Program Files\Freescale\CW HC08 V5.0\prog\ahc08.exe my asmFile.asm"

If you are starting the assembler double clicking on its icon in the Explorer or on the desktop, then you have to go through a .ini file or define a shortcut for each project with InitialDirectory or Start in pointing to your project directory.

I would prefer the first solution.

CrasyCat

0 Kudos
Reply
1,227 Views
glork
Contributor I


CrasyCat wrote:

Hello

Just a side note. If you want to use the macro assembler in stand alone mode you can get rid of the project.ini file if using the options -ENV.

For instance to indicate paths where the assembler should look at, add option
-ENV"GENPATH=MyDir1;MyDir2;"

So in stand alone or batch mode you can use the assembler without any config file. All configuration settings can be done within a -ENV option.

Just FYI if someone is interested....

CrasyCat






Yes, I am interested. Bigmac & you have pretty much given me what I need to work without CW IF I can learn how to launch the debugger without the CW wrapper.
ron
0 Kudos
Reply
1,227 Views
CrasyCat
Specialist III

Hello

You can start the debugger from the command line the same way you are starting the assembler.

The executable file name is HIWAVE.exe and it is located in the prog directory.

CrasyCat

0 Kudos
Reply
1,227 Views
glork
Contributor I
Thanks CrassyCat.
Sheesh, I'm not used to getting valid answers to my issues. Looks like I've got what I need now. I should be able to do some test runs by the weekend.
ron
0 Kudos
Reply
1,227 Views
bigmac
Specialist III
Hello Ron,
Quote:
... IF I can learn how to launch the debugger without the CW wrapper.
 
Yes, the Simulator/Debugger (hiwave.exe) can be launched as a stand-alone tool, on a similar basis to the assembler.
 
Regards,
Mac
 
0 Kudos
Reply
1,228 Views
CrasyCat
Specialist III
Hello
Attached technical note explains how to configure an absolute assembly project in CodeWarrior HC08 V5.0.
 
I hope this helps.
 
CrasyCat
 
Message Edited by t.dowe on 2009-09-16 10:43 AM
0 Kudos
Reply