]> Zhao Yanbai Git Server - acecode.git/commitdiff
...
authorAceVest <zhaoyanbai@126.com>
Fri, 27 Jul 2018 07:45:47 +0000 (15:45 +0800)
committerAceVest <zhaoyanbai@126.com>
Fri, 27 Jul 2018 07:45:47 +0000 (15:45 +0800)
rtos/CMakeLists.txt
rtos/components/CMakeLists.txt
rtos/components/debug/CMakeLists.txt [deleted file]
rtos/components/debug/Kconfig [deleted file]
rtos/components/debug/Kconfig.projbuild [deleted file]
rtos/components/debug/asm_debug.S [deleted file]
rtos/components/debug/component.mk [deleted file]
rtos/components/debug/debug.c [deleted file]
rtos/components/debug/debug.h [deleted file]
rtos/rtos.c

index 1bdf7ae88a46662a220ebfca8dedab871f6658d3..6ea8a8b27d5881b6410ab34d27e60bf6bf10fd28 100644 (file)
@@ -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)
index 2f6b0dddbd4b01a872db5a1d39dc5653018fc0ba..674c9a177ee8e62b9c056c60f5340d125a7604a8 100644 (file)
@@ -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 (file)
index 1c9d980..0000000
+++ /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 (file)
index e69de29..0000000
diff --git a/rtos/components/debug/Kconfig.projbuild b/rtos/components/debug/Kconfig.projbuild
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/rtos/components/debug/asm_debug.S b/rtos/components/debug/asm_debug.S
deleted file mode 100644 (file)
index db026e7..0000000
+++ /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 (file)
index e69de29..0000000
diff --git a/rtos/components/debug/debug.c b/rtos/components/debug/debug.c
deleted file mode 100644 (file)
index 05062d9..0000000
+++ /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 (file)
index 2abfbdc..0000000
+++ /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();
index 189d108e21f73e24c3df1f0de4c56da8338ec92c..7b361f89a0acfbc5ec279fff13619ad8e95c473f 100644 (file)
@@ -8,11 +8,11 @@
  */
 #include<stdio.h>
 #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;
 }