1
votes

If I connect an Arduino board via USB and open the terminal (OS X/Unix) and type in echo something > /dev/tty.usbmodem1411, it would send something to the board through that port. That's pretty cool, but what if I want to flash an entire .hex file? I don't think just echoing the contents would work. Are there any kind of parameters that I would need to use, etc?

Oh, I also do not want to use AVRDude. Without going too much into detail, I won't be able to install AVRDude on the computer I'd need this for.

Sorry if this question doesn't make complete sense. I'm new to Arduino and Unix in general.

1
Do you have a Python interpreter (or are you able to install it) on your machine?Aleksander Z.
Yes, @AleksanderZ., I do, but I would rather do this in C# and/or Swift, but if you have any suggestions, lemme know!crait
Take a look at this and this. The latter one is my repo, give a star ;). I can post an answer explaining how to interpret output of PyTmega if you like.Aleksander Z.
Thanks, @AleksanderZ.! I will look into both of those. If I need more help, I'll respond here. Perhaps we could discuss this further elsewhere, too.crait
There's one more document you may be intrested in: AVR061/doc2525 -- specification of the stk500v1 protocol that is used to establish communication between atmega 328p (more precisely: bootloader) and avrdude. On it's own it's not very useful, but it can help you understand what's going on in the output of PyTmegaBOOT168.Aleksander Z.

1 Answers

2
votes

In order to do this to work with the built-in Arduino bootloader you will need to reverse engineer the protocol used.

Since AVRDude is open source, I would start by looking at the source and determine if you can reduce it to your minimum requirements.