Page 1 of 3

First time Arduino

Posted: Sat Mar 25, 2023 1:04 pm
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

Re: First time Arduino

Posted: Sat Mar 25, 2023 1:18 pm
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?

Re: First time Arduino

Posted: Sat Mar 25, 2023 1:33 pm
by Xbeejunior
Hello Martin,

Thanks for your quick reply, attached are the files.....

Re: First time Arduino

Posted: Sat Mar 25, 2023 1:52 pm
by chipfryer27
Hi

Compiles to Hex fine for me.

My compilers are as below:-

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

Hope this helps.
Regards

Re: First time Arduino

Posted: Sat Mar 25, 2023 2:00 pm
by Xbeejunior
Hi!
looks the same for me, I just installed the AVR toolchain.
Thanks and regards

Re: First time Arduino

Posted: Sat Mar 25, 2023 2:08 pm
by Xbeejunior
Yes, Compiles to Hex is fine for me too

Re: First time Arduino

Posted: Sat Mar 25, 2023 2:18 pm
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!

Re: First time Arduino

Posted: Sat Mar 25, 2023 2:33 pm
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

Re: First time Arduino

Posted: Sat Mar 25, 2023 2:37 pm
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

Re: First time Arduino

Posted: Sat Mar 25, 2023 3:15 pm
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?