NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
system.h File Reference

Bare-metal system management. More...

#include <stdint.h>

Go to the source code of this file.

Macros

#define BIN_OFFSET_SIGNATURE   0
 
#define BIN_OFFSET_SIZE   4
 
#define BIN_OFFSET_CHECKSUM   8
 
#define BIN_OFFSET_DATA   12
 
#define BIN_SIGNATURE   0xB007C0DE
 
#define xstr(a)
 
#define str(a)
 

Functions

void system_setup (void)
 
int system_exe_load (int(*dev_init)(void), int(*stream_get)(uint32_t *rdata))
 
int system_exe_store (int(*dev_init)(void), int(*dev_erase)(void), int(*stream_put)(uint32_t wdata))
 
void system_boot_app (void)
 

Detailed Description

Bare-metal system management.

Macro Definition Documentation

◆ str

#define str ( a)
Value:
#a

◆ xstr

#define xstr ( a)
Value:
str(a)

Function Documentation

◆ system_boot_app()

void system_boot_app ( void )

Boot application program.

◆ system_exe_load()

int system_exe_load ( int(* dev_init )(void),
int(* stream_get )(uint32_t *rdata) )

Load executable: get data from device stream and store to main memory.

Parameters
dev_initFunction pointer ("int foo(void)") for device setup.
stream_getFunction pointer ("int bar(uint32_t* rdata)") to get the next consecutive 32-bit word from an application source stream.
Returns
0 if success, non-zero 0 if error.

◆ system_exe_store()

int system_exe_store ( int(* dev_init )(void),
int(* dev_erase )(void),
int(* stream_put )(uint32_t wdata) )

Store executable: copy data from main memory to device stream.

Parameters
dev_initFunction pointer ("int foo(void)") for device setup.
dev_eraseFunction pointer ("int tmp(void)") for device erasure.
stream_putFunction pointer ("int bar(uint32_t wdata)") to put the next consecutive 32-bit word to an application source stream.
Returns
0 if success, non-zero 0 if error.

◆ system_setup()

void system_setup ( void )

Setup processor system.