Hi
Arduino 1.0.5
I am new to Arduino but have many years knowledge of C, C++ VB.net etc.
My question is, can I single step though the code and set break points with Arduino, there does not seem to be away to do this.
Best regards,
Hi
Arduino 1.0.5
I am new to Arduino but have many years knowledge of C, C++ VB.net etc.
My question is, can I single step though the code and set break points with Arduino, there does not seem to be away to do this.
Best regards,
That's right, there isn't.
It's tricky replacing instructions in flash, when you have to write a page at a time.
Thanks for the reply.
No single step, break point or watch window, make debugging difficult.
Regards
No single step, break point or watch window, make debugging difficult.
It does?
Hi,
I thought someone would comment, ' you can single step etc. but no!!!
Not an easy system of development, I will avoid Arduino.
I suggest anyone considering code/hardware development, they look at Microchip.
There are others and I have used several development system, but I like Microchip PIC32, have a look.
Good luck.
Software wimp. Write some code, throw in some serial prints to check values via the serial monitor, what more do you need?
I thought someone would comment, ' you can single step etc. but no!!!
Not an easy system of development, I will avoid Arduino.
The trick is not to write bugs in the first place.
Hi,
I have been asked by someone to help solve a software/hardware problem. Someone else wrote the code, some other person designed the circuit. I am just trying to help.
I have been writing code and designing advanced system hardware for many years.
"What more do I wan", a lot more that a few serial dumps.
"Write software with no bugs", huh.
OK with a simple bits of code, but why do you think the more advance development systems have sophisticated debug features.
I will stick with proper C, C++ development environments.
Regards
If you need more advanced, then step up to a larger processor with JTAG support.
ATmega1284P, Atmega2560.
Couple hundred bucks, beyond most hobbyists, probably what you're thinking of tho.
Hi Crossroad,
Very good advice.
Unfortunately, this is a favour for someone, the circuit is designed and build and the code written. so I am somewhat restrained.
Regards
1.0.5, so this is '328P based card? Any free pins? Hardware serial is easiest, then software serial, finally make an LED blink or something. Use I2C, SPI.
I wrote a program that was 25+ printed pages long, 13K+ bytes when compiled, debugged the whole thing with occasional print statements when coded behavior was not as expected.
You guys are mean.
In theory, you can use "debugWire", a single-pin debug capability that works through the RESET pin of the AVR.
This is proprietary protocol that Atmel doesn't document very well, and some of the arduio auto-reset circuitry interferes with its operation on an Arduino. But in theory you can purchase an Atmel debugger, like an JTAGICE Mk3 or Dragon, make some minor circuit modifications, and get more advanced debugging capabilities using Atmel's "Atmel Studio." I'm inclined to suspect that it's still pretty primitive compared to what most desktop programmers are used to (it still has to reprogram entire flash pages to implement a breakpoint, for example, and then again to continue from the breakpoint.)
You might have better luck using one of the several Arduino or AVR simulators, which permits this sort of debugging in a simulated environment. Those can be OK for general debugging, but they tend to fall apart when the simulator doesn't support some peripheral you might have attached.
Also, for debugging complex algorithms that don't touch the hardware so much, you can simply put in some conditional compilation to replace the arduino core functions, compile your code on a PC host, and use your favorite debugger to figure out the subtle bugs, and then compile again for the final target when everything seems to be working. You do have to pay attention to the differences between the host and the avr (particularly sizeof(int)), but I've found it useful.
Of course, debugging with a few print statements can work pretty well, once you get used to it. It's a lot better than analyzing hex dumps after something has gone wrong.