Gast
#2825889
Hallo Leute,
kurze Frage an die Eclipse-Kenner:
Ich habe mir eclipse 3.7 und das avr-plugin unter windows installiert.
Mein minimalistisches xmega programm (nur clock einstellen) kann ich
auch compilieren. Allerdings tut eclipse so, als ob es zich Fehler geben
würde, weil es anscheinend die ganzen Register nicht kennt.
Click ich auf "build", läufts in der console aber durch...
Kann man dagegen was tun?
==================
Code main.c:
#include <avr/io.h> /* XMega 128A1 */
void Clock_init(void)
{
OSC_XOSCCTRL = OSC_XOSCSEL_XTAL_16KCLK_gc | OSC_FRQRANGE_12TO16_gc;
OSC.CTRL |= OSC_XOSCEN_bm;
while(!(OSC.STATUS & OSC_XOSCRDY_bm));
CCP = CCP_IOREG_gc;
CLK.CTRL = CLK_SCLKSEL_XOSC_gc;
}
int main() {
}
==================
eclipse sagt dazu:
Description Resource Path Location Type
Field 'CTRL' could not be resolved main.c /mgmt-xmega line 13
Semantic Error
Field 'CTRL' could not be resolved main.c /mgmt-xmega line 16
Semantic Error
Field 'STATUS' could not be resolved main.c /mgmt-xmega line 14
Semantic Error
Symbol 'CCP_IOREG_gc' could not be resolved main.c /mgmt-xmega line
15 Semantic Error
Symbol 'CCP' could not be resolved main.c /mgmt-xmega line 15
Semantic Error
Symbol 'CLK_SCLKSEL_XOSC_gc' could not be resolved main.c /mgmt-xmega
line 16 Semantic Error
Symbol 'CLK' could not be resolved main.c /mgmt-xmega line 16
Semantic Error
Symbol 'OSC_FRQRANGE_12TO16_gc' could not be resolved main.c
/mgmt-xmega line 12 Semantic Error
Symbol 'OSC_XOSCCTRL' could not be resolved main.c /mgmt-xmega line
12 Semantic Error
Symbol 'OSC_XOSCEN_bm' could not be resolved main.c /mgmt-xmega line
13 Semantic Error
Symbol 'OSC_XOSCRDY_bm' could not be resolved main.c /mgmt-xmega line
14 Semantic Error
Symbol 'OSC_XOSCSEL_XTAL_16KCLK_gc' could not be resolved main.c
/mgmt-xmega line 12 Semantic Error
Symbol 'OSC' could not be resolved main.c /mgmt-xmega line 13
Semantic Error
Symbol 'OSC' could not be resolved main.c /mgmt-xmega line 14
Semantic Error
==================
Compiler sagt:
**** Build of configuration Release for project mgmt-xmega ****
make all
Building file: ../main.c
Invoking: AVR Compiler
avr-gcc -Wall -Os -fpack-struct -fshort-enums -std=gnu99 -funsigned-char
-funsigned-bitfields -mmcu=atxmega128a1 -DF_CPU=32000000UL -MMD -MP
-MF"main.d" -MT"main.d" -c -o "main.o" "../main.c"
Finished building: ../main.c
Building target: mgmt-xmega.elf
Invoking: AVR C Linker
avr-gcc -Wl,-Map,mgmt-xmega.map -mmcu=atxmega128a1 -o "mgmt-xmega.elf"
./main.o
Finished building target: mgmt-xmega.elf
Invoking: AVR Create Extended Listing
avr-objdump -h -S mgmt-xmega.elf >"mgmt-xmega.lss"
Finished building: mgmt-xmega.lss
Create Flash image (ihex format)
avr-objcopy -R .eeprom -O ihex mgmt-xmega.elf "mgmt-xmega.hex"
Finished building: mgmt-xmega.hex
Create eeprom image (ihex format)
avr-objcopy -j .eeprom --no-change-warnings --change-section-lma
.eeprom=0 -O ihex mgmt-xmega.elf "mgmt-xmega.eep"
Finished building: mgmt-xmega.eep
Invoking: Print Size
avr-size --format=avr --mcu=atxmega128a1 mgmt-xmega.elf
AVR Memory Usage
----------------
Device: atxmega128a1
Program: 610 bytes (0.4% Full)
(.text + .data + .bootloader)
Data: 0 bytes (0.0% Full)
(.data + .bss + .noinit)
Finished building: sizedummy
**** Build Finished ****
danke!