-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Particle compiler error in an empty project #1433
Comments
Hi @chinesefellow, Thank you very much for reporting this bug. The problem came from the fact that Particle defines some of the To fix this issue, I added a check before enabling support for Moreover, I added Particle Argon to the Continuous Integration so this kind of problem never happens again. Until the fix is published, you can simply define ARDUINOJSON_ENABLE_PROGMEM to Best regards, |
Thank you for such a great library! My students and I use it every year.
Daniel Law
he / him / his
Teacher of Awesome Things
FIRST Robotics Competition Coach
Computer Science Department Chair
Lane Tech High School
drlaw@cps.edu
*One who makes no mistakes makes nothing. - **Giacomo Casanova*
…On Wed, Nov 11, 2020 at 2:57 AM Benoît Blanchon ***@***.***> wrote:
Hi @chinesefellow <https://github.com/chinesefellow>,
Thank you very much for reporting this bug.
The problem came from the fact that Particle defines some of the
pgm_read_XXX macros in spark_wiring_arduino.h
<https://github.com/particle-iot/device-os/blob/7b7d28bf76db44111271abac23d247f09ebb8540/wiring/inc/spark_wiring_arduino.h>,
like pgm_read_byte and pgm_read_word, but lacks pgm_read_ptr,
pgm_read_float, and pgm_read_dword.
Particle does define these macros in avr/pgm_space.h
<https://github.com/particle-iot/device-os/blob/1b1805fb4afcb93b0e92fbecfd28c082d6310285/wiring/inc/avr/pgmspace.h>,
but I cannot include this header from ArduinoJson because the Arduino
Core API deprecated it
<https://github.com/arduino/ArduinoCore-API/blob/cd4ba4ca9ebc3421c65d3b19abe60820b8c4cf25/api/deprecated-avr-comp/avr/pgmspace.h>
so it may not be available on every platform.
To fix this issue, I added a check before enabling support for PROGMEM in
ArduinoJson: it now verifies that all macros are defined.
Moreover, I added Particle Argon to the Continuous Integration
<aa7cc53>
so this kind of problem never happens again.
Until the fix is published, you can simply define
ARDUINOJSON_ENABLE_PROGMEM
<https://arduinojson.org/v6/api/config/enable_progmem/> to 0.
Best regards,
Benoit
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1433 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACN2IYBP45NGK3FTGJ54CRDSPJGWNANCNFSM4TP3WDFA>
.
|
The fix was published in version 6.17.2. |
Tried including the ArduinoJson library today. Version 6.17.1. Without writing any additional code besides having an empty setup and loop function, a compiler error is generated.
I have another project/app in the Particle environment using version 6.14.1 and that one is still working.
Here's the raw error:
The text was updated successfully, but these errors were encountered: