Build amazon-freertos using GCC + CMAKE


I’m trying to build the amazon-freertos project. I run the following commands:

echo "set(AFR_MANIFEST_BOARD_DIR \"boards\" CACHE INTERNAL \"\") > /vendors/manifest/manifest.cmake 
echo "set(AFR_MANIFEST_SUPPORTED_BOARDS \"amebaZ2\" CACHE INTERNAL \"\") >> /vendors/manifest/manifest.cmake 

mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=<path>/cmake-toolchain -DAFR_BOARD=realtek.amebaZ2

And I get the following error:

CMake Error at CMakeLists.txt:70 (include):
include could not find load file:


=========================Resolving dependencies==========================
CMake Error at tools/cmake/afr_utils.cmake:222 (message):
aws_demos is not a target.
Call Stack (most recent call first):
tools/cmake/afr_module.cmake:232 (afr_get_target_dependencies)
tools/cmake/afr_module.cmake:221 (__search_afr_dependencies_impl)
tools/cmake/afr_module.cmake:336 (__search_afr_dependencies)
CMakeLists.txt:110 (afr_resolve_dependencies)

– Configuring incomplete, errors occurred!

Please can you help me?

1 Like

Hi @Pablo_Martinez

Thanks for reaching out to us, please let us know the SDK version that you are currently using so we can better assist you~

amazon-freertos 1.4.7 downloaded from GitHub - ambiot/amazon-freertos: amazon-freertos with realtek modifications

master branch, commit a0867ec631cd106afdf578951ae8b8546f8bb090

Hi @Pablo_Martinez , from the link you provided, it’s clear that this project can only be built using IAR, have you tried compiled using IAR?

Yes, I need to compile the source code from a Linux terminal in order to integrate it in my CI/CD system.

When it is expected project to support CMake build system?

I am not sure, bcos this is an open source SDK, supports may be slower as compared to NDA SDK which support building using GNU make build system