Compiler & uisp faq

What's the correct syntax for compiling?

avr-gcc -mmcu=at90s4414 -I/usr/avr/include -Os -Wall -o foo foo.c

What does the compiler consist of?

I want to know more about the interals of the compiler

How can I use my own crt1 instead of the presupplied one?

avr-gcc -mmcu=at90s4414 -I/usr/avr/include -Os -Wall -c foo.c
ava -o foo /my/own/crt1.o foo.o

Note that crt1 must be the first object given to the linker.

How can I upload my code to the car?

uisp /dev/tty00 --AtmelTAvr S8515A

Please don't forget to clear the flash memory before uploading your code (command ce).

I ran 'uisp ...', now what?

ce
Clear flash
ul filename 
Upload code from file filename to the car.
q
Quit. Code execution won't start untill you quit uisp.

An alternative way to upload code to the car would be:

uisp /dev/tty00 --AtmelTAvr S8515A --erase --upload filename

Be careful, execution will start right after you're done with uploading.

The compile seems to want crt1-8515.o

You are missing -mmcu=at90s4414

I can't find the avr-gcc, or avr-gcc can't find ava

You don't have /usr/avr/bin in your path. This can happen eg. if you have a local .rc file which overrides the default path. To set things right, for bourne style shells (ksh, sh, ...) run:

PATH="/usr/avr/bin:${PATH}"
export PATH
Or for a csh-style shell:
setenv PATH "/usr/avr/bin:${PATH}"


If you find some information to be in{correct,accurate} or even just simply missing, please let me know about it.

Antti Kantee <pooka@cs.hut.fi>