Skip to content

Compiling fails when there's a build_opt.h present in the folder #1350

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

Closed
RalphSommerer opened this issue Jul 6, 2021 · 2 comments
Closed
Assignees
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@RalphSommerer
Copy link

When compiling an Arduino project for the Arduino_Core_STM32 that contains a build_opt.h header file (to add further compile options), the following error is produced:

Arduino: 1.8.15 (Windows 10), TD: 1.54, Board: "Generic STM32F1 series, BluePill F103CB (or C8 with 128k), HID Bootloader 2.2, Enabled (generic 'Serial'), CDC (generic 'Serial' supersede U(S)ART), Low/Full Speed, Smallest (-Os default), Newlib Nano (default)"

arm-none-eabi-g++: error: #line: No such file or directory

arm-none-eabi-g++: error: 1: No such file or directory

exit status 1

Error compiling for board Generic STM32F1 series.

It used to work with the previous version of the Arduino IDE (1.8.13 or whatever), although it did fail with the same error when compiling using the Arduino-Cli.

I presume some sort of preprocessor failure (hence the error on the "#line" macro).

To Reproduce

Add a "build_opt.h" file to the folder containing the main sketch, then compile.

Contents of the "build_opt.h":

-DHAL_TIM_MODULE_ONLY
-DHAL_EXTI_MODULE_DISABLED

Expected behavior
Compilation succeeds (unless there are errors unrelated to this issue, obviously...)

Desktop

  • OS: Windows 10
  • Arduino IDE version: 1.8.15
  • STM32 core version: 2.0.0
  • Tools menu settings: see above error output
  • Upload method: HID Bootloader 2.2

Board

  • Bluepill F103C8 (with 128k)

Additional context
Again, it compiled just yesterday without error, before I upgraded to the latest version (1.8.15) of the Arduino IDE

@per1234 per1234 transferred this issue from arduino/Arduino Jul 6, 2021
@per1234
Copy link
Contributor

per1234 commented Jul 6, 2021

Hi @RalphSommerer. Thanks for taking the time to submit an issue.

I see we already have a prior issue report about this at #1338.

It's best to have only a single issue per subject so we can consolidate all relevant discussion to one place, so I'll go ahead and close this in favor of the other.

If you end up with additional information to share, feel free to comment in the other thread.

@per1234 per1234 closed this as completed Jul 6, 2021
@per1234 per1234 added topic: code Related to content of the project itself type: bug conclusion: duplicate Has already been submitted labels Jul 6, 2021
@RalphSommerer
Copy link
Author

I searched but didn't find....

Thanks!

@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@per1234 per1234 self-assigned this Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants