I have a constant X defined in main file. I cannot find how to use it in assembler.
/*** file main.c ***/ #define X 120 /*** file asm1.s ***/ .func foo foo: ldi r30 , X ret .endfunc
Compiler reports "undefined reference to x".
Especially I would like to use F_CPU in asm code.
But this happens:
//crystal = 10 MHz ldi r30 , F_CPU/60000 ../Casm1.s:55: Warning: constant out of 8-bit range: 10000000 ../Casm1.s:55: Error: garbage at end of line
Is there some solution?