Flowcode 6 Probleme mit Arduino Micro und RS232

Support-Forum für Deutschsprachige, die in ihrer Muttersprache schreiben möchten.

Moderator: Benj

Post Reply
schorchotto
Posts: 3
Joined: Thu Dec 18, 2014 8:20 pm
Contact:

Flowcode 6 Probleme mit Arduino Micro und RS232

Post by schorchotto »

Hallo zusammen,

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.

Code: Select all

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.matrixtsl.com
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
rs232 para.JPG (46.76 KiB) Viewed 14500 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.

Ich hoffe es kann mir Jemand helfen.

Gruß
Christoph

Rudi
Posts: 666
Joined: Mon Feb 10, 2014 4:59 am
Has thanked: 493 times
Been thanked: 187 times

Re: Flowcode 6 Probleme mit Arduino Micro und RS232

Post by Rudi »

happy new year chrostoph

hang doch mal dein flowchart ran,
du nutzt auch PWM?

"PWM Channel Uses Resource Timer 4"

pls, attach your flowchart for detailed help.
you are using PWM?

best wishes
rudi ;-)

schorchotto
Posts: 3
Joined: Thu Dec 18, 2014 8:20 pm
Contact:

Re: Flowcode 6 Probleme mit Arduino Micro und RS232

Post by schorchotto »

Hi Rudi,
happy new year for you too.

Here is the flowchart
fc1.JPG
(49.12 KiB) Downloaded 6094 times
fc2.JPG
fc2.JPG (20.46 KiB) Viewed 14427 times
Hopefully that helps. thanks.

christoph

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Flowcode 6 Probleme mit Arduino Micro und RS232

Post by Benj »

Hallo Christoph ,

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.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Flowcode 6 Probleme mit Arduino Micro und RS232

Post by Benj »

Hallo,

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"
iom32u4.h
(28.49 KiB) Downloaded 699 times

Hello,

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"
iom32u4.h
(28.49 KiB) Downloaded 699 times

schorchotto
Posts: 3
Joined: Thu Dec 18, 2014 8:20 pm
Contact:

Re: Flowcode 6 Probleme mit Arduino Micro und RS232

Post by schorchotto »

Hello Benj,

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.

Code: Select all

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, January 09, 2015 20:03:05
Users:         0
Registered to: ****
Licence key:  ****
   NICHT FÜR KOMMERZiELLE ANWENDUNGEN
http://www.matrixtsl.com
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"

C:\Users\DWIECK~1\DOCUME~1>"C:\PROGRA~2\FLOWCO~1\COMPIL~1\avr\BATCHF~1\..\bin\avr-objdump.exe" -S "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.elf"  1>"C:\Users\DWIECK~1\DOCUME~1\Flowcode1.lst" 

C:\Users\DWIECK~1\DOCUME~1>"C:\PROGRA~2\FLOWCO~1\COMPIL~1\avr\BATCHF~1\..\bin\avr-size.exe" -B -d "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.elf" 
   text	   data	    bss	    dec	    hex	filename
   6080	      0	     50	   6130	   17f2	C:\Users\DWIECK~1\DOCUME~1\Flowcode1.elf

Compilation successful!
Completed compilation, return = 0

Start von Linker/Assembler...
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avrb.bat  "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.elf" "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.hex" "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.cof"

C:\Users\DWIECK~1\DOCUME~1>"C:\PROGRA~2\FLOWCO~1\COMPIL~1\avr\BATCHF~1\..\bin\avr-objcopy" -O ihex -R .eeprom  "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.elf" "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.hex" 

HEX file creation successful!

C:\Users\DWIECK~1\DOCUME~1>"C:\PROGRA~2\FLOWCO~1\COMPIL~1\avr\BATCHF~1\..\bin\avr-objcopy" -O coff-avr -R .eeprom  "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.elf" "C:\Users\DWIECK~1\DOCUME~1\Flowcode1.cof" 

COFF file creation successful!

Start des Programmers...
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avrc_arduinoA.bat  atmega32u4 avr109 com16 57600 "Flowcode1.hex"

C:\Users\DWIECK~1\DOCUME~1>"C:\PROGRA~2\FLOWCO~1\COMPIL~1\avr\BATCHF~1\..\bin\avrdude.exe" -p atmega32u4 -P com16 -b 57600 -c avr109 -U flash:w:"Flowcode1.hex"                      

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude.exe: Device signature = 0x1e9587
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
..
avrdude.exe: reading input file "Flowcode1.hex"
avrdude.exe: input file Flowcode1.hex auto detected as Intel Hex
avrdude.exe: writing flash (6080 bytes):

Writing | ################################################## | 100% 0.51s

avrdude.exe: 6080 bytes of flash written
avrdude.exe: verifying flash memory against Flowcode1.hex:
avrdude.exe: load data flash data from input file Flowcode1.hex:
avrdude.exe: input file Flowcode1.hex auto detected as Intel Hex
avrdude.exe: input file Flowcode1.hex contains 6080 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 0.11s

avrdude.exe: verifying ...
avrdude.exe: 6080 bytes of flash verified

avrdude.exe done.  Thank you.


Programming successful!


BEENDET


User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Flowcode 6 Probleme mit Arduino Micro und RS232

Post by Benj »

Hello,

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?

Post Reply