Pages: [1]   Go Down
Author Topic: Hardware emulation in the computer  (Read 1097 times)
0 Members and 1 Guest are viewing this topic.
Turku
Offline Offline
Full Member
***
Karma: 0
Posts: 217
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want suggestions for new features to included in version 1.0, here is one. Perhaps it is more realistic to hope these in version 2.0

Running sketches in the computer and results go to the hardware Arduino board and to the screen. Running programs in the computer means of course tracing, stepping and other debugging features are easy to implement.

Debugging is now hard, a lot of printlines. Emulation would help a lot. It would probably run slower than running programs normally but still it would help.

How about also selling boards with emulation "firmware" that is with emulation sw instead of bootloader. That would help with getting better speed.
« Last Edit: August 22, 2010, 10:44:37 am by LMI1 » Logged

England
Offline Offline
Full Member
***
Karma: 0
Posts: 211
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have developed for PICs, in fact it was what I learnt microcontrollers on.  The PIC ide has a built in simulator and quite frankly it is worthless because of a total lack of external stimuli.

Now, as for a in circuit debugger, the atmega chips have built in support for a ICD, but the actual ICD devices tend to be quite expensive, although support for them within the arduino IDE would be nice.  ICD and ICE is rather complicated though, so I can't see it happening.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17253
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I actually enjoy troubleshooting bugs in my code. Helps me learn more from the mistakes. Print statements work well enough for me. Sometimes I just write new small sketches to test out a new function I'm trying to use to see where my logic is wrong. I guess coming from a hardware troubleshooting backround helped me a lot in trying to solve software bugs.
Once I can get the compiler to compile without errors I'm off to a good start, prior to that no so much... smiley-wink

Lefty
Logged

Turku
Offline Offline
Full Member
***
Karma: 0
Posts: 217
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I mean by emulation a system where program runs in a computer with hardware connected. Arduino board sw would just transfer io status between computer and peripherals.

To UltraMagnus: Yes emulation is hard. So, probably it will have to wait before some real hacker makes it for himself.

To retrolefty: Searching bugs is nice but when you are able to step line by line your code, you will see how much more fun it is, and faster too.
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6106
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When I was in school, we had a micro platform based on the (then-)popular 8051.  The boot loader contained a debugger.  It allowed for setting breakpoints (or calling a breakpoint from the C code) before executing the code.  Once broke, the monitor allowed viewing of memory locations and other activities.

It seems like a monitor like that would be useful in Arduino.  It seems like we could get information like memory addresses for variables and/or sub routines and list them in the IDE for reference.  

(In school we had to examine the ASM files or setup use printf's to determine the addresses.)

If such a basic debugger was a bootloader (perhaps debugging-bootloader) then feeding the data to a hardware "emulator" would be relatively trivial.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Pages: [1]   Go Up
Jump to: