Custom NRF52840 target problem with Mbed OS 6/cmake

This post helped me a lot to understand that I have to modify the CMakeLists.txt files and how to do it. I did not have any issue when compiling with cli1. However, when I tried to compile my code with cli2 I started having the same issues mentioned in this thread. There is one more thing I would like to add to this post.

If you are adding a custom board derived from an already supported MCU then these instructions work perfectly. But if you are adding also a new target mcu, then you have to modify one more CMakeLists.txt. I have an STM32L4S7ZIT6 MCU and it is not among the supported MCUs by default. After folowing all these steps I had to add add_subdirectory(TARGET_STM32L4S7xI EXCLUDE_FROM_ALL) to CMakeLists.txt file found in TARGET_STM32L4 folder. Here is my related question and the solution.

1 Like