what program is running in Arduino?

Is there a way to see what's running/loaded into an Arduino? I understand if a program is running and it is doing what you want, you should know what program it is. But what if you are doing lots of revisions and you want to know what rev is in memory now?

Could I program in an id of some sort that I can look at by interrogating memory. When I was working with PicBasic Pro, the debugger would show me the contents of memory so I could tell which program I really had running.

How can I check memory in Arduino? Can I see the hex file downloaded to the UNO?

(deleted)

queenidog:
Could I program in an id of some sort that I can look at by interrogating memory.

Sure.

queenidog:
When I was working with PicBasic Pro, the debugger would show me the contents of memory so I could tell which program I really had running.

A debugger will do the same with your Arduino but you'll need to use an external program because the Arduino IDE doesn't support debugging. While the newer Arduino boards do have an onboard debugger, the more popular AVR boards like Uno, Mega, Leonardo do not. If you have one of those boards you'll need to buy a debugger (Atmel ICE being the primary option). There actually has been some work done recently on turning an extra Arduino into a debugger but these will likely not provide all the features of a commercial debugger.

queenidog:
Can I see the hex file downloaded to the UNO?

You can download the .hex file from the Uno but the Arduino IDE doesn't have this feature. You can do it using the AVRDUDE program that comes with the Arduino IDE. You will need an ISP programmer for this but if you don't own one you can make an "Arduino as ISP" from a spare Arduino board.

Put these lines in setup()

    Serial.println(__FILE__);
    Serial.println(__DATE__);
    Serial.println(__TIME__);

Note that they are all double-underscores

...R

Thanks Robin and Pert. good info. I will try these out.

queenidog:
Thanks Robin and Pert. good info. I will try these out.

He's slow. But he gets there :slight_smile:

...R