diff options
author | Nuno Guterres Nogueira <38976366+nguterresn@users.noreply.github.com> | 2023-07-27 13:11:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 13:11:22 +0300 |
commit | 1544768719c7346817d7e6b6b17457d845985604 (patch) | |
tree | 2714a4316c7c2eab7226cf3d9a611fd5c36ba58b /README.md | |
parent | b13e2698bb1dc0778bb4b5078c03a34097108497 (diff) |
Updated README.md for cross-compilation (#723)
* Update README.md
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -25,6 +25,13 @@ FetchContent_Declare( freertos_kernel ) ``` +In case you prefer to add it as a git submodule, do: + +```bash +$ git submodule add https://github.com/FreeRTOS/FreeRTOS-Kernel.git <path of the submodule> +$ git submodule update --init +``` + - Add a freertos_config library (typically an INTERFACE library) The following assumes the directory structure: - `include/FreeRTOSConfig.h` ```cmake @@ -41,6 +48,12 @@ target_compile_definitions(freertos_config ) ``` +In case you installed FreeRTOS-Kernel as a submodule, you will have to add it as a subdirectory: + +```cmake +add_subdirectory(${FREERTOS_PATH}) +``` + - Configure the FreeRTOS-Kernel and make it available - this particular example supports a native and cross-compiled build option. @@ -56,6 +69,13 @@ endif() FetchContent_MakeAvailable(freertos_kernel) ``` +- In case of cross compilation, you should also add the following to `freertos_config`: + +```cmake +target_compile_definitions(freertos_config INTERFACE ${definitions}) +target_compile_options(freertos_config INTERFACE ${options}) +``` + ### Consuming stand-alone - Cloning this repository To clone using HTTPS: |