Midnight Sun Firmware
Loading...
Searching...
No Matches
Bootstrap

bootstrap Firmware More...

Macros

#define BOOTLOADER_ADDR   0x08008000
 
#define BOOTLOADER_SIZE   0x00007000
 
#define APPLICATION_ADDR   0x08018000
 
#define CRC_FILE_PATH   "crc.txt"
 
#define CRC_SIZE   8
 
#define CRC32_POLY   0xEDB88320UL
 

Typedefs

typedef void(* EntryPoint) (void)
 

Functions

void jump_to (uint32_t addr)
 
void crc32_init (void)
 
void compute_crc32 (const uint8_t *data, size_t length, uint32_t *crc_dest)
 
StatusCode read_crc32 (const char *file_path, size_t length, uint8_t *crc_dest)
 
void bootstrap_main (void)
 

Variables

uint32_t crc32_table [256]
 

Detailed Description

bootstrap Firmware

Function Documentation

◆ bootstrap_main()

void bootstrap_main ( void  )

Main application executed at runtime

◆ compute_crc32()

void compute_crc32 ( const uint8_t *  data,
size_t  length,
uint32_t *  crc_dest 
)

Manually computes CRC

◆ crc32_init()

void crc32_init ( void  )

Initializes the crc32 table

◆ jump_to()

void jump_to ( uint32_t  addr)

Jumps to a specific address in memory

◆ read_crc32()

StatusCode read_crc32 ( const char *  file_path,
size_t  length,
uint8_t *  crc_dest 
)

Reads CRC value from file system