-
-
Notifications
You must be signed in to change notification settings - Fork 398
.h files are now preprocessed #1338
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
Comments
@fpistm Would it not be better to fix this by using a different extension that .h? Since |
@matthijskooijman
And this is exactly what I've suggested at the end of my OP:
For me ".opt" is fine and more explicit: About the copy I don't yet think about it but it can always be done by the prebuild recipe. |
Just chiming in to say that am not ignoring this. We're focusing on developing the Pluggable Discovery and it's taking most of our time, I want to take a look at this as soon as we're done with the Pluggable. No ETA for now. |
See: arduino/arduino-cli#1338 When the above issue will be fix. This change should be reviewed. This is backward compatible. Signed-off-by: Frederic Pillon <[email protected]>
See: arduino/arduino-cli#1338 When the above issue will be fix. This change should be reviewed. This is backward compatible. Signed-off-by: Frederic Pillon <[email protected]>
Describe the bug
STM32 core allows user to define some value by adding a build_opt.h file at sketch level.
This file is not a standard header file as it is used by the gcc command line with
@file
option.https://github.com/stm32duino/wiki/wiki/Customize-build-options-using-build_opt.h
To achieve this a simple recipe hooks prebuild is used. When no file exists at sketch level it creates an empty one.
It works fine until Arduino 1.8.13. Since 1.8.15 it is failed.
.h
file extension has been used because Arduino 1.8.x does not allow to create file without a specific extension (ino, c, cpp, h, hpp).I guess it is linked to #1224
For example a build_opt.h with:
-DHAL_CRC_MODULE_ENABLED
is converted to:
Below the build result due to the
#line
addition:Using command:
To Reproduce
Steps to reproduce the behaviour:
build_opt.h
file containing the line-DHAL_CRC_MODULE_ENABLED
to an examplearduino-cli compile -b STMicroelectronics:stm32:Nucleo_144:pnum=NUCLEO_H743ZI2 C:\\STM32\\arduino\\arduino-1.8.15\\portable\\sketchbook\\blink_minimal\\blink_minimal.ino
Expected behavior
Do not preprocess .h file and able to build.
Desktop (please complete the following information):
arduino-cli version
): arduino-cli.exe alpha Version: 0.18.3 Commit: d710b64 Date: 2021-05-14T12:36:58ZAdditional context
Issue originally reported by an user here:
stm32duino/Arduino_Core_STM32#1387
arduino/arduino-ide#363
Maybe a fix would be to add an extra file extension to avoid to parse it. Ex: .opt or simply .txt.
The text was updated successfully, but these errors were encountered: