I have started to play with the AVR32 chip on the board from alvidi. Well, it is not as easy as arduino board, or AVR 8 bits chips. First, there is no "pure" avr-gcc" available, but a gnu-toolchain version made by Atmel. As I am working under Linux, I used the Linux version. You can forget the simple "PORTB" or "DDRB" register names that are used on AVR8. Names are mostly different ahd hardly understandable. But Atmel provides a software development kit that brings basic libraries for most devices available on the AT32UC3A.
One good thing with this chip, it that it can be flashed directly through USB. It took me some time to find that I should install the "flip-3.2.1" software available on Atmel site to do this job. But there is still a problem: this software is not up to date for its linux version, so the flip program itself can't be used. Fortunately, there is in the package another program called "batchisp3" that can be used by command line. But the bad news is that this version is not working correctly with last Ubuntu 8.04. So to flash the AT32UC3A1512, you will need to hack it. I found an interesting thread on avr-freak: you'll need an Hexadecimal editor, and replace /sys/bus/usb and /proc/bus/usb instead of /dev/bus/usb. Hopefully, once this hack done, it worked.
The first application I tried was to light some leds. For this , I used the GPIO local_bus_address example delivered in the Software development kit. I modified the Makefile to take the hacked batchisp3 for download, and added the full path for the .elf target as batchisp3 need the complete path to find the file.
After the traditional make to compile, or better make clean and make, it need a "sudo make isp program run" to flash and run the software on the target. The "isp" option specifies to use batchisp3 program instead of avrprogram, and "program" do the flash. But don't forget also the "run" otherwise the application will never run.
Ouf.
Now the next phase will be to run FreeRtos on the target. Currently it does not compile due to some bad header files. The problem is known, but there is not yet good solution.
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire