Getting started with Arduino Nano RP2040(Windows 10 & Linux Ubuntu) -Arm Embedded Learning Challenge
Identified Issues while beginning to work with Arduino Nano RP2040 Connect with Headers running on the Raspberry Pi RP2040 and 133MHz 32bit Arm® Cortex®-M0+ processor.
My previous experience is with other ESP32 micro-controllers for industrial IoT use cases running on micro-python, this is my first time working with the Arduino Nano RP2040, running on a 133MHz 32bit Arm® Cortex®-M0+. As many learners appeared not have knowledge about Arm.Follow this link to learn more about the Arm’s processor and who they are as a company,most importantly about their IP ecosystem.
I got my Arduino Nano RP2040 about a week ago and while I was busy, I did set out this weekend to test it and see what is going on. In this post, I shall mention I few things I have come across so that the learners in the arm-embedded learning challenge can easily resolve the same issues if they came across them and also find answers to the ones they are having. For those interested in learning more about the board, I found the article quite useful, remember to read its data sheet here. This is quite important knowledge.
I am running a dual boot (Win10 & Ubuntu 20 distribution) on my PC, so I will share my experience working with the board in both operating systems.
On Windows10
On windows, I tried installing both Arduino 1.8.18 and Arduino 1.8.16. With 1.8.18, I quickly ran into this issue while verifying the sketch.
http://arm-none-eabi/include/c++/7.2.1/cstdlib:41:10:fatal error:bits/c++config.h:No such file or directory 20#include 3Cbits/c++config.
compilation terminated.
Here is a link to Arduino's old software releases in case you want to try different versions to find which one is stable relative to your operating or distribution for those working with Linux and i guess in minimal cases Windows.
On reading a few articles online, especially this one on GitHub by the Arduino engineers, I first tried older the 1.6.9 version for curiosity's sake to check which versions are stable with different types of Linux distributions. However, I ran into this issue.
Nano RP2040 Connect not being detected on USB port
.
This was because under Tools → Boards, the Arduino Nano RP2040 was not being highlighted. Finally, I decided to switch and start working with the 1.8.16 version, the installation was smooth and the board was easily detected. It’s important to install the Arduino Mbed OS Nano Boards package and not confuse it with some of the similar packages like the Arduino Mbed OS Edge Boards. However, upon verifying the sketch successfully I ran into upload issues.Which are similar to this issue mentioned in this forum article. However, I found that this issue can be resolved easily by doing the following:
Ensure that you have the show verbose output checked under File > Preferences > Show verbose output during upload checked.
Ensure that you have the board and port selections right as shown below. And at this point, you can successfully upload the code onto your target device.
On Linux Ubuntu 20.04.5 LTS
Trying Arduino 1.8.19
On my Ubuntu distribution(20.04.5), the first attempt was to work with Arduino 1.8.19, however, i was pretty much welcomed by my first error as shown below.
Arduino IDE 1.8.9 does not install correctly on Ubuntu 18.04.2.
Despite this not being my Linux distribution, i was facing the same issue as these guys. Simply because the Arduino Icon could not launch the IDE after following all the steps shared in this article on the Arduino website. The creation of symlinks in-order to change ownership rights to the IDE icon while linking it back to the IDE application produced fruitless results. Here is the code i tried in order to make the icon work.
sudo chown yourusername /path/to/icon/arduino-arduinoide.desktop.
I am not sure but it seems this works for guys on Ubuntu 18.10 ,Ubuntu 19 and raspberry Pi 4. I shall try to run both of these either using Virtual box in Windows or Docker with the containerized image distributions(Ubuntu 18.10 & 19) on my current OS and share my findings.Again, still with Arduino 1.8.9, i ran into the following issue.
./arduino: line 35: /path/arduino-1.8.19-linuxaarch64/arduino-1.8.19/java/bin/java: cannot execute binary file: Exec format error.
Which i immediately pointed and also reached out to the Arduino engineers, however the issue was closed with no response, too bad.
Trying Arduino 1.6.9
After many attempts, my next logic was to find an Arduino IDE that is stable with my Linux distribution, so i tried Arduino 1.6.9, the installation was fine with no errors but still could not launch the Arduino IDE icon. So i had to launch the IDE from the terminal as indicated below.
Also with this version, i did ran into another new issue as seen below.
Uploading occurs for long time and never ends!
The details of this issue are well elaborated in this article. So this version did not work for me either.
Hurrah!! Arduino 1.8.15 - Working solution with Ubuntu 20.04.5
Finally i tried working with Arduino 1.8.15. Which you can download from here. And as seen in this image.
You can use instructions in this link to install the IDE. However after installation and during upload you are likely to face this issue:
An error occurred while uploading the sketch.
Now this can be solved by,running the command
sudo /.post_install.sh
bash script that is located in/home/{username}/.arduino15/packages/arduino/hardware/mbed_nano/3.4.1
to access this directory can run this command in your terminal.
cd /.arduino15/packages/arduino/hardware/mbed_nano/3.4.1
Remember to replace {username} with your username.
After running the script, go back to the IDE and try to re upload the sketch again and everything should work perfectly.
Interestingly after working successfully with 1.8.15, i went back and ran Arduino 1.6.9 IDE. The upload was also very successful . As shown below. So good news you have both IDE versions working.
To all the learners facing this or similar issues, i hope what i have shared is useful and you can quickly get back to coding happily. Also share your insights that you have come across,so that others learn from you also.
Thank you
Micheal Nayebare