Access board info and data?

Hey all, new Arduino user, but I've worked with PICs and Maplab before.

I've just got the Arduino IDE loaded for the first time and I'm having a devil of a time figuring out how to read board info from the IDE. How to I read the program memory or EEPROM? is there some way to dump either to a file? How can I edit the data in the EEPROM? (from with the IDE I mean, I'm not writing code for basic stuff...)

Am I just blind or is there some arcane command line option I am missing to enable this?

Any help would be appreciated!

thx

Arcane? Have you looked at any EEPROM library examples? Program data is possible to read, but more difficult, so why do you want to read it?

What is arcane?

I have not yet found a single example of how to read such data from the IDE.

I'm not sure I understand your question?

I just want to inspect (read/write) the program and EEPROM data from within the IDE - it's a basic function of microcontroller development environments.

For whatever reason, I can seem to be able to figure out how to access it in Arduino IDE, and was hoping someone could point out how to do so or what I am doing wrong.

thx!

The EEPROM library has examples for reading EEPROM (no surprise there). With the library, it's very easy to write a quick sketch to dump EEPROM memory. Why not look into it, while you wait for replies about the memory utility that writes/reads flash. I just can't remember the name. You can't do it directly from the IDE. I suspect that's because for the intended use, there is never any reason to read it.

Yes, I am asking why you feel you need to read it. Is there a specific problem that it would help you with right now? Perhaps other solutions might be proposed.

You first used the word, "arcane". I was responding to that.

I'm sorry, what?

No offence, but perhaps I need someone more experienced with the IDE to answer.

If you look at the compile output window, you will see how the flash utility works. I'm not sure why I'm still helping you...

It's "avrdude" for the AVR boards...
https://www.nongnu.org/avr-libc/

Again, what are you talking about? That's not even a question. Plugging in a microcontroller and then inspecting/editing the program and EEPROM data is a basic feature of microncontroller IDEs.

It's like asking why you need a breakpoint debugger in JAVA, I mean you can just pretty print all your debugging info to a log, no?

Every microcontroller IDE I have used (all the way back to PICBASIC) has been able to do this. How the hell are you supposed to be able to develop for a microcontroller without being able to inspect the program and EEPROM memory?

If Arduino IDE can't do this, could someone please point me to a REAL development IDE for Arduino?

thx

I've been doing quite well for 30 years actually. If you get in trouble you can create debug versions. Believe me, lots of developers never look at a binary.

Also, I have coded in Java and never used or needed any breakpoint debugger, nor did any of the professionals that were teaching and studying Java with me.

But - you can inspect and alter EEPROM and flash memory in an Arduino environment using the avrdude utility.

Also, the Arduino environment is supposed to be non-processor specific. It would be a major job to write the necessarily custom memory utitility and/or debugger for each one. Each processor implementation may and does often use a different tool chain to actually program the part. The AVR software chain is open source, I suppose a utilitarian approach dictated a command line parameter style interface vs. a GUI. Others are miles better like STM32Cube Program which is necessary to program STM32 devices with Arduino core. It's got the similar screens that you would recognize from the PIC programmer utility.

I took a wild guess that you are using an AVR.

I see the back and forth here and I may be missing something or can help.

I believe the Arduino IDE can only talk to a Arduino board defined in the boards manager.
So I'm guessing the EEPROM you wish to read is the EEPROM on some processors.

If this is the case, I know of no way to either initialize the EEPROM when programming nor read the EEPROM after the processor has executed its program.

I recall the old MpLab I had worked with could read the EEPROM but I was under the impression that ability relied on some debug capability of the PIC processors.

Not that it matters but I switched from PIC to Atmel long ago simply because of the plethora of "board" computers. I started with Arduino using the bare metal approach but was quickly taken by the darkside and stated to use the IDE macros. But this is now only a hobby for me.

Yikes. The uses cases for being able to load program data from within the IDE should be painfully obvious to anyone with 30 yrs experience, and "looking at a binary" (at least with your eyes!) isn't really one of them...

Guess I'm talking up a tree here :frowning:

:open_mouth: good lord dude! You've been punishing yourself for 30 years then... Seriously: learn how to use a proper step-through breakpoint debugger, and your debugging will go 10x faster (and easier)!

That's something, at least.

I'm perfectly capable of reading what it says on the package: "ATmega328P 5v 16hz", I'm trying to verify that, internally, with a board query from the IDE - but apparently that is impossible?

Can I just skip the Arduino toolchain altogether and code for the Arduino Pro Mini with the AVR toolchain?

Yes. As you said, it's an ATmega328P microcontroller, so you can do whatever you like with the microcontroller. Arduino is one option, but not the only one. There's no magic on that PCB.

As for writing EEPROM data via the IDE, there is a related proposal and discussion here:

Note this:

the optiboot boot loader for the Uno does not contain support for write EEPROM data with AVR dude

You can always use Atmel Studio if you want to write to EEPROM from within a nice GUI

Sure, but which one? I provided a link to the Gnu version.

I explained the difficulty with something like that. It presumes that the toolchain for every possible processor type is installed simultaneously. Example, what if I have an ESP32 connected? Without those, or knowing in advance which family of processor is involved (which would lessen the usefulness IMHO), the IDE would have no way to determine the processor information. That would be a ridiculous amount of overhead. Furthermore it would have to cycle through a list of mostly failed attempts, which take longer to execute and recover from.

Your yardstick, the PIC environment, is a vertical integration that only permits those kinds of operation because it's limited to a specific family of processors. It's also easier for them to develop because all the R&D is in house.