Expresso not including my .S file in build

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

Expresso not including my .S file in build

252 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by acelink1 on Wed Feb 19 19:08:10 MST 2014
Hi Guys, I have a serious problem.

I have written a small Assembly program in a .S file.  When I build the whole project Xpresso reads and builds the .S file. I know this because I deliberately wrote NOP #4 instead of NOP just to see if Expresso would error and it did. So I know Expresso is reading and building my Assembler .S file.

In the main.c file is just the basic default setup of the LPC4357 and a while loop at the end of the C program.

I have entered this line before the while loop to externally include my assembler program. Is this correct?

extern int assem_program;

Now when I build the whole project and view the disassembly my assembler program is not there only the while loop in C is there.

Why isn't Xpresso including my .S file when building.

Somebody please explain before I have no hair left :)

Oh, I don't know C++ I'm an assembler programmer.

Pete




0 Kudos
2 Replies

242 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by acelink1 on Thu Feb 20 14:08:49 MST 2014
Thank you lpcxpresso-support. I'll check it out.

Did you ever like the BBC Model B home computer?

Pete :)
0 Kudos

242 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Feb 20 00:46:07 MST 2014
The linker will eliminate unused code, so unless there is an explicit call to your assembler routine from the C code, it will be discarded. You can look in the .map file to see what is being discarded.
0 Kudos