Not sure what heppened to my post - perhaps awaiting a moderator?
Short version is I tried the Arduino Uno & Nano simulator on Windows 10 and Windows 8 with 2 different results.
In one case, I could single-step but some variable would not show in Ram-Table and the single steps seemed to skip over some code. Felt like possibly the debug symbols didn't match the code?
In the other case, when I compile the Arduino IDE would pop up and I could not get the code to be recognized in the SimulIDE window . Could this be a wrong Arduino build? (Seems like there were 2 branches of Arduino at some time.)
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
Yes, anonymous posting is allowed but must be aproved by a moderator.
About bedugging Arduino:
there are some limitations debugging Arduino code.
One of them is variables, all depends in what the compiler does with the variable.
In many cases a variable in C once compiled don't even exist is the binary code generated.
One posible workaround is declaring that variable global.
Also happens with source code lines, specially with calls to libraries methods.
This debugger is useful mostly for your own code, when the sketch is just calling external functions it is very limited.
About executing Arduino IDE instead of running hidden, that is probably a version issue.
Not sure wich is the first version that works with simulide, but it works with Arduino-1.8.3.
Wich Arduino version are you using?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2018-08-31
Thank you for your reply and for a very interesting simulator! I hope to learn it better!
I understand that some variables might not exist in the code - perhaps optimized away if not needed. I also understand that library calls would be stepped over/ignored. I thought I saw simple lines of code being ignored. I will try a simpler example. One situation was in a while(){ } statement where the debugger seemed to spin the rotating blue arrow endlessly when the while condition was no longer met.
Arduino Version 1.6.12 is working with Windows 10.
I think it was a version 1.0.X that didn't seem to work with Windows 7. I will check the version at home.
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes. this debugger is very basic, it doesn't use gbd, it was developed for GcBasic compiler and asm (pic &avr), then adapted to Arduino.
The plan is implementing gdb support for Arduino, and maybe avr-gcc and sdcc.
There will be some improvements available in next release, the while issue will be probably improved.
Anyway... can you provide the ino files with problems to have a look?
Thanks to you for taking the time to test and report these issues.
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2018-09-01
The Windows 7 system uses Arduino version 1.0.6 - this is the system where setting the compiler path and then clicking the compile button causes the Arduino IDE to start.
If I use Arduino version 1.6.9 with Windows 7, the set compiler path and clicking the compile button does work and the code is able to load to the simulated Ardunio Uno in SimulIDE. Progress! I will do some more testing on my side.
Yes, I will get the .ino file and send it soon.
Thank you for the reply, Santiago!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure what heppened to my post - perhaps awaiting a moderator?
Short version is I tried the Arduino Uno & Nano simulator on Windows 10 and Windows 8 with 2 different results.
In one case, I could single-step but some variable would not show in Ram-Table and the single steps seemed to skip over some code. Felt like possibly the debug symbols didn't match the code?
In the other case, when I compile the Arduino IDE would pop up and I could not get the code to be recognized in the SimulIDE window . Could this be a wrong Arduino build? (Seems like there were 2 branches of Arduino at some time.)
Paul
Hi.
Yes, anonymous posting is allowed but must be aproved by a moderator.
About bedugging Arduino:
there are some limitations debugging Arduino code.
One of them is variables, all depends in what the compiler does with the variable.
In many cases a variable in C once compiled don't even exist is the binary code generated.
One posible workaround is declaring that variable global.
Also happens with source code lines, specially with calls to libraries methods.
This debugger is useful mostly for your own code, when the sketch is just calling external functions it is very limited.
About executing Arduino IDE instead of running hidden, that is probably a version issue.
Not sure wich is the first version that works with simulide, but it works with Arduino-1.8.3.
Wich Arduino version are you using?
Thank you for your reply and for a very interesting simulator! I hope to learn it better!
I understand that some variables might not exist in the code - perhaps optimized away if not needed. I also understand that library calls would be stepped over/ignored. I thought I saw simple lines of code being ignored. I will try a simpler example. One situation was in a while(){ } statement where the debugger seemed to spin the rotating blue arrow endlessly when the while condition was no longer met.
Arduino Version 1.6.12 is working with Windows 10.
I think it was a version 1.0.X that didn't seem to work with Windows 7. I will check the version at home.
Paul
Yes. this debugger is very basic, it doesn't use gbd, it was developed for GcBasic compiler and asm (pic &avr), then adapted to Arduino.
The plan is implementing gdb support for Arduino, and maybe avr-gcc and sdcc.
There will be some improvements available in next release, the while issue will be probably improved.
Anyway... can you provide the ino files with problems to have a look?
Thanks to you for taking the time to test and report these issues.
Regards
The Windows 7 system uses Arduino version 1.0.6 - this is the system where setting the compiler path and then clicking the compile button causes the Arduino IDE to start.
If I use Arduino version 1.6.9 with Windows 7, the set compiler path and clicking the compile button does work and the code is able to load to the simulated Ardunio Uno in SimulIDE. Progress! I will do some more testing on my side.
Yes, I will get the .ino file and send it soon.
Thank you for the reply, Santiago!