Adapting XOD to new HW platforms

Hello guys, I believe that XOD is an impressive piece of work. Since I’m developing an IoT prototyping board based on STM32 micros I was wondering if you put some thought on writing a XOD adaptation guide, i.e. what are the minimal HW requirements and what are steps to follow to get XOD integration like on Arduino but on a different board. Thanks
Max

1 Like

Hello and welcome!

The most important question is whether the target board could be programmed from Arduino IDE or not (yet). If it is not Arduino-compatible yet, the first thing to do is implementing a new core for it (provide digitalRead, digitalRead, Serial, etc, etc). For example, Teensy (based on STM32) did it.

If the board is already Arduino-enabled, fine! It’s kinda viable solution to generate code in XOD and compile/upload it with Arduino IDE.

At the moment XOD IDE has no trivial way to plug a new target board into the list we see in the upload dialog. But we’ll try to simplify that. When we’ll add support for ESP8266/ESP32 and Teensy, the steps would become apparent and I will able to write down a guide article on this topic.

1 Like

The “port” to the ATTiny was pretty straightforward, using the ATTinyCore lib for the IDE, along with a fixed-point library called “FixedPoints”, also available from the Arduino IDE library manager. Only have to alter about ten lines of code, like a couple casts that need to be changed because the fixed-point data type can only be explicitly converted to a “double.” SRAM is so limited on that series of devices that using 4 bytes of it for every node input and output is just a killer;2 bytes for an integer underlying representation is more reasonable.

4k of program memory and 256 bytes of RAM seems about the minimum to get an XOD sketch up and running, but it won’t be anything elaborate. With 8k and 512 bytes of SRAM, using the above mods and link-time optimization I have upwards of 50 nodes of various types working on an ATTiny85, no problem at all.

With that in mind it seems like some of the low-end MSP430s wouldn’t be hard to do, they’re pretty popular. 16 bit registers and the ability to address SRAM as two-byte words would help a lot

Hi, thanks for the tip. Actually teensy looks like are based on Atmel and Freescale micros, though it’s worth investigating. I’ll dig into Arduino-compatibility for my board.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.