Question
STM32CubeMX 4.23.0 project with MbedTLS build problem in Windown
Posted on November 08, 2017 at 12:52
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 directory4. 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 \-DSTM32F407xx6. Run make again. Build fails:C:\Source\targets\stm32f407g-disc1\cubemx>makemkdir 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.oMiddlewares/Third_Party/mbedTLS/library/ssl_ticket.c:25:10: error: &sharpinclude expects 'FILENAME' or <FILENAME>
&sharpinclude MBEDTLS_CONFIG_FILE ^~~~~~~~~~~~~~~~~~~make.EXE': *** [build/ssl_ticket.o] Error 1It 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?
#mbedtls #stm32f4-discovery-gnu-makefiles #makefile #build