8000 Compile error on Particle Photon Firmware 0.6.2 · Issue #546 · bblanchon/ArduinoJson · GitHub
[go: up one dir, main page]

Skip to content
Compile error on Particle Photon Firmware 0.6.2 #546
@kasperkamperman

Description

@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
< 54FE /div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0