18#include "bootloader_can.h"
19#include "bootloader_error.h"
27extern uint32_t _application_start;
28extern uint32_t _application_size;
29extern uint32_t _bootloader_start;
30extern uint32_t _bootloader_size;
31extern uint32_t _sram_start;
32extern uint32_t _sram_size;
35#define APPLICATION_START_ADDRESS ((uint32_t)&_application_start)
38#define APPLICATION_SIZE ((size_t)&_application_size)
41#define BOOTLOADER_START_ADDRESS ((uint32_t)&_bootloader_start)
44#define BOOTLOADER_SIZE ((size_t)&_bootloader_size)
47#define SRAM_START_ADDRESS ((uint32_t)&_sram_start)
50#define SRAM_SIZE ((size_t)&_sram_size)
BootloaderError bootloader_run(Boot_CanMessage *msg)
Run the bootloader.
Definition: bootloader.c:259
BootloaderStates
Bootloader State Machine.
Definition: bootloader.h:55
BootloaderError bootloader_init(void)
Initialize the bootloader.
Definition: bootloader.c:27
BootloaderError bootloader_jump_app(void)
Jump application.
Definition: bootloader.c:142
BootloaderError
Bootloader error definitions.
Definition: bootloader_error.h:28
@ BOOTLOADER_JUMP_APP
Definition: bootloader.h:61
@ BOOTLOADER_WAIT_SEQUENCING
Definition: bootloader.h:59
@ BOOTLOADER_DATA_RECEIVE
Definition: bootloader.h:60
@ BOOTLOADER_START
Definition: bootloader.h:58
@ BOOTLOADER_FAULT
Definition: bootloader.h:62
@ BOOTLOADER_UNINITIALIZED
Definition: bootloader.h:56
@ BOOTLOADER_IDLE
Definition: bootloader.h:57
CAN message structure.
Definition: bootloader_can.h:72
Private Bootloader State Storage.
Definition: bootloader.h:68
uint16_t buffer_index
Definition: bootloader.h:75
uintptr_t application_start
Definition: bootloader.h:69
uintptr_t current_write_address
Definition: bootloader.h:70
uint32_t bytes_written
Definition: bootloader.h:71
bool first_byte_received
Definition: bootloader.h:80
uint16_t target_nodes
Definition: bootloader.h:79
uint32_t packet_crc32
Definition: bootloader.h:73
BootloaderError error
Definition: bootloader.h:78
BootloaderStates state
Definition: bootloader.h:77
uint32_t data_size
Definition: bootloader.h:72
uint16_t expected_sequence_number
Definition: bootloader.h:74