I created a json file in a board folder. I am able to use the board declare in the json.
My issue is the following, I don’t know if it is possible to remove all the board and upload declaration.
And if it is possible how ?
I make research and it seems that the easiest implementation would be by using a python script. Is there another way to use custom avrdude upload protocol whitout writing it in ini with all the flag.
Maybe I have missed something in the documentation ?
Isn’t that the standard upload configuration? That is already set at
so I don’t think you need that upload_x flags, except for upload_speed = 9600 at all.
You can put some of these options in the board JSON but not all. E.g., build_flags can be done via extra_flags, upload_protocol via protocol, upload_speed via spede, f_cpu via f_cpu, but not board_hardware.oscillator = external and the others.
Thanks I made some tests by putting with speed in the json but it didn’t worked.
It may be because arduino protocol overwrite my 9600 baud for upload speed.
I will try some of the hint you gave me.
I agree about the fact that my custom protocol is almost standard but i didn’t understand everything.My project used to be on arduino with a programmer via AVRISP mkII.
So I used the env [env:program_via_AVRISP_mkII] from documentation : Atmel AVR — PlatformIO latest documentation
Except that stk500v2 wasn’t working so I have used arduino instead.
No, that should not be the case. Execute the project task “Advanced → Verbose Upload” to see the exact avrdude invocation. It should contain the -b 9600 flag if the upload speed is set up correctly, either via the platformio.ini or a custom board definition (which you must also refer to with the board = <name of json file> directive).
I will look more deeply into them to understand what they were supposed to do.
I look more deeply on how upload and bootloader work with atmega board.
Apparently by writing that the board is a atmega, it will automaticaly go for tool avrdude