Mega 2560 error

For general Flowcode discussion that does not belong in the other sections.
Post Reply
TWPC
Posts: 20
http://meble-kuchenne.info.pl
Joined: Thu Mar 30, 2023 1:51 pm
Has thanked: 3 times

Flowcode v10 Mega 2560 error

Post by TWPC »

Hi all,

Trying to compile a flowcode program to a arduino mega 2560. when i compile to my R3's it works with no errors and program functions correctly. when i compile the mega i get this error. does anyone have any thoughts to what it means?
------------


HEX file creation successful!

Using FCD settings for programmer
Launching the programmer...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avrc_arduinoB.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" m2560 stk500v2 COM8 115200 "OneWire_Device_ID_Serial.hex"

C:\Users\The Box\Desktop\FC & Arduino demos\FC_test_demo_projects>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B69041072C26934F62BA2AD18E3139D88C14D79B7332D7455FC12D75A8268EAA28F070F6A4CCB7873802B223E4F4A1008A35919A0D46BD3B6AACB92DE4D84759EBB5079CA9DA2D2BBCDAE2A4D1C56CD1580BF51EB2672309F38B5BC562FCC8E801D34E93AC09C2DF3FF9CFA1C49DFB795D4181815DC88F96A50A238E0C4F48DEC430F3F09E4231F1B2C67DEC5EE0FB715C5DEC1E3E13575D5C99951E93D9EE0D2D0D01E24CC4F36E72E45E2C3050DA273BE4EE525EEC0800A860A656116A2EFD2D48328B23C29D3751446561112B2378F6127E5D3A7ED706D09BBA

C:\Users\The Box\Desktop\FC & Arduino demos\FC_test_demo_projects>REM REVISION: 1.0

C:\Users\The Box\Desktop\FC & Arduino demos\FC_test_demo_projects>REM GUID: 67C6936B-1A8D-4957-91C9-AE352304F2B6

C:\Users\The Box\Desktop\FC & Arduino demos\FC_test_demo_projects>REM DATE: 08\08\2022

C:\Users\The Box\Desktop\FC & Arduino demos\FC_test_demo_projects>REM DIR: FCD\AVR\batchfiles\avrc_arduinoB.bat

C:\Users\The Box\Desktop\FC & Arduino demos\FC_test_demo_projects>"C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\..\bin\oldavrdude\avrdude.exe" -p "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" -P stk500v2 -b COM8 -c m2560 -U flash:w:115200
The system cannot find the path specified.

Error returned from [avrdude]

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avrc_arduinoB.bat reported error code 0x3

Autoclose turned off


FINISHED
Kind regards,
Leon

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Mega 2560 error

Post by Steve-Matrix »

Thanks for reporting this. It looks like there is a problem with some of the batch files for the alternative programmers for the AVR. We will get this fixed asap.

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Mega 2560 error

Post by Steve-Matrix »

Looking at this again, your are using the avrc_arduinoB.bat as the programmer within Compiler Options. Another batch file (perhaps the default one) might be better. You could try experimenting with a different compiler setting or programmer batch file (and/or parameters). If this doesn't help, what Compiler Options are you using for this project?

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Mega 2560 error

Post by Steve-Matrix »

Sorry - ignore my previous post. It looks to be a problem with the Arduino Mega 2560 FCD file and not your Compiler Options settings.

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Mega 2560 error

Post by medelec35 »

Hello.
Can you please try this.
With your ATMEGA2560 connected to your PC.
Download xLoader from here
Export to a folder of your choice.
Run XLoader.exe, and set to the ATMEGA2560.
Select the correct comm port.
Click on the three dots, next to the Hex a file window, select the Flowcode generated Hex file.
Click-on Upload and hopefully your ATMEGA2560 will be successfully programmed.
Martin

TWPC
Posts: 20
Joined: Thu Mar 30, 2023 1:51 pm
Has thanked: 3 times

Re: Mega 2560 error

Post by TWPC »

Hi Martin

Thank you for your reply, indeed that worked, and functions correctly. is there any solution to be able to compile within FC? is it something i am doing or need to change in settings?

thanks
Kind regards,
Leon

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Mega 2560 error

Post by Steve-Matrix »

