FC V6 for AVR: Configuration of USB-programmer usbasp

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
GSteuerwald
Posts: 13
Joined: Sun Apr 04, 2010 7:35 pm
Location: Mannheim, Germany
Has thanked: 8 times
Been thanked: 5 times
Contact:

FC V6 for AVR: Configuration of USB-programmer usbasp

Post by GSteuerwald »

Hi,
in FC4 and 5 I used the mentioned USB-programmer usbasp sucessfully. I got the according batchfile avrc_asp.bat (some years ago) from Sean King. The location in FC4 and 5 was: ...\Tools\MX_bats\avrc_asp.bat
Now in FC6 the directory MX-bats is missing in my installation and thus I have put avrc_asp.bat under the directory batchfiles, but I get a failure message (wrong path).

I wonder that the readme.txt in the directory batchfiles mentions the directory MX-bats which is not available in my installation.

Default programmer settings for AVRISP are:
Location: <Flocode Path>\Tools\MX_bats\avrc.bat
Parameters: AVRDUDE %a %t "%D\%f.hex" "%f.hex" %cfg %c0 %c1 %c2 %c3

Default programmer settings for Arduino are:
Location: <Flocode Path>\Tools\MX_bats\avrc_arduino.bat
Parameters: %a stk500 com7 57600 "%f.hex"

Default programmer settings for Atmel FLIP bootloader are:
Location: <Flocode Path>\Tools\MX_bats\avrc_xplain.bat
Parameters: %T COM10 115200 "%f.hex"

Can somebody help me to find the right configuration for my usb-programmer. The batch file for the USBASP is attached.

Thanks in advance.
Gerhard Steuerwald
Attachments
avrc_asp.bat
Batchfile for USBASP-programmer
(1.51 KiB) Downloaded 423 times

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: FC V6 for AVR: Configuration of USB-programmer usbasp

Post by Benj »

Hello Gerhard,

The batch files for AVR in v6 now live here: "C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles"

Default programmer settings for AVRISP are:
Location: $(appdir)compilers\avr\batchfiles\avrc_asp.bat
Parameters, this might not be right!: AVRDUDE $(chipalt) $(chip:l) "$(outdir)$(target).hex" "$(target).hex" 0 $(cfg0) $(cfg1) $(cfg2) $(cfg3)

Do you have access to the v4/v5 parameters and I will convert these for you.

I'll add the asp batch file into the build so it gets placed into the batchfiles folder by default.

I'll also sort out the readme file so it is correct.

GSteuerwald
Posts: 13
Joined: Sun Apr 04, 2010 7:35 pm
Location: Mannheim, Germany
Has thanked: 8 times
Been thanked: 5 times
Contact:

Re: FC V6 for AVR: Configuration of USB-programmer usbasp

Post by GSteuerwald »

Hello Ben,
Thanks for helping again.
Here are the V5-parameters: AVRDUDE %a %t "%D\%f.hex" "%f.hex" %cfg %c0 %c1 %c2 %c3
Location: C:\Program Files\Flowcode(AVR)\v5\Tools\MX_bats\avrc_asp.bat
In addition I have attached a screenshot of the programmer screen.
Hope that is the information you need.

Best regards
Gerhard Steuerwald
Attachments
Screenshot_2014_08_21_23_35_04.jpg
Screenshot_2014_08_21_23_35_04.jpg (144.6 KiB) Viewed 7359 times

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: FC V6 for AVR: Configuration of USB-programmer usbasp

Post by Benj »

Hello Gerhard,

In that case my previous post should be correct.
Default programmer settings for AVRISP are:
Location: $(appdir)compilers\avr\batchfiles\avrc_asp.bat
Parameters: AVRDUDE $(chipalt) $(chip:l) "$(outdir)$(target).hex" "$(target).hex" 0 $(cfg0) $(cfg1) $(cfg2) $(cfg3)

GSteuerwald
Posts: 13
Joined: Sun Apr 04, 2010 7:35 pm
Location: Mannheim, Germany
Has thanked: 8 times
Been thanked: 5 times
Contact:

Re: FC V6 for AVR: Configuration of USB-programmer usbasp

Post by GSteuerwald »

Hello Ben,
no success so far.
I have compared the procedures of V6 and V5, but I can not find the reason for the failure message of V6. Maybe there is further problem.
I hope you can find something from the attached document.

Thanks and best regards
Gerhard Steuerwald
Attachments
Failure V6 compared to V5.txt
(7.59 KiB) Downloaded 300 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: FC V6 for AVR: Configuration of USB-programmer usbasp

Post by dazz »

Hi
Just found my USBasp so had a fiddle and used an arduino as a victim :lol:

The parameters Benj posted are absolutely spot on.
Had a look through the msg file you posted and realised as the path to the bat file was correct ,the only common thing left was the bat file itself. i've listed it below see if you can spot the issue, it kinda jumps out and smacks you in the face with a wet fish. :)

Code: Select all

@REM -------------- AVRDUDE programmer --------------

@SET Fuse1=
@SET Fuse2=
@SET Fuse3=


@REM %6 is the flag to send fuse data instead of the program
@IF "%6"=="1" GOTO Config


:ProgFlash
@SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %2 -P %DUDEPort% -c %Programmer% -U flash:w:%5
@SHIFT
@GOTO Send


:Config
@SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %2 -P %DUDEPort% -c %Programmer% -u

@REM %7 is the number of fuses present
@IF "%7"=="1" GOTO ConfigOneFuse
Ok lets look a bit more closer and see if we can work out why it doesnt work

Code: Select all

:ProgFlash
@SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %2 -P %DUDEPort% -c %Programmer% -U flash:w:%5
@SHIFT
@GOTO Send


:Config
@SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %2 -P %DUDEPort% -c %Programmer% -u

Yup the old config was written for Flowcode V5 and we need a v6 one, so make a copy of the file in your v6/compiler/avr/batchfiles (or wherever it is on your system), once done rename the file just add a 6 befor the .bat so you can distinguish betwixt v5 and v6 bat file


now simply replace

Code: Select all

\AVRDUDEusb\avrdude.exe"
with this

Code: Select all

\bin\avrdude.exe"
and it should work my msg file attached after hitting compile button.

let us know how you get on, if you need more help please attach an msg file and you modified Bat file
i appologise if my post is at a simple level but i posted that way so others have the opportunity to learn

Regards

Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

GSteuerwald
Posts: 13
Joined: Sun Apr 04, 2010 7:35 pm
Location: Mannheim, Germany
Has thanked: 8 times
Been thanked: 5 times
Contact:

Re: FC V6 for AVR: Configuration of USB-programmer usbasp

Post by GSteuerwald »

Hello Dazz,

now it works, thank you very much. I really appreciate this good support - even at the weekend. :D

Also many thanks to Ben and I hope the usbasp-batchfile avrc_asp6.bat will be integrated in the next version.


Best regards from Mannheim / Germany
Gerhard Steuerwald
Attachments
Failure V6 fixed.txt
(8.03 KiB) Downloaded 329 times

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: FC V6 for AVR: Configuration of USB-programmer usbasp

Post by dazz »

HI
Thank you for getting back and letting us know it works

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Post Reply