2 months, 1 week ago.

Fatal Error while cli compile for DISCO_F769NI

Every time I compile with the following command mbed compile -t GCC_ARM -m DISCO_F769NI

I get the below error: [Fatal Error] stm32469i_discovery.h@48,27: stm32f4xx_hal.h: No such file or directory [ERROR] In file included from .\BSP_DISCO_F469NI\Drivers\BSP\STM32469I-Discovery\stm32469i_discovery.c:42:0: .\BSP_DISCO_F469NI\Drivers\BSP\STM32469I-Discovery\stm32469i_discovery.h:48:27: fatal error: stm32f4xx_hal.h: No such file or directory

  1. include "stm32f4xx_hal.h" ^ compilation terminated.

How do I fix this? Best Regards, Rob

UPDATE - just tried on another machine and got this error: [Fatal Error] platform.h@30,20: device.h: No such file or directory [DEBUG] Return: 1 [DEBUG] Output: In file included from ./mbed/mbed.h:39:0, [DEBUG] Output: from .\main.cpp:14: [DEBUG] Output: ./mbed/platform/platform.h:30:20: fatal error: device.h: No such file or directory [DEBUG] Output: #include "device.h" [DEBUG] Output: ^ [DEBUG] Output: compilation terminated. Traceback (most recent call last): File "C:\mbed-cli\projects\genplus2a\.temp\tools\make.py", line 293, in <module> ignore=options.ignore File "C:\mbed-cli\projects\genplus2a\.temp\tools\build_api.py", line 575, in build_project objects = toolchain.compile_sources(resources, sorted(resources.get_file_paths(FileType.INC_DIR))) File "C:\mbed-cli\projects\genplus2a\.temp\tools\toolchains\init.py", line 413, in compile_sources return self.compile_seq(queue, objects) File "C:\mbed-cli\projects\genplus2a\.temp\tools\toolchains\init.py", line 427, in compile_seq res['command'] File "C:\mbed-cli\projects\genplus2a\.temp\tools\toolchains\init.py", line 583, in compile_output raise ToolException(_stderr) ToolException: In file included from ./mbed/mbed.h:39:0, from .\main.cpp:14: ./mbed/platform/platform.h:30:20: fatal error: device.h: No such file or directory

  1. include "device.h" ^ compilation terminated.

I do not have a device.h header in my main.cpp file.

***** SOLUTION FOUND **** I had a directory for a different processor in the directory tree for the program. Remove them and it compiled

Question relating to:

The STM32F769I-DISCO discovery board is a complete demonstration and development platform providing Ethernet, USB, LCD, audio, and wifi connection
Comment on this question

1 Answer

2 months ago.

Hi Robert,

Glad you found the solution, mbed-cli finds all the files under mbed projects, but there are some other ways to exclude those files by .mbedignore, more detail please refer here.

https://os.mbed.com/docs/mbed-os/v5.13/reference/mbed-os-build-rules.html

Regards, Desmond