-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
Worked last week, now Fails to compile: ESP32 KeyError: "Invalid board option 'build.cpu'": #4056
Comments
Also noted in https://community.platformio.org/t/precompiled-libraries-error-in-5-2-0/23486/ The platformio-core/platformio/builder/tools/piolib.py Lines 566 to 571 in e6fd766
This was introduced in a recent commit that was supposed to correctly apply the "precompiled" flags of the CC @ivankravets critical. |
A workaround for now is to downgrade PlatformIO to the previous release. In a CLI, type |
Please give us a few minutes, we will release 5.2.1. @maxgerhardt, thanks for the report! 🙏 |
One thing that may be important when writing the fix is not only defaulting to |
Hmm the fix which now leaves CPU empty if it's not existing is not correct. platformio-core/platformio/builder/tools/piolib.py Lines 569 to 571 in 5546932
E.g., the BSEC library does have an That fix would just add the source folder of the library to the search path. I'd propse something like cpu_arch = board_config.get("build.cpu", board_config.get("build.mcu", ""))
if cpu_arch == "":
pass # error handling
self.env.PrependUnique(
LIBPATH=os.path.join(self.src_dir, cpu_arch)
) ESP8266 boards also have |
I added this line to my environment. Didn't fix anything. |
That is already there in the board definition, so it won't have any effect. If anything, on the buggy 2.0.0 version, try |
sounds good, thank you. I was loosing my mind I'm glad I reported the issue. 🥇 |
We tried to follow Arduino's specification https://arduino.github.io/arduino-cli/0.19/library-specification/#precompiled-binaries . However, those guys are strange. MCU & CPU are the same for them. As result, we see a mix of CPU & MCU among the library https://github.com/BoschSensortec/BSEC-Arduino-library/tree/master/src I've just added a workaround at 369e994 . It should work in all cases. Please re-test with |
Can confirm that PlatformIO now links against precompiled libraries in the example of my original issue with a ARM Cortex-M4 based |
I'm having similar problems as was presented by drphil3d. I'm having some difficulty understanding how to incorporate your fix into my installation. Based on info below, I think I may have broken something else. Can you recommend how I might get this fixed please? Thanks, Robert Obsolete PIO Core v5.2.0 is used (previous was 5.2.1b2) Processing esp32thing_plus (platform: espressif32; board: esp32dev; framework: arduino)Verbose mode can be enabled via
|
You have installed PlatformIO incorrectly, there are multiple cores in your system. Follow the referenced link to get more info. In short, try to uninstall all PlatformIO installations ( |
Thanks very much. I was able to get things restored and get the dev version
installed. That took care of the errors tied to this thread. I am still not
able to get that BSEC library to link. Not sure if I need to change a
setting or flag somewhere. Getting closer :-)
Kind regards,
Robert
…On Sun, Sep 26, 2021 at 12:28 Maximilian Gerhardt ***@***.***> wrote:
Obsolete PIO Core v5.2.0 is used (previous was 5.2.1b2)
Please remove multiple PIO Cores from a system:
https://docs.platformio.org/page/faq.html#multiple-platformio-cores-in-a-system
You have installed PlatformIO incorrectly, there are multiple cores in
your system. Follow the refernecd link to get more info. In short, try to
uninstall all PlatformIO installations (pip uninstall platformio, pip3
uninstall paltformio, sudo pip3 uninstall platformio, remove <home
folder>/.platformio completely) and reinstall it
<https://docs.platformio.org/en/latest/core/installation.html#installer-script>.
(Once all cores are removed though, the PlatformIO VSCode installatino will
recognize that and try to install PlatformIO again).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4056 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJJ3B2RXBVRTEARKSI273X3UD5J4LANCNFSM5EDIFHFA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@freemanr7 what is your |
; PlatformIO Project Configuration File [env:esp32thing_plus] The compilation errors:
Processing esp32thing_plus (platform: espressif32; board: esp32thing_plus; framework: arduino)Verbose mode can be enabled via
Terminal will be reused by tasks, press any key to close it. |
Please edit your previous post to format the output as code using three backticks in Markdown and not just copy-paste the output. I can't see the dependency graph at all in this formatting. Where does the BSEC library come from? You don't include it via When you open a CLI what does |
@maxgerhardt The BSEC library is from Bosch. You helped ukarthiksg on https://community.platformio.org/t/bsec-2-0-and-bme688/21813. pio --version now returns: PlatformIO Core, version 5.2.1b2. I added
Warm Regards, Robert |
Okay so you were not talking about BSEC Arduino Library but BSEC2. But it's still the same story -- no extra build flags are needed for linking to work if you correctly copy the library. When I download the referenced
|
That sounds very elegant. I will give it a try.
Thanks very much,
Robert
…On Tue, Sep 28, 2021 at 04:07 Maximilian Gerhardt ***@***.***> wrote:
Okay so you were not talking about BSEC Arduino Library
<https://github.com/BoschSensortec/BSEC-Arduino-library> but *BSEC2*.
But it's still the same story -- no extra build flags are needed for
linking to work *if you correctly copy the library*. When I download the
referenced bsec_2-0-6-1_generic_release_04302021.zip file, unpack it,
create a new blank project for the ESP32Dev, copy the
BSEC_2.0.6.1_Generic_Release_04302021\examples\bsec2folder intolib/, copy
the
BSEC_2.0.6.1_Generic_Release_04302021\examples\bsec2\examples\basic_config_state\basic_config_state.ino
intosrc/and addbuild_flags = -DLED_BUILTIN=2(to define the **LED** -- the
sketch needs that) to theplatformio.ini, it compiles without problems.
The 2.0.100is picked up by PlatformIO and the precompiled library from theesp32/`
folder is linked in automatically.
Linking .pio\build\esp32dev\firmware.elf
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 5.5% (used 18016 bytes from 327680 bytes)
Flash: [== ] 21.6% (used 283430 bytes from 1310720 bytes)
Building .pio\build\esp32dev\firmware.bin
=============== [SUCCESS] Took 9.31 seconds ===============
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4056 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJJ3B2QLKAZUSJRFD4F3HX3UEGAULANCNFSM5EDIFHFA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Configuration
Operating system:
Windows 10
PlatformIO Version (
platformio --version
):PlatformIO Core, version 5.2.0
Description of problem
Compile fails on project that's been working flawlessly for the past 8 months. Last week was able to compile just fine, noting has changed in the code base yet this week I get an obscure error that I'm unable to find any relevant documentation or solutions to. I'm getting this error on my other Windows 10 desktop as well. However, I'm able to compile a similar project with the same PIO file without issue.
I've done the regedit fix for python 3.9, didn't help. Uninstalled 3.9, same problem.
I currently have Python 3.7.7
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
The text was updated successfully, but these errors were encountered: