Program in Assembler

I already have software written in assembly

E2Studio creates startup code in C.

Somewhere in there I have to add a call to the assembly program.

Where does it go? I'm guessing that it might be the .src directory

My assembly program starts at main: which is declared ".global"

Parents Reply
  • You have to use the "_"-prefix only in the assembler source code in the declaration and the definition:

    global _cardinit


    If that doesn't solve the error, please check the manual of your compiler for the details of calling- convention or assembler-interface.

  • It's not that, it's actually quite happy without the "_" in the assembler, but what is does want is for the assembler file to be called .S and not .s

    NXP's version of Eclipse is quite happy with .s

    Getting somewhere now. . . . 

  • > the assembler file to be called .S and not .s
    It depends on builder, not compiler. (*.s is accepted in RZ project, but not in RA)
    Rename it to .S.

    Standard CDT accepts both *.s (skip pre-processor) and *.S (use with pre-processor).
    You should rather use *.S thinking of compatibility even *.s are commonly seen.