Orlando, FL
Offline
Full Member
Karma: 0
Posts: 128
|
 |
« on: March 04, 2011, 05:15:35 pm » |
Is there a good debugger or simulator to single step though your arduino code virtually? I would like to see the information going in and out of each register. This would be really helpful when debugging code that is close to maxing out the MEGA.
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 71
Posts: 6806
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #1 on: March 04, 2011, 09:54:06 pm » |
It's quite unusual to need to look at the working registers when using C (which I assume you are). IO regs are a different matter though, it's very useful to look at them.
Anyway AFAIK there are no simulators for Arduino, there are some for AVR chips in general but I think you'd have to be developing you code with AVR Studio.
There are some monitors, do a search for "monitor" on the forum.
______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 1
Posts: 30
Arduino rocks!
|
 |
« Reply #2 on: March 06, 2011, 11:27:24 am » |
I'd like to suggest an unit-based testing approach. I have tried some emuletors (like emulino and so on) and I think them are unable to track the whole system in its complexity. It is better to test the single part of your C code with some unit testing. If the single part do not work alone, there is no chance you can get them working right together  Test driven development is your best friend in embedded stuff, in my own opinion: http://en.wikipedia.org/wiki/Test-driven_developmentTake a look to the Aiko library: https://github.com/geekscape/Aiko it has a lot of unit tests and it is easy to understand.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 32
Take the Red Pill
|
 |
« Reply #3 on: March 15, 2011, 06:27:00 pm » |
You can try VirtualBreadboard, www.virtualbreadboard.com There is no single step debugging yet, but its on its way very soon.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 1
Posts: 30
Arduino rocks!
|
 |
« Reply #4 on: March 16, 2011, 07:59:56 am » |
You can try VirtualBreadboard, www.virtualbreadboard.com There is no single step debugging yet, but its on its way very soon. I have tried it but I find difficult to include other files and external libreries. do you have released a new version?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 32
Take the Red Pill
|
 |
« Reply #5 on: April 08, 2011, 05:55:45 am » |
VirtualBreadboard ( www.virtualbreadboard.com ) now supports Single Step Debugging, Breakpoints, step over, stepout, local variable views, stackframe views. >I have tried it but I find difficult to include other files and external libreries. yes, true that there is not 100% arduino coverage especially for 3rd party arduino libraries. You are limited to including "arduino" cpp files, ie not pure C++. What you can do though is stub-out custom libraries with test return values by adding your own C++ stubbed implementation of the custom 3rd party library you are wanting to use. This is inline with the unit test approach earlier in this thread. Basically you write your own emulation layer of how the 3rd party library will behave. This emulation can be just as stubbed return value or a complete functional emulation. So the VBB simulations can still be very useful even with unsupported libraries especially with the debugger which just takes Arduino development to another plane of existance IMO :-)
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #6 on: August 23, 2011, 04:28:04 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
'round the world...
Offline
Edison Member
Karma: 19
Posts: 2305
|
 |
« Reply #7 on: August 23, 2011, 06:58:44 pm » |
Amazing... same question in different sub forums, by different people. I replied there too, give it a go. http://arduino.cc/forum/index.php/topic,69931.0.html
|
|
|
|
|
Logged
|
Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o. Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum). Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.
Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).
|
|
|
|
CO, USA
Offline
God Member
Karma: 4
Posts: 706
|
 |
« Reply #8 on: August 23, 2011, 07:05:29 pm » |
There's Simulavr. Also, not arduino, but Atmel AVR sim. I haven't tried it, so I don't know how capable it is. But I'd love to hear from anyone who has.
|
|
|
|
|
Logged
|
... it is poor civic hygiene to install technologies that could someday facilitate a police state. -- Bruce Schneier
|
|
|
|
Australia
Offline
Jr. Member
Karma: 0
Posts: 61
Power up to your potential
|
 |
« Reply #9 on: December 03, 2011, 05:15:54 am » |
We are developing a new Simulator here http://www.arduino.com.au/Simulator-for-Arduino.htmlSo far the simulator can single step through simple program's and registers can be viewed by clicking On the variables button. It should be fully operational soon. Any comments or new sketches to run through the simulator would be appreciated. On the downside, the simulator cannot do for statements, subroutines or second level conditional statements yet. It can do most of the rest and should be ok for simple sketches.
|
|
|
|
« Last Edit: December 25, 2011, 10:36:47 pm by Shields_Arduino »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 4
Posts: 1126
If you're not living on the Edge, you're taking up too much space!
|
 |
« Reply #10 on: February 08, 2012, 04:10:09 pm » |
Please let me know when it can do all the language elements in the reference page. Which ones are missing now? I'm interested!
|
|
|
|
|
Logged
|
If you fall... I'll be there for you! -Floor
Skype Brighteyes3333 (262) 696-9619
|
|
|
|
Australia
Offline
Jr. Member
Karma: 0
Posts: 61
Power up to your potential
|
 |
« Reply #11 on: February 08, 2012, 07:35:29 pm » |
Hi, thanks for the interest. At present, all language elements except for the elements below are supported. All the if/for/while/switch/else statements have been tested multiple times and are fairly solid now. The last few versions have been mainly on the language processing since the feedback was that this needed improving. The feedback now is to improve the Uno/Mega pictures and finish all the digital pins and maybe make the Mega picture smaller. Math min() max() abs() constrain() map() pow() sqrt() // Note constrain() is implemented Trigonometry sin() cos() tan() Bits and Bytes lowByte() highByte() bitRead() bitWrite() bitSet() bitClear() bit() Since this program can consume a lot of time, we have decided to only upgrade when milestones are reached so the next upgrade is planned for late this month of next month depending on interest. Minor fixes will be done where possible. The Free version can be downloaded from here. The Free version is now v0.94C and supports the <time.h> addon library (updated yesterday).
|
|
|
|
« Last Edit: February 08, 2012, 07:37:38 pm by Shields_Arduino »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #12 on: February 08, 2012, 08:12:12 pm » |
Any one here familiar with paravirtuallization? Instead of emulating the CPU, one actually writes the functions to function over the existing CPU. This kind of thing is probably more appropriate in something like arduino (They do this with FreeRTOS and other RTOSes). Note: One should include memory limits in such a paravirtuallization mechanism. Any way I'll start something for the arduino (possibly based on fritzing?)
|
|
|
|
« Last Edit: February 08, 2012, 08:29:23 pm by arjo129 »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 4
Posts: 1126
If you're not living on the Edge, you're taking up too much space!
|
 |
« Reply #13 on: February 09, 2012, 02:42:30 pm » |
What are the limits on the free version? 100 lines? Delay on loading?
|
|
|
|
|
Logged
|
If you fall... I'll be there for you! -Floor
Skype Brighteyes3333 (262) 696-9619
|
|
|
|
Australia
Offline
Jr. Member
Karma: 0
Posts: 61
Power up to your potential
|
 |
« Reply #14 on: February 09, 2012, 07:24:56 pm » |
Yes, the limits on the free version are a 60s timer on opening a sketch (or editing it) and a Code limit of 100 lines. the 100 line limit was chosen since most of the example sketches are under 100 lines.
Apart from that, the free version and Pro version are identical.
|
|
|
|
|
Logged
|
|
|
|
|
|