Message Edited by CrasyCat on 2007-04-13 01:32 PM
We do something akin to what your looking for...
the main.c file looks like this:
void main(void){ asm_startmeup();}
Then we have an *.asm file, that has the following define at the top:
.global _asm_startmeup .global _ATODINT .include "mcf51je256.inc" ;Codewarrior Style .text .function "_asm_startmeup",_asm_startmeup,_asm_startmeup_end-_asm_startmeup_asm_startmeup: sei ;Disable Interrupts lea RAMSTACK,A7 ;setup the stack pointer movea.l #0,A6 ;setup A6 dummy stack frame link A6,#0......_asm_startmeup_end:
when your passing functions back and forth between assembly and C, it is important to have the assembly names include an _ and the calls in C don't
Also in the above example you could at the following to the exceptions.c file
extern void ATODINT(void);...__declspec(weak) vectorTableEntryType vector_71 @Vadc = ATODINT;
That's just my newbie way of doing things but it appears to work
Hello,
another way is to transform a normal C project created by the wizard into an assembly only project:
Here are the steps for eclipse based CodeWarrior for MCU10, but in principle apply as well for the non-eclipse version:
http://mcuoneclipse.wordpress.com/2012/02/05/go-assembly-go
BK