"C" in ASM project

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

"C" in ASM project

Jump to solution
1,546 Views
shtz
Contributor I

Hello,

my asm project works fine.

When I add C source file to this project I got

Link error 1822 : undefined _LDEC, undefined _POP32

Could you advice?

My environment: CodeWarrior 3.1 (for HC08, build 4210) + 9S08GB60

 

Thanks,

Shtz

Labels (1)
Tags (1)
0 Kudos
1 Solution
359 Views
CrasyCat
Specialist III

Hello

_LDEC is a runtime function implemented in the ansi library used to decrement a long (32 bit) variable.

In order to  be able to link your application you have to add the appropriate ansi library file to your application.

Please refer to {Install}\lib\hc08c\readme.txt to determine which library file to use. This mainly depends on the options you are using to build the application.

Note that when you are programming in ANSI C you may also need a specific startup code.
I would recommend you to go the following way:

  - Create a project indicating you want to use ANSI C and assembly language using the wizard.
  - Remove the main.c and main.asm file added by the wizard and replace them by your actual source files.

This should allow you to be up and running quickly.

I hope this helps.

CrasyCat

View solution in original post

0 Kudos
1 Reply
360 Views
CrasyCat
Specialist III

Hello

_LDEC is a runtime function implemented in the ansi library used to decrement a long (32 bit) variable.

In order to  be able to link your application you have to add the appropriate ansi library file to your application.

Please refer to {Install}\lib\hc08c\readme.txt to determine which library file to use. This mainly depends on the options you are using to build the application.

Note that when you are programming in ANSI C you may also need a specific startup code.
I would recommend you to go the following way:

  - Create a project indicating you want to use ANSI C and assembly language using the wizard.
  - Remove the main.c and main.asm file added by the wizard and replace them by your actual source files.

This should allow you to be up and running quickly.

I hope this helps.

CrasyCat

0 Kudos