MBEDTLS_USER_CONFIG_FILE and lorawan #266
Replies: 1 comment
-
So this seems to boil down to a preprocessor, cmake and mbed TLS issue and has very little to do with lorawan. In mbed-os\connectivity\mbedtls\include\mbedtls\config.h the following seems to work in MBED Studio (ARMCC) but not in mbed-ce/VS Code/cmake (GCC). :
In the project mbed_app.json5 file the following recommend macro method is added to modify the mbedtls/config.h file:
and the project root CMakeLists.txt contains with mbedtls_lora_config.h in the project root directory:
This results n the project build directory, mbed-target-config.h to end up with the #define:
and under mbed-ce/VS Code/cmake results in a slew of mbedtls include file errors:
|
Beta Was this translation helpful? Give feedback.
-
I'm targeting the NUCLEO_WL55JC using the latest mbed-os-example-lorawan using VS Code.
If I define MBEDTLS_USER_CONFIG_FILE with a file in my project root, I get:
I have in my CMakeLists.txt file (yes, I tried the define in both the mbed_app.json5 and here):
Just for info sake, I tried including this file directly in my main.cpp file with no issues. The example project works if I import it into Mbed Studio. I don't think this is a lorawan library issue, it just happens to use a configurable fearture in mbedtls. I've been scratching my head for a couple of days now and trying a few cmake changes but don't seem to be able to narrow down what appears to be something so simple.
Beta Was this translation helpful? Give feedback.
All reactions