From 6bfd4ffdeed0d4a4777ab003e34b5d7b1c7e64e7 Mon Sep 17 00:00:00 2001 From: impressionyang Date: Thu, 29 Sep 2022 22:07:17 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20=E6=9B=B4=E6=96=B0=EF=BC=88hello=20?= =?UTF-8?q?APP=EF=BC=89=EF=BC=9A=20APP=E4=BB=BB=E5=8A=A1=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/APP/CMakeLists.txt | 10 ++++++++++ main/APP/app_task_hello/app_task_hello.c | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 main/APP/CMakeLists.txt diff --git a/main/APP/CMakeLists.txt b/main/APP/CMakeLists.txt new file mode 100644 index 0000000..6757b37 --- /dev/null +++ b/main/APP/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.5) + +#添加子目录的源文件给_SUB_SOURCES +aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} _SUB_SOURCES) +#将子目录源文件,追加给根目录_SOURCES变量 +list(APPEND _SOURCES ${_SUB_SOURCES}) +#设置根目录_SOURCES变量在子目录有效 +set(_SOURCES ${_SOURCES} PARENT_SCOPE) + +add_subdirectory(app_task_hello) \ No newline at end of file diff --git a/main/APP/app_task_hello/app_task_hello.c b/main/APP/app_task_hello/app_task_hello.c index 6da3430..c819087 100644 --- a/main/APP/app_task_hello/app_task_hello.c +++ b/main/APP/app_task_hello/app_task_hello.c @@ -21,7 +21,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" -static void _app_hello_task_run() +static void _app_hello_task_run(void *param) { uint16_t idx = 0; while(1) { @@ -32,7 +32,8 @@ static void _app_hello_task_run() uint8_t app_hello_task_start() { - xTaskCreatePinnedToCore(_app_hello_task_run, "hello task", 1024, NULL, 5, NULL, tskNO_AFFINITY); + vTaskDelay(10); + xTaskCreatePinnedToCore(_app_hello_task_run, "hello task", 4096, NULL, 5, NULL, tskNO_AFFINITY); return 0; }