Page 1 of 1

FC V6 for AVR: Configuration of USB-programmer usbasp

Posted: Wed Aug 20, 2014 10:49 pm
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

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

Posted: Thu Aug 21, 2014 9:46 am
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.

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

Posted: Thu Aug 21, 2014 10:52 pm
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

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

Posted: Fri Aug 22, 2014 12:15 pm
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)

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

Posted: Fri Aug 22, 2014 9:50 pm
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

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

Posted: Sat Aug 23, 2014 1:12 pm
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

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

Posted: Sat Aug 23, 2014 9:06 pm
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

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

Posted: Sat Aug 23, 2014 9:20 pm
by dazz
HI
Thank you for getting back and letting us know it works

Regards
Dazz