I am using the GNU C compiler and I have a bunch of existing assembler code (about 3000 lines worth) that are written in AVR Studio. I would very much like to call those assembler routines from C, however when I include them in the GNU makefile the GNU assembler complains a great deal.
It seems the GNU assembler does not recognise the various AVRstudio assembler directives, variables, etc. For example, to load the low byte of a 16-bit number into a register, in AVRstudio one will do: ldi r16,low(3000), whereas the GNU assembler expects ldi r16,lo8(3000). Similarly there are differences in naming technique (def versus #define) etc etc etc.
Does anyone have any tips on how to get past this? I'm really hoping I don't have to recode my entire assembler library!
Thanks very much.