Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Advanced users • The text "pico" replaced by "-sdk 1" in path by cmake when building FreeRTOS+FAT+CLI

$
0
0
I cloned FreeRTOS+FAT+CLI and can build the examples using the FreeRTOS in my main project. When I set up my CMakeLists.txt file in my main project in the same way as the examples, something replaces the "pico" in a path with "-sdk 1". A grep shows nothing in the project with "-sdk 1".

The correct path is:

Code:

/home/pi/dev/pico/pico-w-weather-station-freertos/lib/FreeRTOS-Kernel/portable/ThirdParty/GCC/RP2040/include/freertos_sdk_config.h
but something is changing it to:

Code:

/home/pi/dev/-sdk 1/-sdk 1-w-weather-station-freertos/lib/FreeRTOS-Kernel/portable/ThirdParty/GCC/RP2040/include/freertos_sdk_config.h

Code:

In file included from /home/pi/dev/pico/pico-sdk/src/common/pico_base_headers/include/pico.h:33,                 from /home/pi/dev/pico/pico-w-weather-station-freertos/lib/FreeRTOS-Kernel/portable/ThirdParty/GCC/RP2040/include/portmacro.h:39,                 from /home/pi/dev/pico/pico-w-weather-station-freertos/lib/FreeRTOS-Kernel/include/portable.h:53,                 from /home/pi/dev/pico/pico-w-weather-station-freertos/lib/FreeRTOS-Kernel/include/FreeRTOS.h:108,                 from /home/pi/dev/pico/pico-w-weather-station-freertos/src/main.c:1:/home/pi/dev/pico/pico-sdk/src/common/pico_base_headers/include/pico/config.h:23:56: fatal error: /home/pi/dev/-sdk 1/-sdk 1-w-weather-station-freertos/lib/FreeRTOS-Kernel/portable/ThirdParty/GCC/RP2040/include/freertos_sdk_config.h: No such file or directory   23 | #include __PICO_XSTRING(PICO_CONFIG_RTOS_ADAPTER_HEADER)      |                                                        ^

Code:

cmake_minimum_required(VERSION 3.13)set(PICO_BOARD pico_w CACHE STRING "Board type")set(FREERTOS_KERNEL_PATH "${CMAKE_CURRENT_LIST_DIR}/lib/FreeRTOS-Kernel" CACHE STRING "Path to the FreeRTOS Kernel")include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)include(${FREERTOS_KERNEL_PATH}/portable/ThirdParty/GCC/RP2040/FreeRTOS_Kernel_import.cmake)project(sample)pico_sdk_init()add_subdirectory(  ${CMAKE_CURRENT_LIST_DIR}/lib/FreeRTOS-FAT-CLI-for-RPi-Pico/src/FreeRTOS+FAT+CLI build)add_executable(sample  src/main.cpp  src/hw_config.c)# Note, you should pick the FreeRTOS library that suits you best:# # FreeRTOS-Kernel-Heap1 thru FreeRTOS-Kernel_Heap4# or # FreeRTOS-Kernel-Statictarget_link_libraries(sample  pico_stdlib  pico_cyw43_arch_none  FreeRTOS-Kernel-Heap4  FreeRTOS+FAT+CLI)# FreeRTOSConfig.h needs to be in the include pathtarget_include_directories(sample PRIVATE  ${CMAKE_CURRENT_LIST_DIR}  include/)target_compile_options(sample PUBLIC -Wall  -Wextra  -Wshadow  -Wstack-usage=2048  -fanalyzer )target_compile_definitions(sample PUBLIC  pico-sdk  PICO_USE_STACK_GUARDS=1  PICO_MALLOC_PANIC=1  PICO_MAX_SHARED_IRQ_HANDLERS=6)target_compile_definitions(sample PRIVATE   USE_PRINTF )set_property(TARGET sample APPEND_STRING PROPERTY LINK_FLAGS  "-Wl,--print-memory-usage")pico_enable_stdio_usb(sample 1)pico_enable_stdio_uart(sample 1)pico_add_extra_outputs(sample)

Statistics: Posted by codebrane — Sat Jun 07, 2025 6:37 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles