First time Arduino

For general Flowcode discussion that does not belong in the other sections.
Xbeejunior
Posts: 12
http://meble-kuchenne.info.pl
Joined: Sun Mar 12, 2023 10:24 am
Has thanked: 5 times
Been thanked: 1 time

Flowcode v10 First time Arduino

Post by Xbeejunior »

Hi, I'm trying to program an Arduino Micro in FC10, but I always get the error message>>>
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avrc_arduinoA.bat Reported error code 0x1.

The Com Port is selected correctly and is also displayed!
I installed the Arduino drivers "dpinst-64-bit_installer.exe" and the Arduino Micro is only connected via a USB cable.
AVRISPmkII is selected in the compiler options, so I don't know if that's just for the programming device?
In the program I only inserted a delay because I just want to establish a connection!

Grateful for hints
greeting

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: First time Arduino

Post by medelec35 »

Hello.
I can see you mentioned FC10.
We recommend that you edit your initial topic post and select the v9 or v10 post icon, I have done that for you.
Can you post your project file that ends with fcfx and your compiler message file that has the .msg.txt extension?
Xbeejunior wrote:
Sat Mar 25, 2023 1:04 pm
AVRISPmkII is selected in the compiler options, so I don't know if that's just for the programming device?
The compiler options are automatically handled for Arduino devices, so can be left on the default E-Blocks setting.
Xbeejunior wrote:
Sat Mar 25, 2023 1:04 pm
and the Arduino Micro is only connected via a USB cable.
Yes that is correct, all the programming is done via the USB cable.

What happens if you select Build > Compile to Hex?
Does it still fail with an error?
Martin

Xbeejunior
Posts: 12
Joined: Sun Mar 12, 2023 10:24 am
Has thanked: 5 times
Been thanked: 1 time

Flowcode v10 Re: First time Arduino

Post by Xbeejunior »

Hello Martin,

Thanks for your quick reply, attached are the files.....
Attachments
Flowcode3.msg.txt
(5.33 KiB) Downloaded 290 times
Flowcode3.fcfx
(6.92 KiB) Downloaded 285 times

chipfryer27
Valued Contributor
Posts: 1688
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: First time Arduino

Post by chipfryer27 »

Hi

Compiles to Hex fine for me.

My compilers are as below:-

Capture.PNG
Capture.PNG (38.25 KiB) Viewed 3090 times

Hope this helps.
Regards

Xbeejunior
Posts: 12
Joined: Sun Mar 12, 2023 10:24 am
Has thanked: 5 times
Been thanked: 1 time

Re: First time Arduino

Post by Xbeejunior »

Hi!
looks the same for me, I just installed the AVR toolchain.
Thanks and regards

Xbeejunior
Posts: 12
Joined: Sun Mar 12, 2023 10:24 am
Has thanked: 5 times
Been thanked: 1 time

Re: First time Arduino

Post by Xbeejunior »

Yes, Compiles to Hex is fine for me too

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: First time Arduino

Post by medelec35 »

Hello, your welcome
The issue can be seen in these lines within your .msg.txt file:

Code: Select all

C:\Users\Ralf\Desktop\Flowcode 10>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avrdude.exe" -patmega32u4 -PCOM4 -b57600 -cavr109 -D -Uflash:w:"Flowcode3.hex"                      
avrdude.exe: ser_open(): can't open device "\\.\COM4": Das System kann die angegebene Datei nicht finden.
Is there something else that could be taking over the port e.g a serial terminal program like Putty or Tera Term etc?
Something for you to try.
Close Flowcode and all other app on your PC.
Unplug the micro, then plug it back in to the USB
Run Flowcode again and make sure the correct port is selected within Build > Project Options > Programmer Port and try again.
It might be best to check your windows device manager to make sure the comport for Mico is created and removed each time its connected and disconnected to the USB.
Do you get any popup warning messages which sending to target?

It should not be necessary to install the toolchain as according to the msg.txt file it's already installed.

Code: Select all

:\Users\Ralf\Desktop\Flowcode 10>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-objcopy" -O ihex -R .eeprom  "C:\Users\Ralf\Desktop\Flowcode 10\Flowcode3.elf" "C:\Users\Ralf\Desktop\Flowcode 10\Flowcode3.hex" 

HEX file creation successful!
Martin

Xbeejunior
Posts: 12
Joined: Sun Mar 12, 2023 10:24 am
Has thanked: 5 times
Been thanked: 1 time

Re: First time Arduino

Post by Xbeejunior »

"Arduino Micro (Com4)" shows up in the program manager and disappears when I unplug the USB cable from the Arduino and also shows up again when I plug it in!
The correct port is also set, no terminal program is running either, again had no success

Xbeejunior
Posts: 12
Joined: Sun Mar 12, 2023 10:24 am
Has thanked: 5 times
Been thanked: 1 time

Re: First time Arduino

Post by Xbeejunior »

I get the popup message when compiling how to connect the arduino and then to press the reset button...
but then after a short time it continues on its own and tries to connect to the programmer, then the following messages:
Connecting to programmer: .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

avrdude.exe: ser_send(): write error: sorry no info avail

Error returned from [avrdude]

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avrc_arduinoA.bat Hat den Fehlercode 0x1 gemeldet

Autoclose turned off

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: First time Arduino

Post by medelec35 »

Sorry, I have not got a Micro to try, but I do have a nano that also has a reset button.
I don't need to press it for it to be successfully programmed.
Have you tried not pressing the button as well as pressing the button during programming?
Martin

Post Reply