Board ST 32F413HDISCOVERY fail


#1

after creating an empty project with this board ST 32F413HDISCOVERY, mbed framework, compiling the empty project gives me the following error::

Processing disco_f413zh (platform: ststm32; board: disco_f413zh; framework: mbed)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: ST STM32 > ST 32F413HDISCOVERY
SYSTEM: STM32F413ZHT6 100MHz 128KB RAM (512KB Flash)
DEBUG: CURRENT(stlink) ON-BOARD(stlink) EXTERNAL(blackmagic, jlink)
Library Dependency Finder -> 
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 25 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <mbed-mbedtls>
Compiling .pioenvs\disco_f413zh\FrameworkMbedCore\cmsis\TARGET_CORTEX_M\mbed_tz_context.o
Compiling .pioenvs\disco_f413zh\FrameworkMbedCore\drivers\AnalogIn.o
Compiling .pioenvs\disco_f413zh\FrameworkMbedCore\drivers\BusIn.o
Compiling .pioenvs\disco_f413zh\FrameworkMbedCore\drivers\BusInOut.o
In file included from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH\device/cmsis.h:35:0,
from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH/objects.h:19,
from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4/device.h:38,
from C:\Users\saggi\.platformio\packages\framework-mbed/platform/platform.h:29,
from C:\Users\saggi\.platformio\packages\framework-mbed/drivers/DigitalInOut.h:19,
from C:\Users\saggi\.platformio\packages\framework-mbed/drivers/BusInOut.h:19,
from C:\Users\saggi\.platformio\packages\framework-mbed\drivers\BusInOut.cpp:16:
C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH\device/stm32f4xx.h:171:12: fatal error: stm32f411xe.h: No such file or directory

*********************************************************************
* Looking for stm32f411xe.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:stm32f411xe.h"
* Web  > header:stm32f411xe.h
*
*********************************************************************

#include "stm32f411xe.h"
^~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\disco_f413zh\FrameworkMbedCore\drivers\BusInOut.o] Error 1
In file included from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH\device/cmsis.h:35:0,
from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH/objects.h:19,
from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4/device.h:38,
from C:\Users\saggi\.platformio\packages\framework-mbed/platform/platform.h:29,
from C:\Users\saggi\.platformio\packages\framework-mbed/drivers/AnalogIn.h:19,
from C:\Users\saggi\.platformio\packages\framework-mbed\drivers\AnalogIn.cpp:17:
C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH\device/stm32f4xx.h:171:12: fatal error: stm32f411xe.h: No such file or directory

*********************************************************************
* Looking for stm32f411xe.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:stm32f411xe.h"
* Web  > 
*
*********************************************************************

#include "stm32f411xe.h"
^~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\disco_f413zh\FrameworkMbedCore\drivers\AnalogIn.o] Error 1
In file included from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH\device/cmsis.h:35:0,
from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH/objects.h:19,
from C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4/device.h:38,
from C:\Users\saggi\.platformio\packages\framework-mbed/platform/platform.h:29,
from C:\Users\saggi\.platformio\packages\framework-mbed/drivers/BusIn.h:19,
from C:\Users\saggi\.platformio\packages\framework-mbed\drivers\BusIn.cpp:16:
C:\Users\saggi\.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH\device/stm32f4xx.h:171:12: fatal error: stm32f411xe.h: No such file or directory

*********************************************************************
* Looking for stm32f411xe.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:stm32f411xe.h"
* Web  > 
*
*********************************************************************

#include "stm32f411xe.h"
^~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\disco_f413zh\FrameworkMbedCore\drivers\BusIn.o] Error 1
=============================================================================================== [ERROR] Took 3.18 seconds ===============================================================================================

any suggestions?


#2

Weird. Do you have a space in your username or did you explicitly change PLATFORMIO_HOME_DIR to point to a folder called “saggi.platformio”?


#3

No, the windows account name is saggi. copy and paste error. The path is:

C:\Users\saggi.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH\device/stm32f4xx.h:171:12: fatal error: stm32f411xe.h: No such file or directory

I have only create the project and compiling it, but fail


#4

this editor drop the \ between saggi and .platformio


#5

True, I’ve put it in a code block using the backticks and it shows up. I’ll test shortly.


#6

Thank you very much. I hope to solve or I have to go to develop directly in mbed, and I do not like it …
Sorry for my english :smile:


#7

This is an error in PIO. In the board json file it wrongly defines

  "build": {
    "cpu": "cortex-m4",
    "extra_flags": "-DSTM32F411xE",
    "f_cpu": "100000000L",
    "mcu": "stm32f413zht6"
  },

However this is no F411xE board but a F413xx board. Typo maybe, @ivankravets?

This triggers the wrong inclusion of the header file

#elif defined(STM32F411xE)
  #include "stm32f411xe.h"

instead of the correct on

#elif defined(STM32F413xx)
  #include "stm32f413xx.h"

within .platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F4\TARGET_STM32F413xH\device\stm32f4xx.h

Anyway to fix it, go to your .platformio directory (Windows: C:\Users\<user>\.platformio, Linux /home/<user>/.platformio) and find the file .platformio\platforms\ststm32\boards\disco_f413zh.json and exchange -DSTM32F411xE with -DSTM32F413xx.


#8

Work perfectly. Thanks


#9

Thanks! Fixed in