NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1// ================================================================================ //
2// The NEORV32 RISC-V Processor - https://github.com/stnolting/neorv32 //
3// Copyright (c) NEORV32 contributors. //
4// Copyright (c) 2020 - 2025 Stephan Nolting. All rights reserved. //
5// Licensed under the BSD-3-Clause license, see LICENSE for details. //
6// SPDX-License-Identifier: BSD-3-Clause //
7// ================================================================================ //
8
14#ifndef SYSTEM_H
15#define SYSTEM_H
16
17#include <stdint.h>
18
19// neorv32 executable layout
20#define BIN_OFFSET_SIGNATURE 0 // offset to signature
21#define BIN_OFFSET_SIZE 4 // offset to size
22#define BIN_OFFSET_CHECKSUM 8 // offset to checksum
23#define BIN_OFFSET_DATA 12 // offset to data start
24#define BIN_SIGNATURE 0xB007C0DE // executable identifier
25
26// helper macros
27#define xstr(a) str(a)
28#define str(a) #a
29
30// prototypes
31void system_setup(void);
32int system_exe_load(int (*dev_init)(void), int (*stream_get)(uint32_t* rdata));
33int system_exe_store(int (*dev_init)(void), int (*dev_erase)(void), int (*stream_put)(uint32_t wdata));
34void system_boot_app(void);
35
36#endif // SYSTEM_H
void system_setup(void)
Definition system.c:30
int system_exe_store(int(*dev_init)(void), int(*dev_erase)(void), int(*stream_put)(uint32_t wdata))
Definition system.c:190
int system_exe_load(int(*dev_init)(void), int(*stream_get)(uint32_t *rdata))
Definition system.c:123
void system_boot_app(void)
Definition system.c:262