Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Issues
  • #1707
Closed
Open
Issue created Feb 04, 2022 by Administrator@rootContributor

Raspberry Pi Pico RP2040 fail to compile

Created by: cotestatnt

Describe the bug
Raspberry Pi Pico RP2040 fail to compile due to error in pgmspace.hpp

Troubleshooter report
Here is the report generated by the ArduinoJson Troubleshooter:

ArduinoJson Troubleshooter's report
  1. The issue happens at compile time
  2. The error is not in the list

Environment
Here is the environment that I used:

  • Raspberry Pi Pico RP2040
  • Arduino Mbed OS RP2040 and Raspberry Pi Pico/RP2040
  • Arduino IDE 1.8.16

Reproduction
Tested with StringExample.ino and with others example

Compiler output

...src/ArduinoJson/Polyfills/pgmspace.hpp: In function 'uint32_t pgm_read_dword(ArduinoJson6190_F1::pgm_p)':
...src/ArduinoJson/Polyfills/pgmspace.hpp:102:3: error: cannot convert 'ArduinoJson6190_F1::pgm_p' to 'const void*'
  102 |   memcpy_P(&result, p, 4);

Forcing the undef of memcpy_P before including ArduinoJson.h I can compile and it works as expected, but if I do the same in one of my library which has ArduinoJson as dependency it doesn't work. I have to edit directly the pgmspace.hpp (I suppose due to the Arduino compiler).

#undef memcpy_P
#include <ArduinoJson.h>
  .....
Assignee
Assign to
Time tracking