Need some help, Keil AARM

Hello all.

Till now I coded all my projects for LPC2129 (ARM7TDMI MCU) using Keil C compiler. I have very good assembler skills so I would like to code some assembly.

The problem is:: When I try to compile something simple

*********************** AREA MAIN,CODE MOV R1,#3 END ********************** Error are: *** WARNING L23: UNRESOLVED EXTERNAL SYMBOLS *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: ?C?INIT ADDRESS: 00000104H

Problem is in the startup code which is written to start executing "C main" function. I found this code in // Enter the C code LDR R0,=?C?INIT TST R0,#1 ; Bit-0 set: INIT is Thumb LDREQ LR,=exit?A ; ARM Mode LDRNE LR,=exit?T ; Thumb Mode BX R0 ENDP

How can I modify startup.s to start executing program from my asm source file ? Let's say main.s

Thanks very much !

Reply to
Mad I.D.
Loading thread data ...

[...]

Whichever way you like. The most obvious would be not to use startup.s at all, i.e. tell the linker not to pull startup.s into the build.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

Of course that would work.

But then I would have to re-write startup.s :) Interrupt vectors, PLL, MAM etc.

All I wanna now is how to continue program execution in another file, I would delete that ?C?INIT part.

Reply to
Mad I.D.

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.