forked from Simple-XX/SimpleKernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Zone.N <[email protected]>
- Loading branch information
Showing
257 changed files
with
33,618 additions
and
7,184 deletions.
There are no files selected for viewing
File renamed without changes.
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
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
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,3 @@ | ||
[submodule "tools/opensbi"] | ||
path = tools/opensbi | ||
url = https://github.com/riscv/opensbi.git |
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,13 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "SimpleKernel_vscode_cpp", | ||
"includePath": [ | ||
"${workspaceFolder}/src/**" | ||
], | ||
"cStandard": "gnu17", | ||
"cppStandard": "gnu++17" | ||
} | ||
], | ||
"version": 4 | ||
} |
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,126 @@ | ||
{ | ||
"files.associations": { | ||
"array": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"ranges": "cpp", | ||
"random": "c", | ||
"*.tcc": "cpp", | ||
"streambuf": "cpp", | ||
"cstdio": "cpp", | ||
"exception": "cpp", | ||
"memory_resource": "cpp", | ||
"iosfwd": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"sstream": "cpp", | ||
"cstdlib": "cpp", | ||
"deque": "cpp", | ||
"vector": "cpp", | ||
"initializer_list": "cpp", | ||
"type_traits": "cpp", | ||
"atomic": "cpp", | ||
"complex": "cpp", | ||
"unordered_map": "cpp", | ||
"iterator": "cpp", | ||
"optional": "cpp", | ||
"utility": "cpp", | ||
"algorithm": "cpp", | ||
"functional": "cpp", | ||
"iostream": "cpp", | ||
"bit": "cpp", | ||
"cctype": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"compare": "cpp", | ||
"concepts": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"map": "cpp", | ||
"set": "cpp", | ||
"memory": "cpp", | ||
"numeric": "cpp", | ||
"system_error": "cpp", | ||
"tuple": "cpp", | ||
"iomanip": "cpp", | ||
"istream": "cpp", | ||
"limits": "cpp", | ||
"stdexcept": "cpp", | ||
"cinttypes": "cpp", | ||
"typeinfo": "cpp", | ||
"list": "cpp", | ||
"climits": "cpp", | ||
"basic_string": "cpp", | ||
"construct": "cpp", | ||
"exceptdef": "cpp", | ||
"hashtable": "cpp", | ||
"heap_algo": "cpp", | ||
"set_algo": "cpp", | ||
"uninitialized": "cpp", | ||
"unordered_set": "cpp", | ||
"util": "cpp", | ||
"queue": "cpp", | ||
"rb_tree": "cpp", | ||
"algo": "cpp", | ||
"algobase": "cpp", | ||
"allocator": "cpp", | ||
"astring": "cpp", | ||
"numbers": "cpp" | ||
}, | ||
"cmake.configureOnOpen": true, | ||
// --------Doxygen-------- | ||
// 文件注释的组成及其排序 | ||
"doxdocgen.file.fileOrder": [ | ||
// @file | ||
"file", | ||
// @brief 简介 | ||
"brief", | ||
// 作者 | ||
"author", | ||
// 版本 | ||
"version", | ||
// 日期 | ||
"date", | ||
// 版权 | ||
"copyright", | ||
// 自定义 | ||
"custom" | ||
], | ||
// 下面时设置上面标签tag的具体信息 | ||
// 文件注释:版权信息模板 | ||
"doxdocgen.file.copyrightTag": [ | ||
"@copyright MIT LICENSE", | ||
"https://github.com/Simple-XX/SimpleKernel" | ||
], | ||
// 文件注释:自定义模块,这里我添加一个修改日志 | ||
"doxdocgen.file.customTag": [ | ||
"@par change log:", | ||
"<table>", | ||
"<tr><th>Date<th>Author<th>Description", | ||
"<tr><td>{date}<td>作者<td>内容", | ||
"</table>", | ||
], | ||
"doxdocgen.file.fileTemplate": "@file {name}", | ||
"doxdocgen.generic.authorEmail": "[email protected]", | ||
"doxdocgen.generic.authorName": "XXX", | ||
"doxdocgen.generic.authorTag": "@author {author} ({email})", | ||
// 日期格式与模板 | ||
"doxdocgen.generic.dateFormat": "YYYY-MM-DD", | ||
"doxdocgen.generic.dateTemplate": "@date {date}", | ||
// 根据自动生成的注释模板(目前主要体现在函数注释上) | ||
"doxdocgen.generic.order": [ | ||
"brief", | ||
"tparam", | ||
"param", | ||
"return" | ||
], | ||
"doxdocgen.generic.paramTemplate": "@param{indent:8}{param}{indent:25}My Param doc", | ||
"doxdocgen.generic.returnTemplate": "@return {type}{indent:25}", | ||
"doxdocgen.generic.splitCasingSmartText": true, | ||
// --------Doxygen END-------- | ||
} |
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 |
---|---|---|
@@ -1,43 +1,48 @@ | ||
|
||
# This file is a part of Simple-XX/SimpleKernel (https://github.com/Simple-XX/SimpleKernel). | ||
# This file is a part of Simple-XX/SimpleKernel | ||
# (https://github.com/Simple-XX/SimpleKernel). | ||
# Based on https://github.com/SynestiaOS/SynestiaOS | ||
# CMakeLists.txt for Simple-XX/SimpleKernel. | ||
# CMake 入口 | ||
|
||
# Set minimum cmake version | ||
# 设置最小 cmake 版本 | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
# skip cmake compiler check | ||
# 跳过编译器检查 | ||
set(CMAKE_C_COMPILER_WORKS TRUE) | ||
set(CMAKE_CXX_COMPILER_WORKS TRUE) | ||
|
||
project(SimpleKernel LANGUAGES C CXX ASM) | ||
# 设置项目名与使用的语言 | ||
project(SimpleKernel LANGUAGES CXX ASM) | ||
|
||
# 禁止原地编译 | ||
if(${SimpleKernel_SOURCE_DIR} STREQUAL ${SimpleKernel_BINARY_DIR}) | ||
message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.") | ||
endif() | ||
|
||
# Set C gnu11 | ||
# 设置使用的 C/C++ 版本 | ||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
# Set cmake moudle path | ||
# 设置辅助 cmake 脚本路径 | ||
set(CMAKE_MODULE_PATH "${SimpleKernel_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) | ||
|
||
# Set arch | ||
# 设置 arch | ||
include(${SimpleKernel_SOURCE_DIR}/cmake/arch_detector.cmake) | ||
# Set platform | ||
include(${SimpleKernel_SOURCE_DIR}/cmake/platform_detector.cmake) | ||
# Set header files | ||
# 引入添加头文件函数 | ||
include(${SimpleKernel_SOURCE_DIR}/cmake/header_files.cmake) | ||
# Find asm source files | ||
# 引入添加汇编文件函数 | ||
include(${SimpleKernel_SOURCE_DIR}/cmake/find_asm_files.cmake) | ||
|
||
# 设置输出路径 | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
# Set kernel name | ||
# 设置内核名称 | ||
set(KernelName kernel.elf) | ||
|
||
# 设置 src 路径 | ||
set(SimpleKernel_SOURCE_CODE_DIR ${SimpleKernel_SOURCE_DIR}/src) | ||
# 跳转到 SimpleKernel_SOURCE_CODE_DIR 下的 CMakeLists | ||
add_subdirectory(${SimpleKernel_SOURCE_CODE_DIR}) |
Oops, something went wrong.