Closed
Description
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
- The issue happens at compile time
- The error is not in the list
Environment
Here is the environment that I'm using':
- Microconroller: NA
- Core/runtime: NA
- IDE: Platform IO and VS Code
Further information
platform.ini file content:
[env:native]
platform = native
test_ignore = embedded
build_flags = -std=gnu++11
lib_deps =
ArduinoJson-6.18.5
ArduinoFake
#lib_archive = false
Compile output:
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)