Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cogsandsquigs/twiboot

Twiboot is a Particle library that allows for interfacing with the Twiboot bootloader.
https://github.com/cogsandsquigs/twiboot

Last synced: about 1 month ago
JSON representation

Twiboot is a Particle library that allows for interfacing with the Twiboot bootloader.

Awesome Lists containing this project

README

        

# Twiboot

Twiboot is a Particle library that allows for interfacing with the Twiboot bootloader.
It is a simple library that allows for the flashing of a new firmware to a Twiboot-enabled device.

Examsple diagram of how an interaction between a Particle Argon and an ATmega chip w/ twiboot would go:

```mermaid
sequenceDiagram
Argon->m328p: SLA+W 0x00 STO (Stop program startup)
m328p-> Argon: ACK

loop Flashing pages of progam to the ATmega
Argon->m328p: SLA+W 0x02 0x01 <128 bytes to flash...> STO (flash bytes to page)
m328p->Argon: ACK
end

loop Gathering pages of data to verify w/ CRC32
Argon->m328p: SLA+W 0x02 0x01 (where to read flash)
m328p->Argon: ACK
Argon->m328p: SLA+R 128 STO (Read page bytes)
m328p->Argon: ACK
m328p->Argon:
Argon->m328p: ACK
end

note over Argon: Verifies data w/ CRC32

Argon->m328p: SLA+W 0x01 0x80 STO (Start the main app)
m328p->Argon: ACK

note over m328p: Starts the main app.
```

## Installation:

Make sure that your MCU of choice has [twiboot](https://github.com/orempel/twiboot) installed. A makefile
is included here, however, this is mainly for my own purposes (for custom-building twiboot) and is not
recommended for use outside of the loop-tracks project. It is recommended to use the makefile in the twiboot subfolder (it's a gitmodule of twiboot).