Have you got problems with installing XOD IDE and blinking LED?


#1

If you have followed our quick start tutorial you should successfully blink a LED with XOD. The product is very young so there are many things that could go wrong.

If you stumbled upon some problems, please, tell us. If it’s relevant, provide information about your PC, error texts, or screenshots. We’ll try to help.


#2

I’ve just installed the IDE (OS is Linux Mint 18.1, using Debian package), but can’t get past the settings. It prompts me to “choose your workspace directory” which I do (selecting a folder on the hard drive), but I get the error “Unknown error occurred: [object Object]”. The same prompt then keeps popping up over and over again, apparently stuck in an infinite loop.

I can provide a screenshot if it would help, but there isn’t much to see yet aside from the dialog window and error message.


#3

Hi there!

Thanks for the report, we’re investigating this bug.
Meanwhile, you can try to unpack initial workspace manually, select it in the IDE and begin xoding.
Here are ZIPped workspace: Download from Google.Drive

If you notice any other errors, feel free to contact.


#4

I’ll give that workaround a try. Also useful to know: the “choose your workspace directory” dialog has an X button in the top right corner, but clicking it doesn’t close the dialog (or it reopens instantly again).


#5

I managed to get the Blink sketch loaded, pointing to the folder you linked has solved the problem.

Unfortunately, when connecting an Arduino UNO and trying to deploy the Blink sketch to it, I get the error that Arduino IDE executable could not be found. At no point was it mentioned that Arduino IDE is required. When installing the Debian package, dpkg reported that all dependencies were resolved. Clearly, the dependency on the Arduino IDE is missing from the package installer!

I’m programming Arduinos through PlatformIO, because in my opinion, the Arduino IDE is an archaic editor. I’d much rather not install it if its sole purpose is to give XOD access to the avrgcc and avrdude tools.
Hence the question, since I have the Arduino UNO toolchain installed for PlatformIO, can I point to PlatformIO instead of to Arduino IDE?


#6

Well, we should add Arduino as an optional/recommended dependency to dpkg.

Currently, Arduino IDE is required to upload programs. Not only avr-gcc and avrdude are used, but their “build system” as well. To build a sketch successfully all dependencies (libraries) should be discovered automatically and build commands should be constructed from template strings stored in boards.txt files that come with Arduino IDE.

Running arduino with right command line arguments allows completing build process easily. Reimplementing the build system would take a significant amount of time, and I’m not sure we should have it on top of our backlog although I agree that this dependency looks bulky.

Thank you for pointing to PlatformIO. I’ll take a look at how they solve the problem.


#7

I agree, it shouldn’t be a priority right now.

The way PlatformIO does it, is downloading the Arduino tool chain on demand the first time the user selects a project to be deployed to an Arduino board. For Arduino, PlatformIO seems to download 3 packages:

  • framework-arduinoavr
  • tool-avrdude
  • toolchain-atmelavr
    These folders can be found under ~/.platformio/packages after starting an Arduino project for the first time. They contain the entire build system, as well as the default Arduino libraries, headers, and the boards.txt file.

All these are available from Github, and seem to be up to date. So PlatformIO already maintains a “copy” of the Arduino build system. Instead of requiring the Arduino IDE, I would suggest investigating the possibility to use the PlatformIO repository as a shared resource, and download the dependencies from Github the first time XOD runs, if Arduino IDE is not installed already on the system.


#8

hi there!

win 8.1, arduino ide 1.6.11

Oops! Error occured.

Could not find or install Arduino PAV for PAB: avr,arduino,1.6.19

upd

next attempts did not cause the same error, now I get a warning on invalid filetype (upload.tmp.cpp), then “The program uploaded successfully” but no blinking on the board


#9

Thanks for the report. I’ll try to reproduce the bug and fix it as soon as possible.
If you want to begin xoding now, update your Arduino IDE to the latest version.


#10

ENVIRONMENT:
INTEL I7-6500U CPU @ 2.59GHz, 16GB
WIN10 Home 64bit
ARDUINO IDE 1.8.2

FEEDBACK:
BLINK code worked on ARDUINO UNO. Connection USB cable.
Did not work on NANO. Connection USB cable
Did not work on PRO MINI. Connection USB cable on FTDI232 card.

Both instances of not working reported 100% completed uploads.
By the way, XOD reports successful uploads regardless of the processor type chosen. I have a screenshot of NANO attached but UNO selected and the uploaad msg is successful. This does not happen in the ARDUINO IDE.

When I viewed and copied the generated ARDUINO code into the ARDUINO IDE, error messages were generated and the compilation did not complete. These errors were generated for all three processor settings.

I could not include the errors here as it was over 35K in length and and messages are limited to 32K. I also could not attach a file since you only accept pic files.


Upload failed through IDE
#11

Everything seemed to install ok - Win10, Arduino 1.6.12 on a generic Nano clone. The issue I’m having is while it looks like it uploads, nothing happens. It “finds” arduino, (your program is being uploaded) and I get the arduino IDE splash screen… The progress bar fills in and it says it was sucsessfully uploaded, but none of that appears to be true.

If I take the code and copy-paste it into native IDE, it uploads fine - same port, same board.


#12

@tguneysu the reason it is reported successfully is because both the Arduino UNO and the Arduino Nano use the same microcontroller (Atmega328) so the code will run on both. The download tool Avrdude does not know which board is connected, only which type of microcontroller is connected.


#13

Hi Victor,

Did some more checking after I read your message about bad code getting in and noticed something:

When one displays the generated ARDUINO code and the window opens up, there are two parts - the upper part with code and the bottom part with a message about directly uploading to Arduino.

If one presses CTRL-C without first clicking on the code section of the window, then the bottom message gets pickup and causes the syntax errors. If, however, one first clicks the code window and then CTRL-C, it all copies correctly and it runs OK from the Arduino IDE. Just FYI !

NANO Testing:
I had reported that my NANO (USB connected) did not run the XOD BLINK upload. I had read somewhere that uploading a blank sketch sometimes helps certain problems. So I first uploaded a BLANK Sketch to NANO in ARDUINO IDE, then I uploaded the code from XOD and it runs. And all subsequent uploads also worked OK with BLINK. Have not tested any other XOD code yet.

PRO MINI Testing:
This one is connected via a FTDI card to my PC’s USB port. It was not running anything before.
Once I fixed the copy / paste problem described above, it now runs the XOD generated code from Arduino IDE.

However, it will not run the XOD direct upload. Messages are all indicating successful uploads but it will not run. When I observe the FTDI TX and RX light during the XOD upload, there is absolutely NO ACTIVITY at all. So it seems like XOD does not like the FTDI interface or it’s communication with Arduino iDE is in error.

I will continue testing with UNO and NANO until PRO problem gets fixed.

Happy debugging.


#14

Hello Victor,

Some more good news.
I think the NANO not working with the XOD upload has something to do with Arduino IDE and XOD clashing when they are both running.

I can definitely upload from ARDUINO IDE while XOD is running and all sketches run OK.
However, when I upload from XOD while ARDUINO IDE is ALSO running, I get mixed results of uploads working and not working. Once I terminate the ARDUINO IDE, TX / RX lights start flashing and all seems to run fine with XOD.

There is a pretty long delay after XOD reports everything uploaded successfully and when the actual code transmit happens based on the TX / RX light activity. It is confusing if one is not watching carefully. It seems like the program did not work, but then once the upload is actually completed then it starts running.

Quick summary feedback:
I do NOT like the staged development cycle that is very asynchronous with what is really happening. One is left wondering if code did not work, or uploads are not yet complete, or Arduino IDE is running and nothing really happened.


#15

Thank you so much for deep debugging. That is much information to work with.

We’ll check the problems you’ve mentioned tomorrow. I suspect we incorrectly determine when the upload completes and whether it completes with an error or not. Need to check it closely.


#16

I use Mac IDE on MacBook Pro latest OS.

At first could not create a folder. Used your link to Google drive to fix it.
Then I could not upload code to Arduino M0 with Arduino either IDE or XOD -> Deploy

Arduino error:
Arduino: 1.8.2 (Mac OS X), Плата:"Arduino M0"

Изменены опции сборки, пересобираем все
In file included from /Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,
                 from /Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd.h:105,
                 from /Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/sam.h:470,
                 from /Users/ivan_karmanov/Library/Arduino15/packages/arduino/hardware/samd/1.6.15/cores/arduino/Arduino.h:48,
                 from /Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:17:
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:27: error: expected nested-name-specifier before '(' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                           ^
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:1006:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:27: error: expected unqualified-id before '(' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                           ^
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:1006:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:27: error: expected ';' before '(' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                           ^
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:1006:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:38: error: expected ')' before '*' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                                      ^
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:1006:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:38: error: expected ')' before '*' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                                      ^
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:1006:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino: In function 'void _program::xod__core__digital_output::evaluate(_program::NodeId, _program::xod__core__digital_output::State*)':
Test_XOD:1018: error: parse error in template argument list
     const int port = (int)getValue<Inputs::PORT>(nid);
                           ^
Test_XOD:1018: error: no matching function for call to 'getValue(_program::NodeId&)'
     const int port = (int)getValue<Inputs::PORT>(nid);
                                                     ^
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:1018:53: note: candidate is:
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:822:29: note: template<class InputT> typename InputT::ValueT _program::getValue(_program::NodeId)
     typename InputT::ValueT getValue(NodeId nid) {
                             ^
/Users/ivan_karmanov/Documents/Arduino/Test_XOD/Test_XOD.ino:822:29: note:   template argument deduction/substitution failed:
Test_XOD:1018: error: template argument 1 is invalid
     const int port = (int)getValue<Inputs::PORT>(nid);
                                                     ^
exit status 1
parse error in template argument list

In XOD IDE:

Oops! Error occured.

Error occured during uploading: Error: Загрузка конфигурации...
Инициализация пакетов...
Подготовка плат...
Проверка...
In file included from /Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,
                 from /Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd.h:105,
                 from /Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/sam.h:470,
                 from /Users/ivan_karmanov/Library/Arduino15/packages/arduino/hardware/samd/1.6.15/cores/arduino/Arduino.h:48,
                 from /Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:17:
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:27: error: expected nested-name-specifier before '(' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                           ^
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:980:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:27: error: expected unqualified-id before '(' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                           ^
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:980:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:27: error: expected ';' before '(' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                           ^
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:980:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:38: error: expected ')' before '*' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                                      ^
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:980:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:478:38: error: expected ')' before '*' token
 #define PORT              ((Port     *)0x41004400UL) /**< \brief (PORT) APB Base Address */
                                      ^
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:980:11: note: in expansion of macro 'PORT'
     using PORT = InputDescriptor<Number, offsetof(Storage, input_PORT)>;
           ^
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp: In function 'void _program::xod__core__digital_output::evaluate(_program::NodeId, _program::xod__core__digital_output::State*)':
upload.tmp.cpp:992: error: parse error in template argument list
     const int port = (int)getValue<Inputs::PORT>(nid);
                           ^
upload.tmp.cpp:992: error: no matching function for call to 'getValue(_program::NodeId&)'
     const int port = (int)getValue<Inputs::PORT>(nid);
                                                     ^
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:992:53: note: candidate is:
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:822:29: note: template<class InputT> typename InputT::ValueT _program::getValue(_program::NodeId)
     typename InputT::ValueT getValue(NodeId nid) {
                             ^
/Users/ivan_karmanov/Library/Preferences/xod/upload.tmp.cpp:822:29: note:   template argument deduction/substitution failed:
upload.tmp.cpp:992: error: template argument 1 is invalid
     const int port = (int)getValue<Inputs::PORT>(nid);
                                                     ^
exit status 1

#17

@ellanorsh It’s a name clashing. PORT is a global macro that is defined for M0 target internally (Uno doesn’t have it). At the same time, PORT identifier is used by XOD. In XOD it is scoped to the node implementation but I see it doesn’t help because the global namespace is polluted.

I’m afraid there is no quick workaround for M0. I have added the bug to our issue tracker and we’ll resolve it with the next release.

Thank you for the report.


#18

Hi, sorry I’m new to this. Down loaded and set up the IDE, no problems. When I upload the sketch the slider is all green but it only displays “The program loaded successfully” no information about bytes used or anything of the sort. The led does not blink. If I copy and paste the code from “show code for Arduino” into my Arduino IDE, it works. I wanted to try XOD because I’m new to coding. The solution could be something simple but, it is beyond my, currently, limited knowledge.


#19

@kenl Thanks for testing. Definitely, it’s a bug.

What board do you have? Did you select board model in upload dialog correctly?


#20

I have an OSEPP Uno R3 Plus. My OS is Windows 10 version 1607 build 14393.1358 and I’m using Arduino IDE version 1.6.12. The board selected is Arduino/Genuino Uno on com3, that is the only com option and the one that works with the Arduino IDE. I also noted that while XOD says it is uploading the program the RX/TX leds do not flash as they do while uploading from the Arduino IDE. Thanks for the quick reply.