A bootloader to bootstrap a bootloader

Started by TomWS, October 13, 2015, 08:20:10 AM

TomWS

Quote from: joelucid on October 14, 2015, 12:59:20 PM
I couldn't flash the page that contained writePage using writePage.
Isn't it true that you can flash the page, but only if the code within the writePage function doesn't change or move?

Tom

joelucid

QuoteIsn't it true that you can flash the page, but only if the code within the writePage function doesn't change or move?

Well you have to erase the page before you can program it. That makes it kind of tough  ;)

executivul

About the bootloader and sketch using the same network, can't we write the network config to the onboard EEPROM and be read from there by both of them?
It would require 18bytes (netid, nodeid, key).

joelucid

QuoteAbout the bootloader and sketch using the same network, can't we write the network config to the onboard EEPROM and be read from there by both of them?

I wouldn't want to do it that way since it would limit the set of applications that can be deployed using the bootloader. I think the correct approach is to store the network config in flash. Given that the bootstrap bootloader would support writing to flash it would be possible to modify these settings.

A concern here is this: the nice part about Felix pre-loading a bootstrap bootloader is that you don't need to program it using an ISP programmer to change the bootloader. That's nice because (a) you don't need the programmer and (b) you don't need to solder on any headers. If the only way to load and configure a wireless bootloader is via serial then (a) still holds, but you need at least the FTDI header.

One way to work around that would be to bundle Moteinos with a bootloader that can talk via serial or wireless. Which means initially when the network config isn't yet set the gateway would have to listen on a well known network config. As next step the customer would probably replace the bootstrap bootloader with either Optiboot or the fully configured wireless bootloader.

This would also help Felix since he could test Moteinos wirelessly without any hookup before shipping.

Joe