Can't get all files to compile - CW v6.2

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

Can't get all files to compile - CW v6.2

Jump to solution
1,273 Views
Bloodhound
Contributor I

Hi All,

 

I'm using CW v6.2 for a CFV1 project.

I am battling trying to get it to do what I want, I've created a new project and have some assembler files in the project just as a test to see if I can make something happen. Most of which I just copy / pasted from the included files in the installation of the software.

I have two problems.

 

1 - When it does compile it is only including the main.asm code in the final s19 file, the exception vector table is not being included (I have no idea why).

 

2 - The code produced from main.asm should start at 0x410, but it starts at 0x412, why the two byte offset? Location 0x410 has $0000 in there instead.

 

Any help would be very much appreciated. I'm coming over to the CF processor from the HC08 so I am reasonably familiar with CW, I'm just having trouble dealing with the C foundations the CF version seems to be based around :smileysad:

 

Thanks,

Ross

 

Project.zip

Message Edited by t.dowe on 2009-09-04 03:01 PM
Labels (1)
0 Kudos
1 Solution
421 Views
CrasyCat
Specialist III

Hello

 

1- In order to get the vector table linked to the application you need to disable dead striping

    for that symbol. The vector table is never explicitly reference in the application, so the linker

    does not link it to the executable file.

    To tell the linker you want to add VECTOR_TABLE to your executable, add following command to

     your .lcf file:

 

       FORCE_ACTIVE{ VECTOR_TABLE}

 

2- These 2 bytes are the 2 bytes allocated for constant test in module variables.asm.

    If this is a constant I would recommend to allocate it in section .rodata instead of text.

 

CrasyCat

View solution in original post

0 Kudos
2 Replies
421 Views
Bloodhound
Contributor I
Thanks CrasyCat, all up and running now.
0 Kudos
422 Views
CrasyCat
Specialist III

Hello

 

1- In order to get the vector table linked to the application you need to disable dead striping

    for that symbol. The vector table is never explicitly reference in the application, so the linker

    does not link it to the executable file.

    To tell the linker you want to add VECTOR_TABLE to your executable, add following command to

     your .lcf file:

 

       FORCE_ACTIVE{ VECTOR_TABLE}

 

2- These 2 bytes are the 2 bytes allocated for constant test in module variables.asm.

    If this is a constant I would recommend to allocate it in section .rodata instead of text.

 

CrasyCat

0 Kudos