Application Compilation for FreeRTOS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Application Compilation for FreeRTOS

424件の閲覧回数
Rakesh_Raj1
Contributor I

Hello NXP community I am working on M33 MCUXpresso SDK in board i.max93evk.

I am designing FreeRTOS for custom board MCUXpresso SDK is in path
imx93-SDK/boards/mcimx93evk/
cmsis_driver_examples/
demo_apps/
driver_examples/
freertos_examples/
lwip_examples/
multicore_examples/
project_template/
trustzone_examples/
All examples are available, I have created a folder for my project and am designing freeRTOS in it. Problem: The problem is how to set the file path of CAN, UART, I2C, RTOS drivers in driver_examples file. For example: This error is coming for FreeRTOS.h file

/home/rakesh/M33_Sdk/imx93-SDK/boards/mcimx93evk/CESL_ultra/CESL_ultra_modules/modules/main.c:10:10: fatal error: FreeRTOS.h: No such file or directory
10 | #include "FreeRTOS.h"
How to set the path in CMakeList.txt




my CMakeList.txt 

# CROSS COMPILER SETTING
SET(CMAKE_SYSTEM_NAME Generic)
CMAKE_MINIMUM_REQUIRED (VERSION 3.10.0)

# THE VERSION NUMBER
SET (MCUXPRESSO_CMAKE_FORMAT_MAJOR_VERSION 2)
SET (MCUXPRESSO_CMAKE_FORMAT_MINOR_VERSION 0)

include(ide_overrides.cmake OPTIONAL)

if(CMAKE_SCRIPT_MODE_FILE)
message("${MCUXPRESSO_CMAKE_FORMAT_MAJOR_VERSION}")
return()
endif()


# ENABLE ASM
ENABLE_LANGUAGE(ASM)

SET(CMAKE_STATIC_LIBRARY_PREFIX)
SET(CMAKE_STATIC_LIBRARY_SUFFIX)

SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX)
SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX)

# CURRENT DIRECTORY
SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR})

SET(EXECUTABLE_OUTPUT_PATH ${ProjDirPath}/${CMAKE_BUILD_TYPE})
SET(LIBRARY_OUTPUT_PATH ${ProjDirPath}/${CMAKE_BUILD_TYPE})


project(CESL_ultra_modules)

set(MCUX_BUILD_TYPES debug release)

set(MCUX_SDK_PROJECT_NAME CESL_ultra_modules.elf)

if (NOT DEFINED SdkRootDirPath)
SET(SdkRootDirPath ${ProjDirPath}/../../../../../..)
endif()

include(${ProjDirPath}/flags.cmake)

include(${ProjDirPath}/config.cmake)

add_executable(${MCUX_SDK_PROJECT_NAME}
"${ProjDirPath}/../main.c"
"${ProjDirPath}/../pin_mux.c"
"${ProjDirPath}/../pin_mux.h"
"${ProjDirPath}/../board.c"
"${ProjDirPath}/../board.h"
"${ProjDirPath}/../clock_config.c"
"${ProjDirPath}/../clock_config.h"
"${ProjDirPath}/../FreeRTOSConfig.h"


# # Add source files from src directory
# "${ProjDirPath}/../src/addressClaim/addressClaim.c"
# "${ProjDirPath}/../src/J1939/J1939.c"

)

# target_include_directories(${MCUX_SDK_PROJECT_NAME} PRIVATE
# ${ProjDirPath}/..
# ${ProjDirPath}/../include
# ${ProjDirPath}/../src
# ${ProjDirPath}/../src/addressClaim
# ${ProjDirPath}/../src/J1939
# )

set_source_files_properties("${ProjDirPath}/../FreeRTOSConfig.h" PROPERTIES COMPONENT_CONFIG_FILE "middleware_freertos-kernel_template")


include(${SdkRootDirPath}/devices/MIMX9352/all_lib_device.cmake)

IF(NOT DEFINED TARGET_LINK_SYSTEM_LIBRARIES)
SET(TARGET_LINK_SYSTEM_LIBRARIES "-lm -lc -lgcc -lnosys")
ENDIF()

TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--start-group)

target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${TARGET_LINK_SYSTEM_LIBRARIES})

TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--end-group)

ADD_CUSTOM_COMMAND(TARGET ${MCUX_SDK_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_OBJCOPY}
-Obinary ${EXECUTABLE_OUTPUT_PATH}/${MCUX_SDK_PROJECT_NAME} ${EXECUTABLE_OUTPUT_PATH}/sdk20-app.bin)

set_target_properties(${MCUX_SDK_PROJECT_NAME} PROPERTIES ADDITIONAL_CLEAN_FILES "output.map;${EXECUTABLE_OUTPUT_PATH}/sdk20-app.bin")


0 件の賞賛
返信
1 返信

404件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi @Rakesh_Raj1 :

 

I would suggest you check the SdkRootDirPath.

please refer to below freertos project for reference.

[SDK_2_16_000_MCIMX93-EVK]\boards\mcimx93evk\freertos_examples\freertos_hello\armgcc\CMakeLists.txt

if (NOT DEFINED SdkRootDirPath)
SET(SdkRootDirPath ${ProjDirPath}/../../../../..)
endif()

 

In your project, 

if (NOT DEFINED SdkRootDirPath)
SET(SdkRootDirPath ${ProjDirPath}/../../../../../..)
endif()
 

For FreeRTOS relevant issue, please go to FreeRTOS forum for quick support.

FreeRTOS Community Forums - The FreeRTOS Community Forums

 

Regards

Daniel

 

 

0 件の賞賛
返信