cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 4.23.0 project with MbedTLS build problem in Windown

Grigori
Associate II
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 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: &sharpinclude expects 'FILENAME' or <FILENAME>

 &sharpinclude 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?

#mbedtls #stm32f4-discovery-gnu-makefiles #makefile #build
4 REPLIES 4
Imen.D
ST Employee
Posted on November 13, 2017 at 10:56

Hi,

I raised your issue internally for further review and will come back to you as soon as possible.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on November 14, 2017 at 11:08

Hi,

Actually the same problem I can see in Eclipse environment. I have to make following definition as build option in Eclipse in Windows environment to make build working:

 -DMBEDTLS_CONFIG_FILE=\'mbedtls_config.h\'

It doesn't work without escaped quotes.
Jeanne Joly
Senior III
Posted on February 13, 2018 at 13:27

Hi

Timonen.Grigori

,

Thanks for reporting this issue.

Our development team is working on that point. The correction should be available in the next CubeMX release.

I will keep you informed.

BR. Jeanne

Posted on March 13, 2018 at 10:02

Hello,

The invalid symbol definition for MBEDTLS_CONFIG_FILE issue is fixed with

/external-link.jspa?url=https%3A%2F%2Fmy.st.com%2Fcontent%2Fmy_st_com%2Fen%2Fproducts%2Fdevelopment-tools%2Fsoftware-development-tools%2Fstm32-software-development-tools%2Fstm32-configurators-and-code-generators%2Fstm32cubemx.license%253d1520929626html

version 4.0

Kind Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen