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 <log.h>
#include <config.h>
#include <mmu.h>
#include <common.h>
#include <jmp.h>
#include <cli.h>
#include <cli_shell.h>
#include <cli_termesc.h>
#include "sys-dram.h"
#include "sys-sdcard.h"
#include "sys-sid.h"
#include "fdt_wrapper.h"
#include "ff.h"
#include "libfdt.h"
Include dependency graph for main.c:

Classes

struct  image_info_t
 

Macros

#define CONFIG_DTB_FILENAME   "sunxi.dtb"
 
#define CONFIG_DTB_LOADADDR   (0x41008000)
 
#define MAX_LEVEL   32 /* how deeply nested we will go */
 
#define SCRATCHPAD   1024 /* bytes of scratchpad memory */
 
#define CMD_FDT_MAX_DUMP   64
 
#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)
 
 msh_declare_command (fdt)
 
 msh_define_help (fdt, "flattened device tree utility commands", "fdt print <path> [<prop>] - Recursive print starting at <path>\n" "fdt list <path> [<prop>] - Print one level starting at <path>\n" "fdt set <path> <prop> [<val>] - Set <property> [to <val>]\n" "fdt mknode <path> <node> - Create a new node after <path>\n" "fdt rm <path> [<prop>] - Delete the node or <property>\n" "fdt header - Display header info\n" "fdt rsvmem print - Show current mem reserves\n" "fdt rsvmem add <addr> <size> - Add a mem reserve\n" "fdt rsvmem delete <index> - Delete a mem reserves\n" "NOTE: Dereference aliases by omitting the leading '/', " "e.g. fdt print ethernet0.\n\n")
 
int cmd_fdt (int argc, const char **argv)
 
 msh_declare_command (reload)
 
 msh_define_help (reload, "rescan TF Card and reload DTB", "Usage: reload\n")
 
int cmd_reload (int argc, const char **argv)
 
int main (void)
 

Variables

sunxi_serial_t uart_dbg
 
dram_para_t dram_para
 
sdhci_t sdhci0
 
image_info_t image
 
const msh_command_entry commands []
 

Macro Definition Documentation

◆ CHUNK_SIZE

#define CHUNK_SIZE   0x20000

◆ CMD_FDT_MAX_DUMP

#define CMD_FDT_MAX_DUMP   64

◆ CONFIG_DTB_FILENAME

#define CONFIG_DTB_FILENAME   "sunxi.dtb"

◆ CONFIG_DTB_LOADADDR

#define CONFIG_DTB_LOADADDR   (0x41008000)

◆ CONFIG_SDMMC_SPEED_TEST_SIZE

#define CONFIG_SDMMC_SPEED_TEST_SIZE   1024

◆ FILENAME_MAX_LEN

#define FILENAME_MAX_LEN   64

◆ MAX_LEVEL

#define MAX_LEVEL   32 /* how deeply nested we will go */

◆ SCRATCHPAD

#define SCRATCHPAD   1024 /* bytes of scratchpad memory */

Function Documentation

◆ cmd_fdt()

int cmd_fdt ( int  argc,
const char **  argv 
)

◆ cmd_reload()

int cmd_reload ( int  argc,
const char **  argv 
)

◆ fatfs_loadimage()

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

◆ load_sdcard()

static int load_sdcard ( image_info_t image)
static

◆ main()

int main ( void  )

◆ msh_declare_command() [1/2]

msh_declare_command ( fdt  )

◆ msh_declare_command() [2/2]

msh_declare_command ( reload  )

◆ msh_define_help() [1/2]

msh_define_help ( fdt  ,
"flattened device tree utility commands"  ,
"fdt print <path> - Recursive print starting at <path>\n" "fdt list <path> - Print one level starting at <path>\n" "fdt set <path> <prop> - Set <property> \n" "fdt mknode <path> <node> - Create a new node after <path>\n" "fdt rm <path> - Delete the node or <property>\n" "fdt header - Display header info\n" "fdt rsvmem print - Show current mem reserves\n" "fdt rsvmem add <addr> <size> - Add a mem reserve\n" "fdt rsvmem delete <index> - Delete a mem reserves\n" "NOTE: Dereference aliases by omitting the leading '/'  [< prop >][< prop >][< val >][to< val >][< prop >],
" "e.g. fdt print ethernet0.\n\n"   
)

◆ msh_define_help() [2/2]

msh_define_help ( reload  ,
"rescan TF Card and reload DTB"  ,
"Usage: reload\n"   
)

Variable Documentation

◆ commands

const msh_command_entry commands[]
Initial value:
= {
}
#define msh_command_end
Definition cli.h:21
#define msh_define_command(name)
Definition cli.h:33

◆ 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