Gast
#1080337
Hallo,
ich habe mir ein EVK1101 zugelegt, weil ich mich gerne in die UC3 Serie
einarbeiten würde.
Habe hier ein kleines Testprogramm von Atmel (Sollte also richtig sein):
#include <avr32\io.h> // UC3 GPIO controller definition
int main(void) {
volatile avr32_gpio_port_t *gpio_port = &AVR32_GPIO.port[7>>5];
int i=0;
// light on a LED here
gpio_port->ovrc = 1 << (7); // Value to be driven on the I/O line: 0
gpio_port->oders = 1 << (7); // The GPIO output driver is enabled
gpio_port->gpers = 1 << (7); // The GPIO module controls the pin
while (1) {
i++;
if( i == 11500 )
{
// toggle the LED here
gpio_port->ovrt = 1 << (7);
i= 0;
}
}
}
Das erzeugte test.elf File will ich mit dem USB Bootloader
programmieren.
Dazu folgendes Kommondo:
batchisp -device at32uc3b0256 -hardware usb -operation erase f memory
flash
loadbuffer test.elf program verify start reset 0
Folgende Ausgabe erscheint:
Running batchisp 1.2.4 on Mon Dec 15 21:08:28 2008
AT32UC3B0256 - USB - USB/DFU
Device selection....................... PASS
Hardware selection..................... PASS
Opening port........................... PASS
Reading Bootloader version............. PASS 1.0.0
Erasing................................ PASS
Selecting FLASH........................ PASS
Parsing ELF file....................... PASS test.elf
WARNING: The user program and the bootloader overlap!
Programming memory..................... PASS 0x00000 0x0142b
Verifying memory....................... PASS 0x00000 0x0142b
Starting Application................... PASS RESET 0
Summary: Total 10 Passed 10 Failed 0
Und weiter passiert nichts.
Wahrscheinlich wird es an der Ausgabe liegen: WARNING: The user program
and the bootloader overlap!
Weiß jemand wie ich das programm zum laufen bekomme?
Weiter ist mir nicht ganz klar, was die Programmzeile macht:
volatile avr32_gpio_port_t *gpio_port = &AVR32_GPIO.port[7>>5];
Woher weiß ich welcher Pin getoggelt wird?
Danke schonmal für die Hilfe.
Gruß Rüdiger