PlatformIO Community

Upload using programmer usbasp


#1

Hi
I have a programmer from jyetech.com connected to my windows 10 pc and the driver is loaded correctly.
Im trying to load marlin firmware to my generation7 electronics reprap board atmega 1284P but it does not upload using the programmer,instead it tries to use megaatmega2560.I have tried the upload and the program option from terminal with same result.Usually in arduino its just a case of upload using programmer and it works.Im a novice with platformio so not sure what im doing wrong here.Any ideas will be appreciated.


#2

Have you set usbasp as your programmer? i.e. have you put in an upload_protocol directive in your platformio.ini?

Since I have mine open atm… This programs a bare atmega328 with 8Mhz crystal on a breadboard with a USBasp when I click the ‘upload using programmer’ for that profile… (build_flags and lib_deps being project specific).
image

More info here:
https://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer


#3

hi
thank you for the reply.i have only added the following to my platformio.ini
[env:usbasp]
platform = atmelavr
framework = arduino
upload_protocol = usbasp
; each flag in a new line
upload_flags =
-Pusb
as mentioned im a noob with platformio so still not sure what i am missing


#4

Where is the board = XX definition? You need either 1284p16m or 1284p8m depending on 5V 16MHz or 3.3V 8Mhz version (see https://platformio.org/boards). Also what exact programmer do you use and how do you connect it to the board?


#5

i will add the board definition accordingly.The programmer i am using is this one https://jyetech.com/Products/073/e073.php
it is detected as usbasp