SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
main.c File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <config.h>
#include <log.h>
#include <common.h>
#include <jmp.h>
#include <mmu.h>
#include "sys-dram.h"
#include "sys-sdcard.h"
#include "sys-sid.h"
#include "sys-spi.h"
#include "elf_loader.h"
#include "ff.h"
Include dependency graph for main.c:

Classes

struct  image_info_t
 

Macros

#define CONFIG_RISCV_ELF_FILENAME   "c906.elf"
 
#define CONFIG_RISCV_ELF_LOADADDR   (0x45000000)
 
#define CONFIG_RISCV_OPENSBI_FILENAME   "fw_jump.bin"
 
#define CONFIG_RISCV_OPENSBI_LOADADDR   (0x41fc0000)
 
#define CONFIG_RISCV_UBOOT_FILENAME   "u-boot.bin"
 
#define CONFIG_RISCV_UBOOT_LOADADDR   (0x42000000)
 
#define CONFIG_SDMMC_SPEED_TEST_SIZE   1024
 
#define FILENAME_MAX_LEN   64
 
#define CHUNK_SIZE   0x20000
 

Functions

static int fatfs_loadimage (char *filename, BYTE *dest)
 
static int load_sdcard (image_info_t *image)
 
int main_load (void)
 
void main ()
 

Variables

sunxi_serial_t uart_dbg
 
sdhci_t sdhci0
 
dram_para_t dram_para
 
image_info_t image
 

Macro Definition Documentation

◆ CHUNK_SIZE

#define CHUNK_SIZE   0x20000

◆ CONFIG_RISCV_ELF_FILENAME

#define CONFIG_RISCV_ELF_FILENAME   "c906.elf"

◆ CONFIG_RISCV_ELF_LOADADDR

#define CONFIG_RISCV_ELF_LOADADDR   (0x45000000)

◆ CONFIG_RISCV_OPENSBI_FILENAME

#define CONFIG_RISCV_OPENSBI_FILENAME   "fw_jump.bin"

◆ CONFIG_RISCV_OPENSBI_LOADADDR

#define CONFIG_RISCV_OPENSBI_LOADADDR   (0x41fc0000)

◆ CONFIG_RISCV_UBOOT_FILENAME

#define CONFIG_RISCV_UBOOT_FILENAME   "u-boot.bin"

◆ CONFIG_RISCV_UBOOT_LOADADDR

#define CONFIG_RISCV_UBOOT_LOADADDR   (0x42000000)

◆ CONFIG_SDMMC_SPEED_TEST_SIZE

#define CONFIG_SDMMC_SPEED_TEST_SIZE   1024

◆ FILENAME_MAX_LEN

#define FILENAME_MAX_LEN   64

Function Documentation

◆ fatfs_loadimage()

static int fatfs_loadimage ( char *  filename,
BYTE dest 
)
static

◆ load_sdcard()

static int load_sdcard ( image_info_t image)
static

◆ main()

void main ( void  )

◆ main_load()

int main_load ( void  )

Variable Documentation

◆ dram_para

dram_para_t dram_para
extern

◆ image

image_info_t image

◆ sdhci0

sdhci_t sdhci0
extern

◆ uart_dbg

sunxi_serial_t uart_dbg
extern