You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
I'm trying to do the same as the guy here #548.
Using FakeArduino native to unit test with platform io, where ArduinoJson is deeply integrated.
I already tried the fix from the issue there, but I suppose sth. changed, that makes it not work anymore, or I missed something.
lib/ArduinoJson-6.18.5/src/ArduinoJson/Polyfills/pgmspace_generic.hpp:14:10: error: reinterpret_cast from 'const void' to 'const __FlashStringHelper *' is not allowed
return reinterpret_cast<T>(pgm_read_ptr(p));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/ArduinoJson-6.18.5/src/ArduinoJson/Deserialization/DeserializationError.hpp:100:12: note: in instantiation of function template specialization 'ArduinoJson6185_F1::pgm_read<const __FlashStringHelper *>' requested here
return ARDUINOJSON_READ_STATIC_ARRAY(const __FlashStringHelper*, messages,
^
lib/ArduinoJson-6.18.5/src/ArduinoJson/Polyfills/static_array.hpp:20:7: note: expanded from macro 'ARDUINOJSON_READ_STATIC_ARRAY'
pgm_read<type>(name + index)
The text was updated successfully, but these errors were encountered:
I couldn't find the source of FakeArduino, but it seems that pgm_read_ptr() doesn't return the correct type: it should be const void*, but the error message says it's const void.
This is a common bug in cores that emulate the original pgmspace.h header.
It already poped up in #1381, #1442, #1519, #1536, and #1591.
The root of this bug was fixed a year ago in arduino/ArduinoCore-API#118, but many clones are still using the old code.
I invite you to open a PR in the FakeArduino repository.
In the meantime, you can work around this issue by disabling PROGMEM in ArduinoJson by setting ARDUINOJSON_ENABLE_PROGMEM to 0.
Describe the issue
I'm trying to do the same as the guy here #548.
Using FakeArduino native to unit test with platform io, where ArduinoJson is deeply integrated.
I already tried the fix from the issue there, but I suppose sth. changed, that makes it not work anymore, or I missed something.
Troubleshooter report
Here is the report generated by the ArduinoJson Troubleshooter:
ArduinoJson Troubleshooter's report
Environment
Here is the environment that I'm using':
Further information
platform.ini file content:
Compile output:
The text was updated successfully, but these errors were encountered: