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
  • #546
Closed
Open
Issue created Jul 07, 2017 by Administrator@rootContributor

Compile error on Particle Photon Firmware 0.6.2

Created by: kasperkamperman

@I'm trying to use ArduinoJSON on the Particle Photon. I use the latest stable firmware 0.6.2.

I've included the the .h file like #include "ArduinoJson-v5.11.0.h" and it's stored in the application folder (I compile offline with po-util).

The .hpp gave the same errors.

Minimal example:

#include "Particle.h"
#include "ArduinoJson-v5.11.0.h"

void setup() {

}

void loop() {
  
}

Error:

n file included from /Users/kamperman/GitHub/settingsTutorial/firmware/application.cpp:2:0:
/Users/kamperman/GitHub/settingsTutorial/firmware/ArduinoJson-v5.11.0.h: In static member function 'static bool ArduinoJson::Internals::StringTraits<const __FlashStringHelper*, void>::equals(const __FlashStringHelper*, const char*)':
/Users/kamperman/GitHub/settingsTutorial/firmware/ArduinoJson-v5.11.0.h:424:32: error: 'PGM_P' was not declared in this scope
     return strcmp_P(expected, (PGM_P)str) == 0;
                                ^
/Users/kamperman/GitHub/settingsTutorial/firmware/ArduinoJson-v5.11.0.h: In static member function 'static char* ArduinoJson::Internals::StringTraits<const __FlashStringHelper*, void>::duplicate(const __FlashStringHelper*, Buffer*)':
/Users/kamperman/GitHub/settingsTutorial/firmware/ArduinoJson-v5.11.0.h:429:29: error: 'PGM_P' was not declared in this scope
     size_t size = strlen_P((PGM_P)str) + 1;
                             ^
/Users/kamperman/GitHub/settingsTutorial/firmware/ArduinoJson-v5.11.0.h:431:43: error: expected ')' before 'str'
     if (dup != NULL) memcpy_P(dup, (PGM_P)str, size);
                                           ^
make[2]: *** [../build/target/user/platform-6-m/firmware/application.o] Error 1
make[1]: *** [user] Error 2
make: *** [modules/photon/user-part] Error 2
Assignee
Assign to
Time tracking