riotboot as a serial bootloader
More...
riotboot as a serial bootloader
- Author
- Benjamin Valentin benja.nosp@m.min..nosp@m.valen.nosp@m.tin@.nosp@m.ml-pa.nosp@m..com
Definition in file serial.h.
Go to the source code of this file.
◆ RIOTBOOT_CMD_BOOT
#define RIOTBOOT_CMD_BOOT 'b' |
riotboot commands Commands typically have the format [type|length|value] where type and length are one byte and value is $length bytes.
Commands are signed with a CRC-8 checksum that is calculated over the entire record. The Checksum is not part of length. start application. parameter:
- '
': launch default application
- '0' : launch slot 0
- '1' : launch slot 1
Definition at line 45 of file serial.h.
◆ RIOTBOOT_CMD_ERASE
#define RIOTBOOT_CMD_ERASE 'e' |
erase page parameter:
- length of page number (8 bit - should be 4)
- page number (32 bit little endian)
Definition at line 53 of file serial.h.
◆ RIOTBOOT_CMD_GET_PAGE
#define RIOTBOOT_CMD_GET_PAGE 'P' |
get page of address parameter:
- length of address (8 bit - should be 4)
- address (32 bit little endian)
returns status code followed by 32 bit little endian value that represents the page in which the address lies.
Definition at line 73 of file serial.h.
◆ RIOTBOOT_CMD_WRITE
#define RIOTBOOT_CMD_WRITE 'w' |
write data parameter:
- length of data + address (8 bit)
- destination address (32 bit little endian)
- data (up to (RX_BUF_LEN-6) bytes)
Definition at line 62 of file serial.h.
◆ RIOTBOOT_CRC8_POLY
#define RIOTBOOT_CRC8_POLY (0x31) |
CRC-8 Polynom used for riotboot chunks.
Definition at line 107 of file serial.h.
◆ RIOTBOOT_ENTER_LOADER
#define RIOTBOOT_ENTER_LOADER 'B' |
riotboot serial loader synchronisation
Definition at line 93 of file serial.h.
◆ RIOTBOOT_PROBE
#define RIOTBOOT_PROBE '?' |
◆ RIOTBOOT_STAT_BAD_CRC
#define RIOTBOOT_STAT_BAD_CRC '?' |
CRC error - try again.
Definition at line 83 of file serial.h.
◆ RIOTBOOT_STAT_ILLEGAL
#define RIOTBOOT_STAT_ILLEGAL '!' |
illegal parameter
Definition at line 85 of file serial.h.
◆ RIOTBOOT_STAT_OK
#define RIOTBOOT_STAT_OK '.' |
riotboot response codes to commands
operation successful
Definition at line 81 of file serial.h.
◆ RIOTBOOT_STAT_READY
#define RIOTBOOT_STAT_READY '>' |
◆ RIOTBOOT_STAT_WAITING
#define RIOTBOOT_STAT_WAITING 'b' |
◆ riotboot_serial_loader()
int riotboot_serial_loader |
( |
void |
| ) |
|
Start interactive serial bootloader.
- Returns
- slot to boot, -1 if default slot should be started