Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32duino Opta PlatformIO Build Error: Missing 'stm32_def.h' File #815

Closed
osamahnini opened this issue Nov 17, 2024 · 1 comment
Closed

Comments

@osamahnini
Copy link

Describe the bug When attempting to build the project using PlatformIO with the Arduino framework for the Opta board, the compilation fails with a fatal error indicating that the stm32_def.h file is missing.

To Reproduce

Set up a PlatformIO project configured for the Opta board with the following platform and framework in platformio.ini:
ini

[env:opta]
platform = https://github.com/platformio/platform-ststm32.git
board = opta
framework = arduino

Include the following libraries in your platformio.ini:
ini

Attempt to build the project by running the build command in PlatformIO.
Observe the compilation error related to the missing stm32_def.h file.
Expected behavior The project should compile successfully without any missing file errors, resulting in a valid firmware binary for the Opta board.

OS: Windows 10
PlatformIO Version: 5.2.1 (example version; please specify your actual version)
STM32 core version: Using PlatformIO's platform-ststm32 at version 17.6.0+sha.9f7c0d8
Library versions: As listed in lib_deps
Upload method: SWD
Hardware (please complete the following information):

Board Name: Opta
Hardware Revision: Not specified
Extra hardware used if any:
STM32H747XIH6
WiFi module
RTC module
Additional context During the build process, the compiler cannot locate the stm32_def.h file, resulting in a fatal error. Below is the relevant portion of the build log:

In file included from .pio\libdeps\opta\STM32duino RTC\src\rtc.c:37:0:
.pio\libdeps\opta\STM32duino RTC\src\rtc.h:42:10: fatal error: stm32_def.h: No such file or directory

*******************************************************************
* Looking for stm32_def.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:stm32_def.h"
* Web  > https://registry.platformio.org/search?q=header:stm32_def.h
*
*******************************************************************

 #include "stm32_def.h"
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\opta\libdae\STM32duino RTC\rtc.c.o] Error 1

Summary of Issue:

Missing Header File: The build fails because the stm32_def.h file is not found. This suggests that a directed dependency is missing or not properly included in the project.
Suggested Actions:

Verify Library Dependencies: Ensure that all necessary libraries, especially those that provide the stm32_def.h file, are correctly installed and included in the project.
Search for the Missing File: Use the PlatformIO library registry to search for and include the missing stm32_def.h file.
CLI: platformio lib search "header:stm32_def.h"
Web: PlatformIO Library Registry
Check Library Compatibility: Confirm that the versions of the libraries used are compatible with the platform-ststm32 and the Opta board.
Update or Install Missing Libraries: If the stm32_def.h file is part of a specific library, add it to your lib_deps in platformio.ini.
Additional Resources:

PlatformIO Library Registry
stm32duino GitHub Repository
stm32duino Forum

@valeros
Copy link
Member

valeros commented Nov 18, 2024

Hi @osamahnini, the STM32duino RTC library is not compatible with the Opta board because this board uses a completely different Arduino core based on the mbed framework.

@valeros valeros closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants