Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

[Solved] Upload firmware issues with Arduino Uno, SimulIDE

2 posters

Go down  Message [Page 1 of 1]

nymo



Hi team,

Apologies for bothering you all with such a basic issue but I'm facing a bit of trouble using SimulIDE with the Arduino UNO board it comes with. Before I describe my issue allow me to mention my system specs:
  • Arch Linux 5.18.12-arch1-1
  • Arduino 1.8.19 (from the official Arch repos)
  • SimulIDE 0.4.15_SR9-1 (from the AUR; I've also tried the official 0.4.15 SimulIDE tarball and the latest March SimulIDE-1.0.0_rc2 release candidate tarball from this website as well.)

The problem I'm having is that when I select an Arduino UNO board and attach an LED to it (pins 12 or 13 and one to ground), I am unable to get it to light up at all. I have tried the following approaches:
  1. Trying the Blink program in the Arduino IDE and uploading "Bink.ino.hex" as firmware, which gives me no error (so I assume it successfully uploaded) but when running the simulation, doesn't work at all. The LED doesn't light up, with or without a resistor.
  2. Thinking that maybe it would be more direct if I write up the blink program within SimulIDE, I try to set my Arduino toolchain path to the one I see being used in the Arduino IDE (/usr/share/arduino/) but that doesn't work either: I get "Error resolving FQBN: unknown package arduino" as an error.


I have also tried reinstalling Arduino completely (as recommended here), (and as recommended here), but to no avail. Launching SimulIDE from my terminal also doesn't yield any useful error logging as to why it's failing.

Additionally if I might add, the 1.0.0 RC2 unstable release segfaults on my system when I click on the cog button to access Editor Settings (it happens at any time during program runtime, either after idling for an hour with/without text, a board, even immediately after launching.)

I am required to use SimulIDE as a part of my embedded systems engineering course and being unable to get such a simple program to work is a little disheartening (moreso because I'm certain I've missed something very elementary). Any help here would be greatly appreciated!

As a small aside: the minimalist and legacy design of the forum post section is truly nostalgic! Smile



Last edited by nymo on Fri Nov 11, 2022 9:27 am; edited 1 time in total (Reason for editing : Marked issue as solved)

arcachofo

arcachofo

Hi.

Arduino IDE from Debian based repositories are known to not work in simulide, not sure about Arch.
But you can compile from Arduino IDE and use the generated hex.

If you use Arduino IDE downloaded from Arduino website then you need to set the path to this files, not /usr/share/arduino/
And you should be able to compile and upload from simulide.

You can perform some test to determine what is happening.
First use the latest 0.4.15 downloaded from simulide website, then try with simulide from AUR.

1- To test that Arduinos are working in your system, go to Left Panel->File explorer->Examples->Arduino
- Open any example, for example AlarmClock.
- Run the simulation and see if it works.

2- To test Blink.ino.hex compiled with Arduino IDE just right-click in the Aduino (in simulide), select "Load Firmware" and find Blink.ino.hex.
You don't need to attach a led, just watch the builtin led.

3- To compile from simulide you need to download Arduino IDE from it's website.
Then the best approach is to create a "project" folder:
- Create your circuit and save it in project folder: my_project/my_circuit.simu
- Create an sketch folder inside project folder, for example: my_project/Blink/Bink.ino
- Open my_project/Blink/Bink.ino in simulide
- Set compiler path to the folder containing Arduino IDE downloaded.
- In simulide editor click on "Upload" button, this will compile  and upload hex (it also will save a copy of Blink.hex in project folder).

Let me know what works and what doesn't to solve it.

nymo likes this post

nymo



Hi Arcachofo,

Thanks a ton for responding and your assistance, it works!!!

To summarise:
  1. I verified the examples, they worked
  2. I created a project directory before uninstalling my arduino package
  3. I reinstalled Arduino 1.8.19 from the Arduino website
  4. I directed SimulIDE to use the downloaded version of Arduino


To elaborate:
To start, I rebooted my system and continued with my original environment:
  • Arch Linux 5.18.12-arch1-1
  • Arduino 1.8.19 (from the official Arch repos)
  • SimulIDE 0.4.15_SR9-1 (from the AUR)


I began with your suggestion of testing out the exemplar simulations and they worked without a problem. I then tried loading the .hex file of my compiled blink simulation code onto a plain Arduino Uno board (without an attached LED) and ran the simulation, but it did not work. (This was compiled using the Arduino IDE from the Arch repos and the temp .hex file was in /tmp/arduino/).

I then prepared a project directory as you suggested (SimulIDE/Projects/led_blink.simu and SimulIDE/Projects/led_blink/led_blink.ino), uninstalled Arduino from my system, reinstalled it not from the Arch repos but from the Arduino website and directed SimulIDE's compiler path to the downloaded & extracted directory.

I did not compile anything within the Arduino IDE, I simply opened up my led_blink.ino file within SimulIDE (as you suggested) and successfully uploaded it onto my board and then watched my LED blink!!!

In conclusion: the arduino package from the official Arch repos does not cooperate with SimulIDE, the version from the Arduino website does.

Thanks once again! What a Face

arcachofo

arcachofo

Glad to know you got it working.

Just to clarify:
Loading an hex file directly from the simulation (not compiled in simulide) should work.

And:
Additionally if I might add, the 1.0.0 RC2 unstable release segfaults on my system when I click on the cog button to access Editor Settings (it happens at any time during program runtime, either after idling for an hour with/without text, a board, even immediately after launching.)
This issue is already solved.
I think  it happens if you try to open settings without any file opened in the Editor.
Anyway thanks for reporting.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum