I’m working on an mBlock extension that would enable custom blocks for controlling a LED strip that’s attached to the Arduino Leonardo board.
I am using mBlock v4.0.4 on Ubuntu (64bit). I was forced to take this preview version because the only “production” linux version was for 32bit platform.
I have created the s2e file and put the myClass.cpp and myClass.h files in the src folder. The myClass.h has to be included when any of the extension blocks are used, so I have specified the “inc” property for every block definition in the s2e file.
The extension zip file imports without issues. The blocks are shown in the IDE. The Arduino code is generated correctly. However, the problem is that at upload there’s a “Compiling failed” error, and thers’s info in the log - “Fatal error: myClass.h: No such file or directory”
How to debug such error?In what path the ino file is verified/compiled? It appears that the extension files are not copied to that path prior to compilation.
Another, more general problem, is that code upload to Arduino fails with “Cannot communicate with the board” error, and after that it is not possible to connect via USB anymore, the first upload failure apparently messes up the port and/or conversation with the board, so any further attempts are futile until the board is disconnected and reconnected. It is also not possible to upload firmware to the board, when USB connection is established, I get the same “Cannot communicate with the board” error.