From: AceVest Date: Fri, 27 Jul 2018 07:45:47 +0000 (+0800) Subject: ... X-Git-Url: http://zhaoyanbai.com/repos/dnssec-importkey.html?a=commitdiff_plain;h=21cca3fbeefbababf6f2918280b4fd5bd1b85b70;p=acecode.git ... --- diff --git a/rtos/CMakeLists.txt b/rtos/CMakeLists.txt index 1bdf7ae..6ea8a8b 100644 --- a/rtos/CMakeLists.txt +++ b/rtos/CMakeLists.txt @@ -1,21 +1,27 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.12) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -SET(RTOS_VERSION_MAJOR 0) +SET(CMAKE_VERBOSE_MAKEFILE on) +SET(RTOS_VERSION_MAJOR 0) SET(RTOS_VERSION_MINOR 1) - PROJECT(rtos) +ENABLE_LANGUAGE(ASM) + CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/rtos_config.h.in" "${PROJECT_BINARY_DIR}/rtos_config.h" ) -add_subdirectory(components) +ADD_SUBDIRECTORY(components) + +INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}" + "components/utils") + +LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}) -include_directories("${PROJECT_BINARY_DIR}" - "components/debug") +ADD_EXECUTABLE(rtos rtos.c) -add_executable(rtos rtos.c) -target_link_libraries(rtos components) +# TARGET_LINK_LIBRARIES 参数里 debug optimized general 是关键词,不能用 +TARGET_LINK_LIBRARIES(rtos utils) diff --git a/rtos/components/CMakeLists.txt b/rtos/components/CMakeLists.txt index 2f6b0dd..674c9a1 100644 --- a/rtos/components/CMakeLists.txt +++ b/rtos/components/CMakeLists.txt @@ -1,2 +1 @@ -AUX_SOURCE_DIRECTORY(debug COMPONENTS_SRCS) -ADD_LIBRARY(components ${COMPONENTS_SRCS}) +ADD_SUBDIRECTORY(utils) diff --git a/rtos/components/debug/CMakeLists.txt b/rtos/components/debug/CMakeLists.txt deleted file mode 100644 index 1c9d980..0000000 --- a/rtos/components/debug/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -SET(CMAKE_ASM_FLAGS "-c") -ADD_LIBRARY(debug - debug.c - asm_debug.S -) - diff --git a/rtos/components/debug/Kconfig b/rtos/components/debug/Kconfig deleted file mode 100644 index e69de29..0000000 diff --git a/rtos/components/debug/Kconfig.projbuild b/rtos/components/debug/Kconfig.projbuild deleted file mode 100644 index e69de29..0000000 diff --git a/rtos/components/debug/asm_debug.S b/rtos/components/debug/asm_debug.S deleted file mode 100644 index db026e7..0000000 --- a/rtos/components/debug/asm_debug.S +++ /dev/null @@ -1,7 +0,0 @@ -.global _asm_debug - -_asm_debug: - nop - nop - nop - ret diff --git a/rtos/components/debug/component.mk b/rtos/components/debug/component.mk deleted file mode 100644 index e69de29..0000000 diff --git a/rtos/components/debug/debug.c b/rtos/components/debug/debug.c deleted file mode 100644 index 05062d9..0000000 --- a/rtos/components/debug/debug.c +++ /dev/null @@ -1,13 +0,0 @@ -/* - * ------------------------------------------------------------------------ - * File Name: debug.c - * Author: Zhao Yanbai - * 2018-07-07 14:02:11 Saturday CST - * Description: none - * ------------------------------------------------------------------------ - */ - -int debug() { - - return 0; -} diff --git a/rtos/components/debug/debug.h b/rtos/components/debug/debug.h deleted file mode 100644 index 2abfbdc..0000000 --- a/rtos/components/debug/debug.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * ------------------------------------------------------------------------ - * File Name: debug.h - * Author: Zhao Yanbai - * 2018-07-26 15:47:46 Thursday CST - * Description: none - * ------------------------------------------------------------------------ - */ - -#pragma once - -void debug(); - -void asm_debug(); diff --git a/rtos/rtos.c b/rtos/rtos.c index 189d108..7b361f8 100644 --- a/rtos/rtos.c +++ b/rtos/rtos.c @@ -8,11 +8,11 @@ */ #include #include "rtos_config.h" -#include "debug.h" +#include "utils.h" int main(int argc, char *argv[]){ printf("rtos: version %u.%u\n", RTOS_VERSION_MAJOR, RTOS_VERSION_MINOR); debug(); asm_debug(); - return 0; + return 0; }