@Pert, I got it working but somebody reminded me of a drawback of this method.
Not everybody is always keen when he runs some other guy's script which pulls stuff from the internet and 'hides' it on his computer.
Though the arduino cli executable is in the same folder, and I could easily auto-delete it, it are these 2 steps which lead to the unwanted effects
arduino-cli core update-index
arduino-cli core install arduino:avr
As I provide the hex file myself I have no need for the compiler components which comes with arduino-cli. My first question: were I not to do these steps, I cannot compile.. but can I upload hex files with arduino-cli?
(it is a bit hard to test as I already have all these files somewhere on my PC and I have no clue where atm)
To solve the issue I enabled arduino IDE's verbose output for uploading to reverse-engineer an other script which simply runs AVR dude.
To remain 'independed' from per-installed tools. I copied the executable, avrdude.conf and libush0.dll to my local folder.
If I invoke the batch script from my local folder with:
avrdude -C avrdude.conf -v -patmega328p -carduino -PCOM9 -b115200 -D -Uflash:w:test.hex:i
It works perfectly fine, but I have a another question, which you probably know the awnser to.
I still want to 'import' avrdude.exe and the two supplementing files from somewhere on the internet.
Now I looked at this website to download avrdude from the internet.
link to sourceforgeClicking the download buttons, gives you a setup.exe. Were I to run this setup, it would install avrdude and... probably other things as well... somewhere else in program files or appdata or....
Now if I were to host my current avrdude.exe and the two supplementing (config + dll) files on my personal github page, would this executable work on all or most windows 10 PCs?
If this would work, my script would not have to install anything else in a different folder on one's PC.
And also, is it allowed to host this software on my own github page? And is a GPL licence text file required?
I don't know any details but it could possibly be, that this setup would do something to avrdude.exe or the dll which could be platform specific. So my executable would not work on every other W10 PC.
I looked into the config and that one merely holds information about the uControllers to which it can upload stuff to.
Kind regards,
bask185