Just started AVR programming, I use AVR studio in Windows but unfortunately my main OS is Ubuntu, so firstly thanks for your work!
Now I have a problem compiling in Kontrollerlab. I have already in system binutil-avr, gcc-avr, avrdude and some others I can't name, but the code I run w/o a problem in AVR studio seems fail to compile. Below is the beginning of the code:
.include "m64def.inc"
.def a=r16 ;define a to be register r16
.def b=r17
.def c=r18
.def d=r19
.def e=r20
main: ;main is a label
...
And here is the error message:
avr-gcc -mmcu=atmega64 -g -O0 -c lab01.S -o lab01.o
lab01.S:20:24: warning: no newline at end of file
/tmp/ccdrpNnE.s: Assembler messages:
/tmp/ccdrpNnE.s:11: Can't open m64def.inc for reading: No such file of directory
lab01.S:2: Error: unknown pseudo-op: `.def'
lab01.S:3: Error: unknown pseudo-op: `.def'
lab01.S:4: Error: unknown pseudo-op: `.def'
...
I guess I forgot to configure the environment and in fact I don't know how, hope you can guide me through this. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe it's a avr studio thing with the include files for asm. I haven't used asm myself since I only use C but I can't find any m64def.inc file on my system.
Try put the inc files (and all the files which are included by that file) in the project and see if it solves the problem.
/Mario
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know why there is a difference too, but try this:
* Write an architecture definition on top like this: .arch atmega64
* Change the .def a=b by #define a b
* Write #include instead of .include
* Completely remove the .include "m64def.inc" line
Maybe this helps.
regards,
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just started AVR programming, I use AVR studio in Windows but unfortunately my main OS is Ubuntu, so firstly thanks for your work!
Now I have a problem compiling in Kontrollerlab. I have already in system binutil-avr, gcc-avr, avrdude and some others I can't name, but the code I run w/o a problem in AVR studio seems fail to compile. Below is the beginning of the code:
.include "m64def.inc"
.def a=r16 ;define a to be register r16
.def b=r17
.def c=r18
.def d=r19
.def e=r20
main: ;main is a label
...
And here is the error message:
avr-gcc -mmcu=atmega64 -g -O0 -c lab01.S -o lab01.o
lab01.S:20:24: warning: no newline at end of file
/tmp/ccdrpNnE.s: Assembler messages:
/tmp/ccdrpNnE.s:11: Can't open m64def.inc for reading: No such file of directory
lab01.S:2: Error: unknown pseudo-op: `.def'
lab01.S:3: Error: unknown pseudo-op: `.def'
lab01.S:4: Error: unknown pseudo-op: `.def'
...
I guess I forgot to configure the environment and in fact I don't know how, hope you can guide me through this. Thanks.
Maybe it's a avr studio thing with the include files for asm. I haven't used asm myself since I only use C but I can't find any m64def.inc file on my system.
Try put the inc files (and all the files which are included by that file) in the project and see if it solves the problem.
/Mario
Hi!
I don't know why there is a difference too, but try this:
* Write an architecture definition on top like this: .arch atmega64
* Change the .def a=b by #define a b
* Write #include instead of .include
* Completely remove the .include "m64def.inc" line
Maybe this helps.
regards,
Martin