AnsweredAssumed Answered

STM32CubeMX 4.23.0 project with MbedTLS build problem in Windown

Question asked by timonen.grigori on Nov 8, 2017
Latest reply on Mar 13, 2018 by Imen D

Have following problem with STM32CubeMX 4.23.0 on Windows 7:

 

1. Create new project for STM32F4DISCOVERY board.
2. Generate code.
3. Update BINPATH in Makefile to point to latest arm-none-eabi binary directory
4. Run make from command line. Build works.
5. Add MbedTLS to CubeMX project with default settings. Regenerate code.
New Makefile has paths to MbedTLS andfollowing definition:
C_DEFS =  \
-DMBEDTLS_CONFIG_FILE="mbedtls_config.h" \
-DUSE_HAL_DRIVER \
-DSTM32F407xx

6. Run make again. Build fails:
C:\Source\targets\stm32f407g-disc1\cubemx>make
mkdir build
"C:\\software\\GCC\\6_2017-q2-update\\bin"/arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DMBEDTLS_CONFIG_FILE="mbedtls_config.h" -DUSE_HAL_DRIVER -DSTM32F407xx -IInc -IMiddlewares/Third_Party/mbedTLS/include -IDrivers/STM32F4xx_HAL_Driver/Inc -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32F4xx/Include -IMiddlewares/Third_Party/mbedTLS/include/mbedtls -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/ssl_ticket.d" -
MT"build/ssl_ticket.d" -Wa,-a,-ad,-alms=build/ssl_ticket.lst Middlewares/Third_Party/mbedTLS/library/ssl_ticket.c -o build/ssl_ticket.o

Middlewares/Third_Party/mbedTLS/library/ssl_ticket.c:25:10: error: #include expects "FILENAME" or <FILENAME>
 #include MBEDTLS_CONFIG_FILE
          ^~~~~~~~~~~~~~~~~~~
make.EXE": *** [build/ssl_ticket.o] Error 1

 

It seems -DMBEDTLS_CONFIG_FILE="mbedtls_config.h" should be replaced with -DMBEDTLS_CONFIG_FILE=\"mbedtls_config.h\" in Windows environment.

 

Are there any nuances I'm missing or is it a bug?

Outcomes