Ich habe mit die Trial von Flowcode 6 geladen um zu testen was so alles möglich ist. Jetzt scheitere ich an einer einfachen RS232 Schnittstelle. Habe sie aufs Dashboard bezogen und parametriert. Allerdings bringt mir der Compiler jedes mal eine Fehlermeldung.
Target folder: C:\Users\DWIECK~1\DOCUME~1
Source name: C:\Users\dwiecklein\Documents\Flowcode1.fcfx
Title:
Description:
Device: AVR.ATMEGA.ATMEGA32U4
Generated by: Flowcode v6.1.0.0
Date: Friday, December 19, 2014 06:28:23
Users: 0
Registered to: #################
Licence key: ##########
NICHT FÜR KOMMERZiELLE ANWENDUNGEN
http://www.flowcode.co.uk
Start des Compilers...
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avra.bat atmega32u4 "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.elf" "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.c" "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.lst"
Launching compiler...
C:\Users\DWIECK~1\DOCUME~1>"C:\PROGRA~2\FLOWCO~1\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega32u4 -Os -funsigned-char -o "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.elf" "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.c" -lm
..
In file included from C:\Program Files (x86)\Flowcode 6\CAL\includes.c:229,
from C:\Users\DWIECK~1\DOCUME~1\Flowcode1.c:428:
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_PWM.c:321:9: warning: #warning "PWM Channel Uses Resource Timer 4"
In file included from C:\Program Files (x86)\Flowcode 6\CAL\includes.c:563,
from C:\Users\DWIECK~1\DOCUME~1\Flowcode1.c:428:
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_Init_1':
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:605: error: 'UCSR0A' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:605: error: (Each undeclared identifier is reported only once
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:605: error: for each function it appears in.)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:606: error: 'UCSR0B' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:623: error: 'UBRR0L' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:624: error: 'UBRR0H' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:626: error: 'RXEN0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:627: error: 'TXEN0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:652: error: 'RXCIE0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_Uninit_1':
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:966: error: 'UCSR0A' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:967: error: 'UCSR0B' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_Send_1':
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1072: error: 'UCSR0A' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1072: error: 'UDRE0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1079: error: 'UDR0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_Receive_1':
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1274: error: 'UCSR0A' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1274: error: 'RXC0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1368: error: 'FE0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1371: error: 'UDR0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1378: error: 'DOR0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_UpdateBaud_1':
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1869: error: 'UCSR0A' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1870: error: 'UCSR0B' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1887: error: 'UBRR0L' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1888: error: 'UBRR0H' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1890: error: 'RXEN0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1891: error: 'TXEN0' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:1911: error: 'RXCIE0' undeclared (first use in this function)
Error returned from [avr-gcc.exe]
.
Completed compilation, return = 1
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avra.bat Hat den Fehlercode 1 gemeldet
BEENDET
Hier noch die eingestellten Parameter an der RS232:
rs232 para.JPG (46.76 KiB) Viewed 23884 times
Wenn ich "Channel" auf "Software" kann ich zwar compilieren und auf den Chip laden allerdings funktioniert die RS232 trotzdem nicht.
Habe auch schon ein kleines Programm mit der Arduino IDE geschrieben da funktioniert die RS232 tadellos.
Es scheint, dass Atmel haben sich für Übereinkünften auf diesem Gerät und der Anzahl der Peripheriegeräte von 1 zu brechen und nicht von 0. Ich werde sehen, ob ich es zu beheben.
Hello Christoph,
It appears that Atmel have chosen to break convention on this device and number the peripherals from 1 rather than from 0. I'll see if I can fix it.
Die angehängte Datei hoffentlich beheben das Problem . Es muss in dieses Verzeichnis auf Ihrem System aufgestellt werden - "C:\Program Files (x86)\Flowcode 6\compilers\avr\avr\include\avr"
The attached file should hopefully fix the issue. It needs to be placed into this directory on your system - "C:\Program Files (x86)\Flowcode 6\compilers\avr\avr\include\avr"
I have tried your file. FC is now able to compile and burn the program to the chip, but the RS232 connection isn't working. After programming is finished the arduino chip does not apear is the systemcontrols as a COM port.
The Micro and Leonardo have a slightly none standard Arduino USB setup. On a Uno or Mega there is a USB chip which sets up the virtual serial port connection and then allows your micros UART data to stream data via the connection. On the Micro and Leonardo you have to do the USB connection yourself so it has nothing to do with the UART. The USB Serial component in Flowcode should allow this functionality but this has not yet been upgraded to work on AVR devices. It is on the list though so hopefully it will get ticked off soon and allow this to work.
The Nano will work as your expecting so maybe this could be a suitable replacement for now?