Ok, that AVR dude command brings me closer. So can I ask
The .hex file generated from the IDE. I take it that is without the bootloader.
It seems that something gets run on the yun as its uploaded. some kind of merge with bootloader instruction
Will the command run-avrdude PATH_TO_HEX just flash the exact hex as is and will it just run. does it need anything else
Secondly as the IDE seems to know that a yun with bootloader would have only 28k, is there a way of amending to boards.txt file so that the ide allows it to compile a 32k sketch. i.e the ide will know that 32k is the maximum free memory size of the yun without bootloader. I can then in theory just take the hex file and run run-avrdude PATH_TO_HEX and get my 32k firmware onto the yun via usb
IDE calls merge-sketch-with-bootloader.lua before run-avrdude
merge-sketch-with-bootloader.lua will add the bootloader section to the sketch given as first argument
so just mounting the usb with the hex file on it and running run-avrdude PATH_TO_HEX will flash the 32u4 with just the sketch no bootloader at all.
Ok
Question 1.) will the sketch then run or does it need a bootloader at all
Question 2.) How do we amend the ide to allwo it to compile a sketch of 32k. I assume at the moment there is something probably in boards.txt which says. You can only fit 28k in because I have to leave space for the bootloader
From another post on the forum. Would love some confirmation on whether 32768 is the correct maximum value for the Yún or if its something more obscure for some other reason.
Step 1.) Edit the board.txt file to add another Yún called Arduino Yún - 32k
The line determinining the maximum program memory for the yun seems to be yunB.upload.maximum_size=32768
Insert the parts between the #'s into the boards.txt file