From a5b85d6017270217a371469a4c50a97a8940a5a1 Mon Sep 17 00:00:00 2001 From: Han Chen <1433255094@qq.com> Date: Thu, 11 Jan 2024 09:36:40 +0000 Subject: [PATCH] fix: hello word compile error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: hello word compile error https://atomgit.com/tobudos/kernel/change/1 squash 合并: * fix: hello word compile error --- .gitignore | 4 ++++ Project/Linux_Posix/hello_world/CMakeLists.txt | 12 +++++------- arch/linux/posix/gcc/port.h | 5 +++++ 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96bdef6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +**/build/ +*.o +*.a +.DS_Store \ No newline at end of file diff --git a/Project/Linux_Posix/hello_world/CMakeLists.txt b/Project/Linux_Posix/hello_world/CMakeLists.txt index 8790572..2a5d4c0 100644 --- a/Project/Linux_Posix/hello_world/CMakeLists.txt +++ b/Project/Linux_Posix/hello_world/CMakeLists.txt @@ -9,15 +9,13 @@ set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall") set(TINY_ROOT ../../../) include_directories(${TINY_ROOT}/osal/cmsis_os) -include_directories(${TINY_ROOT}/kernel/core/include) -include_directories(${TINY_ROOT}/kernel/evtdrv/include) -include_directories(${TINY_ROOT}/kernel/hal/include) -include_directories(${TINY_ROOT}/kernel/pm/include) +include_directories(${TINY_ROOT}/core/include) +include_directories(${TINY_ROOT}/hal/include) +include_directories(${TINY_ROOT}/pm/include) set(CMSIS_SRCS ${TINY_ROOT}/osal/cmsis_os/cmsis_os.c) -aux_source_directory(${TINY_ROOT}/kernel/core CORE_SRCS) -aux_source_directory(${TINY_ROOT}/kernel/evtdrv EVTDRV_SRCS) -aux_source_directory(${TINY_ROOT}/kernel/pm PM_SRCS) +aux_source_directory(${TINY_ROOT}/core CORE_SRCS) +aux_source_directory(${TINY_ROOT}/pm PM_SRCS) set(ARCH_ROOT ${TINY_ROOT}/arch/linux) diff --git a/arch/linux/posix/gcc/port.h b/arch/linux/posix/gcc/port.h index a8f0f28..92f0904 100644 --- a/arch/linux/posix/gcc/port.h +++ b/arch/linux/posix/gcc/port.h @@ -47,7 +47,12 @@ #define SIG_SUSPEND SIGUSR1 #define SIG_RESUME SIGUSR2 +#ifdef __APPLE__ +#define SIG_CONTEXT_SWITCH SIGIO +#warning this signal just for compile pass on macOS, can not real run +#else #define SIG_CONTEXT_SWITCH SIGRTMIN +#endif #define SIG_TICK SIGALRM #define TIMER_TYPE ITIMER_REAL