bblanchon / ArduinoJson

📟 JSON library for Arduino and embedded C++. Simple and efficient.
https://arduinojson.org
MIT License
6.7k stars 1.12k forks source link

[portability] Can I use ArduinoJson on Nios II platform? #1657

Closed bupjae closed 3 years ago

bupjae commented 3 years ago

ArduinoJson version: v6.18.4 Target platform: Nios II (on MAX 10 FPGA) Toolchain: nios2-elf-gcc (Altera 20.1 Build 720) 10.1.1 20200707

Quote from https://en.wikipedia.org/wiki/Nios_II ::

Nios II is a 32-bit embedded-processor architecture designed specifically for the Altera (now acquired by Intel) family of field-programmable gate array (FPGA) integrated circuits.

I just attached ArduinoJson-v6.18.4.h as-is on my Nios II project, and simple serialization / deserialization seems work. However, I'm not sure whether it is OK to use more advanced feature of ArduinoJson, as Nios II is not on the list of "Works with board".

  1. Is Nios II supported platform?
  2. Which "processor" should be selected when using https://arduinojson.org/v6/assistant/ ?

Thanks in advance.

bblanchon commented 3 years ago

Hi @bupjae,

ArduinoJson 6.18.4 should work fine on Nios II except that it doesn't set ARDUINOJSON_EMBEDDED_MODE to 1, so it consumes more memory. I'll release a new revision to fix this and add the option in the ArduinoJson Assistant.

Best regards, Benoit

bblanchon commented 3 years ago

I just published version 6.18.5 and updated the Assistant.

bblanchon commented 2 years ago

@bupjae, did you get the opportunity to test the new version and the Assistant?

bupjae commented 2 years ago

I tried ArduinoJson-v6.18.5 with some advanced features (like custom writer), and I didn't find any issue yet. I'll report if there is any concern with Nios.

Thanks for creating / maintaining such great library.