-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<Qemu SiFive-E> Add project and bootloader
Issue: #233
- Loading branch information
1 parent
02c6179
commit d2f3529
Showing
5 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# CYANCORE LICENSE | ||
# Copyrights (C) 2019, Cyancore Team | ||
# | ||
# File Name : build.mk | ||
# Description : This file builds and gathers project properties | ||
# Primary Author : Akash Kollipara [akashkollipara@gmail.com] | ||
# Organisation : Cyancore Core-Team | ||
# | ||
|
||
PROJECT_DIR := $(GET_PATH) | ||
|
||
include $(PROJECT_DIR)/../demo.src/build.mk | ||
include $(PROJECT_DIR)/config.mk | ||
|
||
DIR := $(PROJECT_DIR) | ||
include mk/obj.mk | ||
|
||
aux_target: | ||
make qemu_sifive_e_bl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# CYANCORE LICENSE | ||
# Copyrights (C) 2019, Cyancore Team | ||
# | ||
# File Name : config.mk | ||
# Description : This file consists of project config | ||
# Primary Author : Akash Kollipara [akashkollipara@gmail.com] | ||
# Organisation : Cyancore Core-Team | ||
# | ||
|
||
COMPILER := gcc | ||
TC_VER := 10.2.0 | ||
FAMILY := sifive | ||
PLATFORM := qemu-sifive-e | ||
STDLOG_MEMBUF := 0 | ||
BOOTMSGS := 0 | ||
EARLYCON_SERIAL := 1 | ||
CONSOLE_SERIAL := 1 | ||
OBRDLED_ENABLE := 1 | ||
TERRAKERN := 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# CYANCORE LICENSE | ||
# Copyrights (C) 2022, Cyancore Team | ||
# | ||
# File Name : build.mk | ||
# Description : This file build project sources and specifies | ||
# project properties | ||
# Primary Author : Akash Kollipara [akashkollipara@gmail.com] | ||
# Organisation : Cyancore Core-Team | ||
# | ||
|
||
PROJECT_DIR := $(GET_PATH) | ||
|
||
OPTIMIZATION := s | ||
|
||
EXE_MODE := terravisor | ||
|
||
include $(PROJECT_DIR)/config.mk | ||
|
||
DIR := $(PROJECT_DIR) | ||
include mk/obj.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# CYANCORE LICENSE | ||
# Copyrights (C) 2019, Cyancore Team | ||
# | ||
# File Name : config.mk | ||
# Description : This file consists of project config | ||
# Primary Author : Akash Kollipara [akashkollipara@gmail.com] | ||
# Organisation : Cyancore Core-Team | ||
# | ||
|
||
COMPILER := gcc | ||
TC_VER := 10.2.0 | ||
FAMILY := sifive | ||
PLATFORM := qemu-sifive-e-bl | ||
USE_FLOAT := 0 | ||
STDLOG_MEMBUF := 0 | ||
BOOTMSGS := 0 | ||
EARLYCON_SERIAL := 1 | ||
CONSOLE_SERIAL := 0 | ||
OBRDLED_ENABLE := 0 | ||
TERRAKERN := 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* CYANCORE LICENSE | ||
* Copyrights (C) 2022, Cyancore Team | ||
* | ||
* File Name : project.c | ||
* Description : This file consists of project srouces | ||
* Primary Author : Akash Kollipara [akashkollipara@gmail.com] | ||
* Organisation : Cyancore Core-Team | ||
*/ | ||
|
||
#include <status.h> | ||
#include <syslog.h> | ||
#include <terravisor/bootstrap.h> | ||
#include <arch.h> | ||
#include <driver.h> | ||
#include <interrupt.h> | ||
#include <platform.h> | ||
#include <time.h> | ||
|
||
void no_program(void); | ||
void plug() | ||
{ | ||
bootstrap(); | ||
driver_setup_all(); | ||
syslog_stdout_enable(); | ||
link_interrupt(int_arch, 2, no_program); | ||
syslog(info, "Bootloader!\n"); | ||
syslog(info, "Jumping to XIP...\n"); | ||
driver_exit_all(); | ||
arch_di(); | ||
platform_jump_to_user_code(); | ||
return; | ||
} | ||
|
||
void no_program() | ||
{ | ||
driver_setup_all(); | ||
syslog(fail, "No User program found!\n"); | ||
plat_panic_handler(); | ||
} | ||
|