✅ 更新(hello APP): APP任务已经可以启动
This commit is contained in:
parent
6bf1ae00d9
commit
6bfd4ffdee
10
main/APP/CMakeLists.txt
Normal file
10
main/APP/CMakeLists.txt
Normal file
@ -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)
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user