修复mcu无法编译的问题
This commit is contained in:
@@ -27,13 +27,14 @@ elseif(${CONFIG_ARCH} STREQUAL "aarch64" )
|
||||
${CMAKE_SOURCE_DIR}/build/libc/output/lib/crti.o
|
||||
${CMAKE_SOURCE_DIR}/build/libc/output/lib/crtn.o
|
||||
)
|
||||
|
||||
add_subdirectory(hello)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
add_subdirectory(init)
|
||||
add_subdirectory(shell)
|
||||
add_subdirectory(tinycc-arm-thumb)
|
||||
add_subdirectory(fs)
|
||||
add_subdirectory(hello)
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(drv)
|
||||
add_subdirectory(net)
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
.global uvmm_dev_json_end
|
||||
.align 12
|
||||
os_bin:
|
||||
.incbin "/home/mkrtos-real/benos/arch/arm64/boot/benos.bin"
|
||||
.incbin "/Users/zhangzheng/mkrtos-real/benos/arch/arm64/boot/benos.bin"
|
||||
os_bin_end:
|
||||
.quad 0
|
||||
uvmm_dev_json:
|
||||
.incbin "/home/mkrtos-real/mkrtos_user/server/hello/src/vm_benos.json"
|
||||
.incbin "/Users/zhangzheng/mkrtos-real/mkrtos_user/server/hello/src/vm_benos.json"
|
||||
uvmm_dev_json_end:
|
||||
.quad 0
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
file(GLOB_RECURSE deps *.c *.S)
|
||||
file(GLOB deps src/*.c src/*.S)
|
||||
file(GLOB arch_src src/test/${ARCH_NAME}/*.c src/test/${ARCH_NAME}/*.S)
|
||||
|
||||
add_executable(init.elf
|
||||
${deps}
|
||||
${arch_src}
|
||||
${START_SRC_INIT}
|
||||
)
|
||||
target_link_libraries(init.elf
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#define DEBUG_IPC_CALL 1
|
||||
|
||||
#if IS_ENABLED(CONFIG_MMU)
|
||||
//! 读取系统寄存器
|
||||
#define read_sysreg(reg) ({ \
|
||||
unsigned long _val; \
|
||||
@@ -25,7 +27,12 @@ static inline int get_cpu_id(void)
|
||||
{
|
||||
return read_sysreg(mpidr_el1) & 0xff; // 读取该寄存器获取处理器id
|
||||
}
|
||||
|
||||
#else
|
||||
static inline int get_cpu_id(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
static umword_t th1_hd = 0;
|
||||
static umword_t th2_hd = 0;
|
||||
static umword_t th3_hd = 0;
|
||||
@@ -33,7 +33,7 @@ target_include_directories(
|
||||
|
||||
${CMAKE_SOURCE_DIR}/mkrtos_user/lib/printf/src/printf
|
||||
)
|
||||
set_target_properties(sh.elf PROPERTIES LINK_FLAGS
|
||||
set_target_properties(test.elf PROPERTIES LINK_FLAGS
|
||||
"-T ${CMAKE_CURRENT_LIST_DIR}/${ARCH_NAME}/link.lds ${CORTEX_M_LINK_FLAGS} --gc-section -no-dynamic-linker "
|
||||
)
|
||||
add_custom_target(
|
||||
|
||||
Reference in New Issue
Block a user