LowPowerLab Forum

Software support => Wireless Programming (aka OTA) => Topic started by: Humancell on May 20, 2019, 07:23:45 PM

Title: Dual Optiboot Questions ...
Post by: Humancell on May 20, 2019, 07:23:45 PM
Hello,

I'm looking at the Dual Optiboot code, and have a few questions:


I appreciate any input and suggestions, or even links where I can read more on the best way to make these changes.  I'm about to fork the project on Github, and begin to make my edits.  I'm just trying to see if there is anything else that I need to account for that I might be missing.

Thanks in advance!
Title: Re: Dual Optiboot Questions ...
Post by: Felix on May 20, 2019, 08:07:53 PM
I think you're mostly wondering how to use make. There are extensive tutorials online.
To your Qs:

1) - I can't remember how everything was done. I just removed the old HEXes (non SPI_disable), so now they are not suffixed with SPI Disable anymore. SPI should be disabled after bootloader is done. Take a look at this changeset (https://github.com/LowPowerLab/DualOptiboot/commit/2171e07593dd521cf1086b68b18392791c449248) for the SPI disable.

2) The debug enable disable was done by passing on "DEBUG_ON" to make. This was only used during development and disabled for production binaries. It is done with putch('') as you can see in code.

3) Correct.
4) Pin definitions are in pin_defs.h (https://github.com/LowPowerLab/DualOptiboot/blob/master/pin_defs.h).
5) "make yourboard" but you have to add it to the makefile
Title: Re: Dual Optiboot Questions ...
Post by: Humancell on May 20, 2019, 11:11:00 PM
Hello,

Thank you for the reply.  I'm fairly familiar with make, and have been looking up the pieces that are unfamiliar.  Your responses are helpful in bridging some gaps.


This really is awesome code, and I'll make sure to incorporate any of your suggestions/answers and post here as I get something working.
Title: Re: Dual Optiboot Questions ...
Post by: Felix on May 21, 2019, 09:08:30 AM
DEBUG_ON ... yes that's the debug output toggle.
Yes, the pin defs for the SPI and atmega1284p are defined here (https://github.com/LowPowerLab/DualOptiboot/blob/master/Optiboot.c#L542).
You can define your own board pins if that's what you need.
The code is compilable, everything you need is already there, if you're familiar with make, spend a little time understanding the code and you should be all set.