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; }