stm32f2能够运行
This commit is contained in:
@@ -13,7 +13,7 @@ if (${CONFIG_ARCH} STREQUAL "cortex-m3" OR
|
||||
-fPIC -fPIE -n -pie -fpie -fpic -msingle-pic-base -mno-pic-data-is-text-relative \
|
||||
" )
|
||||
|
||||
set(CORTEX_M_LINK_FLAGS "-pie")
|
||||
set(CORTEX_M_LINK_FLAGS " -pie ")
|
||||
set(LIBC_NAME "muslc")
|
||||
set(ARCH_NAME "armv7_8m")
|
||||
|
||||
|
||||
@@ -14,3 +14,6 @@
|
||||
#define ARCH_REG_5 "x5"
|
||||
#define ARCH_REG_6 "x6"
|
||||
#define ARCH_REG_7 "x7"
|
||||
|
||||
#define ARCH_WORD_SIZE 64
|
||||
|
||||
|
||||
@@ -19,3 +19,6 @@
|
||||
#define ARCH_REG_5 "r5"
|
||||
#define ARCH_REG_6 "r6"
|
||||
#define ARCH_REG_7 "r7"
|
||||
|
||||
#define ARCH_WORD_SIZE 32
|
||||
|
||||
|
||||
@@ -47,8 +47,13 @@ typedef union msg_tag
|
||||
.msg_buf_len = (msg_words), \
|
||||
.map_buf_len = (buf_words), \
|
||||
.prot = (p)})
|
||||
#if ARCH_WORD_SIZE == 64
|
||||
#define msg_tag_get_prot(tag) \
|
||||
((int)((tag).prot))
|
||||
#else
|
||||
#define msg_tag_get_prot(tag) \
|
||||
((short)((tag).prot))
|
||||
#endif
|
||||
#define msg_tag_get_val(tag) msg_tag_get_prot(tag)
|
||||
|
||||
typedef union syscall_prot
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <u_thread_util.h>
|
||||
#include <u_thread.h>
|
||||
|
||||
static ATTR_ALIGN(8) uint8_t cons_stack[4096];
|
||||
static ATTR_ALIGN(8) uint8_t cons_stack[1024];
|
||||
// static uint8_t cons_msg_buf[MSG_BUG_LEN];
|
||||
static cons_t cons_obj;
|
||||
static obj_handler_t cons_th;
|
||||
@@ -49,7 +49,7 @@ void console_init(void)
|
||||
cons_svr_obj_init(&cons_obj);
|
||||
meta_reg_svr_obj(&cons_obj.svr, CONS_PROT);
|
||||
u_thread_create(&cons_th, (char *)cons_stack + sizeof(cons_stack) - 8, NULL, console_read_func);
|
||||
u_thread_run(cons_th, 3);
|
||||
u_thread_run(cons_th, 2);
|
||||
ulog_write_str(LOG_PROT, "cons svr init...\n");
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#一次读取一行,每行代表启动的应用程序,暂时不支持参数
|
||||
|
||||
# fatfs
|
||||
cpiofs
|
||||
# cpiofs
|
||||
# dm9000_drv
|
||||
# net
|
||||
sh
|
||||
|
||||
@@ -48,6 +48,8 @@ add_custom_target(
|
||||
mkdir -p ${CMAKE_SOURCE_DIR}/build/output/cpio
|
||||
COMMAND
|
||||
cp sh.bin ${CMAKE_SOURCE_DIR}/build/output/cpio/sh
|
||||
COMMAND
|
||||
cp sh.elf ${CMAKE_SOURCE_DIR}/build/output/sh.elf
|
||||
)
|
||||
if ((DEFINED CONFIG_ELF_LAUNCH) AND (CONFIG_ELF_LAUNCH STREQUAL "y"))
|
||||
add_custom_target(
|
||||
|
||||
Reference in New Issue
Block a user