修复编译问题
This commit is contained in:
5
Kconfig
5
Kconfig
@@ -17,10 +17,15 @@ config ARCH
|
||||
config FLOAT_TYPE
|
||||
string "float type is soft or hard"
|
||||
default "soft"
|
||||
|
||||
config ELF_LAUNCH
|
||||
bool "elf app launch"
|
||||
default n
|
||||
|
||||
config DTBO_SUPPORT
|
||||
bool "dtb support."
|
||||
default n
|
||||
|
||||
config DTBO_OFFSET
|
||||
hex "dtbo img offset."
|
||||
default 0x1000
|
||||
|
||||
@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
|
||||
file(GLOB_RECURSE deps *.S *.s *.C *.c)
|
||||
list(REMOVE_ITEM deps ${CMAKE_CURRENT_LIST_DIR}/link.lds.S)
|
||||
add_library(boot_bsp STATIC ${deps})
|
||||
target_include_directories(
|
||||
boot_bsp
|
||||
@@ -12,13 +11,13 @@ target_include_directories(
|
||||
target_link_libraries(boot_bsp
|
||||
PRIVATE
|
||||
)
|
||||
add_custom_target(
|
||||
bootstratp_link_file_dump ALL
|
||||
COMMAND
|
||||
${CMAKE_C_COMPILER}
|
||||
-include ${CMAKE_SOURCE_DIR}/build/autoconf.h
|
||||
-E -P -<${CMAKE_CURRENT_LIST_DIR}/link.lds.S >
|
||||
${CMAKE_CURRENT_LIST_DIR}/link.lds
|
||||
)
|
||||
# add_custom_target(
|
||||
# bootstratp_link_file_dump ALL
|
||||
# COMMAND
|
||||
# ${CMAKE_C_COMPILER}
|
||||
# -include ${CMAKE_SOURCE_DIR}/build/autoconf.h
|
||||
# -E -P -<${CMAKE_CURRENT_LIST_DIR}/link.lds.S >
|
||||
# ${CMAKE_CURRENT_LIST_DIR}/link.lds
|
||||
# )
|
||||
|
||||
add_dependencies(boot_bsp bootstratp_link_file_dump)
|
||||
# add_dependencies(boot_bsp bootstratp_link_file_dump)
|
||||
@@ -1,10 +1,10 @@
|
||||
ENTRY(Reset_Handler)
|
||||
_estack = 0x20000000 + 0x20000;
|
||||
_estack = 0x20000000 + 0x800000;
|
||||
_Min_Heap_Size = 0;
|
||||
_Min_Stack_Size = 0x300;
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000 + 0x20000 - 0x4000, LENGTH = 0x4000 - 0x300
|
||||
RAM (xrw) : ORIGIN = 0x20000000 + 0x800000 - 0x4000, LENGTH = 0x4000 - 0x300
|
||||
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 0x2000
|
||||
}
|
||||
SECTIONS
|
||||
|
||||
@@ -47,15 +47,10 @@ static boot_info_t boot_info = {
|
||||
.mem_list = {
|
||||
{
|
||||
.addr = CONFIG_SYS_DATA_ADDR,
|
||||
.size = CONFIG_SYS_DATA_SIZE / 2,
|
||||
.size = CONFIG_SYS_DATA_SIZE,
|
||||
.is_sys_mem = 1,
|
||||
.speed = 0,
|
||||
},
|
||||
{
|
||||
.addr = CONFIG_SYS_DATA_ADDR + CONFIG_SYS_DATA_SIZE / 2,
|
||||
.size = CONFIG_SYS_DATA_SIZE / 2,
|
||||
.speed = 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
.mem_num = 2,
|
||||
},
|
||||
|
||||
@@ -129,4 +129,6 @@ CONFIG_MSG_BUF_VADDR=0xE0000000
|
||||
CONFIG_BOOT_FS_VADDR=0xE0001000
|
||||
CONFIG_MPU_PAGE_FAULT_SUPPORT=n
|
||||
CONFIG_MPU_PAGE_NUM=64
|
||||
CONFIG_MPU_PAGE_FAULT_REGIONS_NUM=2
|
||||
CONFIG_MPU_PAGE_FAULT_REGIONS_NUM=2
|
||||
CONFIG_BOOT_INFO_SUPPORT=y
|
||||
CONFIG_DTBO_SUPPORT=y
|
||||
@@ -127,3 +127,5 @@ CONFIG_THREAD_MAP_BUF_LEN=4
|
||||
CONFIG_THREAD_USER_BUF_LEN=4
|
||||
CONFIG_MSG_BUF_VADDR=0xE0000000
|
||||
CONFIG_BOOT_FS_VADDR=0xE0001000
|
||||
CONFIG_BOOT_INFO_SUPPORT=y
|
||||
CONFIG_DTBO_SUPPORT=y
|
||||
@@ -6,7 +6,7 @@ CONFIG_KNL_INFO=y
|
||||
CONFIG_SYS_TEXT_ADDR=0x8000000
|
||||
CONFIG_SYS_TEXT_SIZE=0x800000
|
||||
CONFIG_SYS_DATA_ADDR=0x20000000
|
||||
CONFIG_SYS_DATA_SIZE=0x20000
|
||||
CONFIG_SYS_DATA_SIZE=0x800000
|
||||
CONFIG_BOOTSTRAP_TEXT_SIZE=0x2000
|
||||
CONFIG_DTBO_TEXT_SIZE=0x1000
|
||||
CONFIG_KNL_TEXT_SIZE=0x30000
|
||||
@@ -129,3 +129,5 @@ CONFIG_BOOT_FS_VADDR=0xE0001000
|
||||
CONFIG_MPU_PAGE_FAULT_SUPPORT=y
|
||||
CONFIG_MPU_PAGE_NUM=64
|
||||
CONFIG_MPU_PAGE_FAULT_REGIONS_NUM=2
|
||||
CONFIG_BOOT_INFO_SUPPORT=y
|
||||
CONFIG_DTBO_SUPPORT=y
|
||||
@@ -129,4 +129,6 @@ CONFIG_MSG_BUF_VADDR=0xE0000000
|
||||
CONFIG_BOOT_FS_VADDR=0xE0001000
|
||||
CONFIG_MPU_PAGE_FAULT_SUPPORT=n
|
||||
CONFIG_MPU_PAGE_NUM=64
|
||||
CONFIG_MPU_PAGE_FAULT_REGIONS_NUM=2
|
||||
CONFIG_MPU_PAGE_FAULT_REGIONS_NUM=2
|
||||
CONFIG_BOOT_INFO_SUPPORT=y
|
||||
CONFIG_DTBO_SUPPORT=y
|
||||
@@ -130,3 +130,5 @@ CONFIG_BOOT_FS_VADDR=0xE0001000
|
||||
CONFIG_MPU_PAGE_FAULT_SUPPORT=n
|
||||
CONFIG_MPU_PAGE_NUM=64
|
||||
CONFIG_MPU_PAGE_FAULT_REGIONS_NUM=2
|
||||
CONFIG_BOOT_INFO_SUPPORT=y
|
||||
CONFIG_DTBO_SUPPORT=y
|
||||
@@ -9,7 +9,7 @@ CONFIG_SYS_DATA_ADDR=0x40000000
|
||||
CONFIG_SYS_DATA_SIZE=0x1E000000
|
||||
CONFIG_BOOTSTRAP_TEXT_SIZE=0x1000000
|
||||
CONFIG_KNL_TEXT_SIZE=0x10000
|
||||
CONFIG_BOOTFS_OFFSET=0x02000000
|
||||
# CONFIG_BOOTFS_OFFSET=0x02000000
|
||||
CONFIG_MK_MPU_CFG=n
|
||||
CONFIG_FT_ADDR_NR=16
|
||||
CONFIG_SYS_SCHE_HZ=1000
|
||||
|
||||
@@ -146,4 +146,11 @@ config PRINTK_CACHE_SIZE
|
||||
default 128
|
||||
help
|
||||
The printk cache size refers to the size of the data content output to the console in a single attempt, which usually does not need to be modified.
|
||||
|
||||
config BOOT_INFO_SUPPORT
|
||||
bool "boot info support"
|
||||
default n
|
||||
help
|
||||
support boot info.
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -99,6 +99,7 @@ void MemManage_Handler(void)
|
||||
thread_get_current_task(), fault_addr, bus_addr);
|
||||
task_knl_kill(thread_get_current(), is_knl);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((SCB->CFSR & 8))
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
ENTRY(Reset_Handler)
|
||||
MEMORY
|
||||
{
|
||||
RAM (arw) : ORIGIN = 0x20000000, LENGTH = 0x20000
|
||||
RAM (arw) : ORIGIN = 0x20000000, LENGTH = 0x800000
|
||||
FLASH (arx) : ORIGIN = 0x8000000 + 0x2000 + 0x1000, LENGTH = 0x30000
|
||||
}
|
||||
SECTIONS
|
||||
|
||||
@@ -52,6 +52,7 @@ void MemManage_Handler(void)
|
||||
thread_get_current_task(), fault_addr, bus_addr);
|
||||
task_knl_kill(thread_get_current(), is_knl);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((SCB->CFSR & 8))
|
||||
{
|
||||
|
||||
@@ -95,6 +95,7 @@ void MemManage_Handler(void)
|
||||
thread_get_current_task(), fault_addr, bus_addr);
|
||||
task_knl_kill(thread_get_current(), is_knl);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((SCB->CFSR & 8))
|
||||
{
|
||||
|
||||
@@ -24,6 +24,8 @@ extern int mem_node_num;
|
||||
extern mem_node_t flash_nodes[]; //!< 支持的flash节点
|
||||
extern int flash_node_num;
|
||||
|
||||
extern umword_t cpio_images;
|
||||
|
||||
mem_t *mm_get_global(void);
|
||||
void global_reg_kobj(kobject_t *kobj, int inx);
|
||||
kobject_t *global_get_kobj(int inx);
|
||||
|
||||
@@ -73,6 +73,7 @@ static void mem_sys_init(void)
|
||||
}
|
||||
INIT_MEM(mem_sys_init);
|
||||
|
||||
#if IS_ENABLED(CONFIG_DTBO_SUPPORT)
|
||||
static void dts_parse(void)
|
||||
{
|
||||
printk("init dts parsing.\n");
|
||||
@@ -96,3 +97,4 @@ static void dts_parse(void)
|
||||
// #endif
|
||||
}
|
||||
INIT_ONBOOT(dts_parse);
|
||||
#endif
|
||||
|
||||
@@ -230,7 +230,9 @@ void start_kernel(void *boot_info)
|
||||
// 初始化系统时钟
|
||||
// 初始化串口
|
||||
// 初始化定时器
|
||||
#if IS_ENABLED(CONFIG_BOOT_INFO_SUPPORT)
|
||||
arch_set_boot_info(boot_info);
|
||||
#endif
|
||||
sys_call_init();
|
||||
printk("mkrtos init done..\n");
|
||||
printk("mkrtos running..\n");
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# export TOOLCHAIN=/Applications/ArmGNUToolchain/11.3.rel1/aarch64-none-elf/bin/
|
||||
# export TOOLCHAIN_LIB=/Applications/ArmGNUToolchain/11.3.rel1/aarch64-none-elf/lib/gcc/aarch64-none-elf/11.3.1
|
||||
export TOOLCHAIN=/Applications/ArmGNUToolchain/11.3.rel1/aarch64-none-elf/bin/
|
||||
export TOOLCHAIN_LIB=/Applications/ArmGNUToolchain/11.3.rel1/aarch64-none-elf/lib/gcc/aarch64-none-elf/11.3.1
|
||||
# export TOOLCHAIN=/home/toolchains/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin/
|
||||
# export TOOLCHAIN_LIB=/home/toolchains/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/lib/gcc/aarch64-none-elf/10.3.1
|
||||
|
||||
export TOOLCHAIN=/home/zhangzheng/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin/
|
||||
export TOOLCHAIN_LIB=/home/zhangzheng/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/lib/gcc/aarch64-none-elf/10.3.1
|
||||
# export TOOLCHAIN=/home/zhangzheng/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin/
|
||||
# export TOOLCHAIN_LIB=/home/zhangzheng/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/lib/gcc/aarch64-none-elf/10.3.1
|
||||
|
||||
export BOARD=aarch64_qemu
|
||||
export CROSS_COMPILE_NAME=aarch64-none-elf-
|
||||
|
||||
@@ -47,7 +47,10 @@ run_and_check "./mkrtos_script/run_m3.sh" "$TIMEOUT"
|
||||
run_and_check "./mkrtos_script/run_m4.sh" "$TIMEOUT"
|
||||
|
||||
./mkrtos_script/clean.sh
|
||||
./mkrtos_script/build_swm34s.sh test
|
||||
./mkrtos_script/build_at32f437.sh test "$TIMEOUT"
|
||||
|
||||
./mkrtos_script/clean.sh
|
||||
./mkrtos_script/build_swm34s.sh test "$TIMEOUT"
|
||||
# run_and_check "./mkrtos_script/build_swm34s.sh test" "$TIMEOUT"
|
||||
|
||||
echo "All tests completed."
|
||||
Reference in New Issue
Block a user