The compilation within Flowcode is working and it is the uploading of the HEX file to the target that is failing.

So keep using Flowcode as you have been but instead of clicking "Compile to Target" you should click "Compile to HEX" and then use the instructions from Martin to upload the HEX file.

TWPC
Posts: 20
Joined: Thu Mar 30, 2023 1:51 pm
Has thanked: 3 times

Re: Mega 2560 error

Post by TWPC »

Apologies, i should have been more clear. What i meant by compiling is the process of compiling to target. Is this issue something that needs to be patched or is it something i can do to fix on my end.
Kind regards,
Leon

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Mega 2560 error

Post by Steve-Matrix »

Here's something you could try. Replace the contents of the "avrc_arduinoB.bat" in your "%PROGRAMDATA%\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles" folder with the contents of the attached text file and then reload Flowcode and try "Compile to HEX".

Flowcode may complain or ask to download a new batch file. Ignore this.

I don't have any devices here so I can't check myself. But this might work for you. If this does work, please let us know and we will update the library files.

If this doesn't work, then you will probably need to use that workaround.
Attachments
avrc_arduinoB.txt
(1.68 KiB) Downloaded 50 times

TWPC
Posts: 20
Joined: Thu Mar 30, 2023 1:51 pm
Has thanked: 3 times

Re: Mega 2560 error

Post by TWPC »

Hi Steve, thanks for the suggestion.

Tried the file and no luck. It didn't ask to download a new batch file but proceeded as normal. It came up with this error below.

Not to worry, i'll carry on with the workaround from earlier. thanks for your help,

Have a good weekend,
Leon




Compilation successful!

Using FCD settings for linker
Launching the linker/assembler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avrb.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" "C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects\OneWire_Device_ID_Serial.elf" "C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects\OneWire_Device_ID_Serial.hex" "C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects\OneWire_Device_ID_Serial.cof"

C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B69041F19754DEA3580B6825E5D6A5C09874F305C640EF477B79E0C7881D2E5EEC9BD69A0D46BD3B6AACB92DE4D84759EBB5079CA9DA2D2BBCDAE2A4D1C56CD1580BF5202CD64388F0AF24F175A82BBF7DF194C31451F662291FA2302B8E00B0793B98DE54674FED6890F09D29E6D6AF5F4CDA2A0B069D1A731E4BF7CAEBD6A00B6313A3554E78FBF27EB2E2AB377A2B2C9B1D3B75C13EB27ADD422C3050DA273BE4EEA03AAF1B2D5E9A8C92AFCC9691A050BCD9E1A3B49732FB7C850400E5B608E745107C571680B732A8

C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects>REM REVISION: 1.0

C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects>REM GUID: C4F77EBB-EDB0-4261-B01E-F0B1AB94E03A

C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects>REM DATE: 08\08\2022

C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects>REM DIR: FCD\AVR\batchfiles\avrb.bat

C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-objcopy" -O ihex -R .eeprom "C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects\OneWire_Device_ID_Serial.elf" "C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects\OneWire_Device_ID_Serial.hex"

HEX file creation successful!

Using FCD settings for programmer
Launching the programmer...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avrc_arduinoB.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" m2560 stk500v2 COM4 115200 "OneWire_Device_ID_Serial.hex"
'Arduino' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.

C:\Users\Sky\Desktop\TheBox File backup\FC & Arduino demos\FC_test_demo_projects>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avrdude.exe" -pm2560 -PCOM4 -b115200 -cstk500v2 -D -F -Uflash:w:"OneWire_Device_ID_Serial.hex"
. .

avrdude.exe: stk500v2_ReceiveMessage(): timeout
. . .

avrdude.exe: stk500v2_ReceiveMessage(): timeout
. . .

avrdude.exe: stk500v2_ReceiveMessage(): timeout
. . .

avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_ReceiveMessage(): timeout
. . . . . . .

avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer

. . .

avrdude.exe: stk500v2_ReceiveMessage(): timeout
. . .

avrdude.exe: stk500v2_ReceiveMessage(): timeout

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avrc_arduinoB.bat reported error code 0xFF

Autoclose turned off


FINISHED
Kind regards,
Leon

Post Reply