You are not logged in.
Pages: 1
I'm working on a robot and I already know assembly. I want to use avrdude to transfer it, but I don't know what to use to actually compile it.
I'm going to be using the atmega 644 if that helps.
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
I had never worked with avr microcontrollers, so I'm not really sure, but gcc-avr should be ok. It's in AUR.
Last edited by reqamst (2009-10-26 18:28:12)
Offline
I thought gcc only compiled C. Can it compile ASM too?
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
I don't know anything at all about assembly, but I do know that yasm is what x264 is using to compile their asm code.
Offline
You probably want avra, which is the avr assembler, and on top of that the include file for your particular mcu. In your case it should be something like m644def.inc and it tells useful stuff like what memory address PORTA maps to and such. Note that the latest versions of these inc files are incompatible with avra, or at least the one in the repos/aur, so you might have some converting to do.
Last edited by tlvb (2009-10-26 23:35:05)
I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.
Offline
Sweet. AVRs are great fun to work with.
The big one is AVR-libc. It is in community.
http://www.nongnu.org/avr-libc/user-man … mbler.html
There are also alternatives such as
http://avra.sourceforge.net/
http://www.avr-asm-tutorial.net/gavrasm/index_en.html
Offline
gcc does a lot of languages, avr32 being one of them.
GCC does not stand for 'GNU C Compiler', as some people seems to think, but 'GNU Compiler Collection'
Last edited by Mr.Elendig (2009-10-26 23:38:11)
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Yeah, avrgcc can be set to produce asm output for debugging purposes, so it is probable that you can use it to assemble avr asm too, but I haven't figured out why, and the asm I've written so far has been painless with avra, except for the initial hump of converting the include file.
I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.
Offline
I thought gcc only compiled C. Can it compile ASM too?
GNU "as" is GNU assembler. It's part of the binutils. It uses at&t syntax though.
Offline
Cool. I was thinking of writing my own libraries anyways.
Probably going to go with avr-gcc first, then if that doesn't work try avra. Or maybe yasm.
I used to use zasm with the ti83's.
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
gcc can be used to link object code, but it will not assemble source. I've used gcc to link assembly that makes calls to unix system functions. Just a guess, but I suspect that gcc only acts as a wrapper to ld when using it in this fashion. Given your application, you'll probably be calling ld directly.
Offline
I'm kind of confused with ld, so I think I'm going to go with avra instead then.
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
well, there is avr-as which is an alias (or something) for as, the GNU assembler. I've just never used it...
I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.
Offline
Pages: 1