0

Can optiLoader be used to burn custom hex?

For example, there's hex representation stored in optiLoader.ino in image_328, if that value is replaced with content of my pre-compiled hex, should that work right out of the box or some additional tweaking is needed?

EDIT

Discussion about the same topic on arduino forum as well.

  • ISP is for writing hex. bootloader or program or booth together. why do you want to use optiload? AVRISP sketch in IDE examples does it too. – Juraj Mar 14 '18 at 17:53
  • 2
    The reason why I want to use it is because I want to try it without IDE, basically without computer. So I just want to write firmware on new blank IC by pressing a button from my proto board. AVRISP in should work as well, but I feel like I will have to change much more code in order to make it to work without IDE, because it's using Serial to get data and pass it to target IC, right? ...and if optiLoader works as I thought above, then I can just simply replace HEX content with my. – ShP Mar 14 '18 at 17:57
  • ISP is not Serial. ISP uses SPI connection – Juraj Mar 14 '18 at 18:18
  • It does but only to talk with target IC, but communication between programmer IC and IDE is done via serial. – ShP Mar 14 '18 at 18:20
  • @Juraj BTW I was referring to these methods getch and avrisp in that ArduinoISP sketch. – ShP Mar 14 '18 at 18:26
1

Yes, it should work provided that your desired target image is stored in the same form, with correct metadata, and that it is small enough to fit in the programmer device.

The storage format of the payload-to-program could be made more optimal by a factor of almost two; however, for the original purpose of injecting compact Arduino-style bootloaders that is scarcely needed, and would have made preparing payloads more complicated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.