Loading...
Searching...
No Matches

Slot management tools. More...

Detailed Description

Slot management tools.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e
Francisco Acosta franc.nosp@m.isco.nosp@m..acos.nosp@m.ta@i.nosp@m.nria..nosp@m.fr

Definition in file slot.h.

#include <stddef.h>
#include "riotboot/hdr.h"
+ Include dependency graph for slot.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int riotboot_slot_current (void)
 Get currently running image slot.
 
int riotboot_slot_other (void)
 Get currently not running image slot.
 
uint32_t riotboot_slot_get_image_startaddr (unsigned slot)
 Get jump-to address of image slot.
 
void riotboot_slot_jump (unsigned slot)
 Boot into image in slot slot.
 
const riotboot_hdr_triotboot_slot_get_hdr (unsigned slot)
 Get header from a given flash slot.
 
static int riotboot_slot_validate (unsigned slot)
 Validate slot.
 
static void riotboot_slot_print_hdr (unsigned slot)
 Print formatted slot header to STDIO.
 
size_t riotboot_slot_offset (unsigned slot)
 Get the offset (in flash, in bytes) for a given slot.
 
void riotboot_slot_dump_addrs (void)
 Dump the addresses of all configured slots.
 
static size_t riotboot_slot_size (unsigned slot)
 Get the size of a slot.
 

Variables

const unsigned riotboot_slot_numof
 Number of configured firmware slots (incl.
 
const riotboot_hdr_t *const riotboot_slots []
 Storage for header pointers of the configured slots.
 

Function Documentation

◆ riotboot_slot_current()

int riotboot_slot_current ( void  )

Get currently running image slot.

Returns
nr of currently active slot

◆ riotboot_slot_get_hdr()

const riotboot_hdr_t * riotboot_slot_get_hdr ( unsigned  slot)

Get header from a given flash slot.

Parameters
[in]slotslot nr to work on
Returns
header of image slot nr slot

◆ riotboot_slot_get_image_startaddr()

uint32_t riotboot_slot_get_image_startaddr ( unsigned  slot)

Get jump-to address of image slot.

Parameters
[in]slotslot nr to work on
Returns
address of first byte of slot

◆ riotboot_slot_jump()

void riotboot_slot_jump ( unsigned  slot)

Boot into image in slot slot.

Parameters
[in]slotslot nr to jump to

◆ riotboot_slot_other()

int riotboot_slot_other ( void  )

Get currently not running image slot.

Returns
nr of currently inactive slot

◆ riotboot_slot_print_hdr()

static void riotboot_slot_print_hdr ( unsigned  slot)
inlinestatic

Print formatted slot header to STDIO.

Parameters
[in]slotslot nr to work on

Definition at line 93 of file slot.h.

◆ riotboot_slot_size()

static size_t riotboot_slot_size ( unsigned  slot)
inlinestatic

Get the size of a slot.

Parameters
[in]slotslot nr to get the size from
Returns
The slot size in bytes

Definition at line 116 of file slot.h.

◆ riotboot_slot_validate()

static int riotboot_slot_validate ( unsigned  slot)
inlinestatic

Validate slot.

Parameters
[in]slotslot nr to work on
Returns
0 if ok.

Definition at line 82 of file slot.h.

Variable Documentation

◆ riotboot_slot_numof

const unsigned riotboot_slot_numof
extern

Number of configured firmware slots (incl.

bootloader slot)