Flash memory is a type of memory available on the Arduino boards. It can be accessed from a program using PROGMEM directive to store data. For questions about using and accessing flash memory, use this tag.
0
votes
1answer
52 views
Better method for PROGMEM data access with multiple indirection?
-edit-
This is a simplified recreation of personal learning project I have ongoing. My issue is in accessing data in flash, the path to which includes multiple layers of indirection. When the data ...
0
votes
1answer
23 views
Unable to upload code to the arduino nano
I tried to to upload a hex file I generated for the arduino nano using avrdude but I keep getting the error:
avrdude: stk500_2_ReceiveMessage(): timeout
First the arduino board stops doing whatever ...
0
votes
2answers
52 views
Using PROGMEM to store array of structs
I am hitting the limits of my arduino's SRAM and found that SRAM usage can be reduced by storing static stuff in flash memory instead of SRAM.
My project can (optionally) be built with an included ...
2
votes
2answers
114 views
How to read/write variables persistenly on Arduino Due (no EEPROM/shield)?
I am relatively new to Arduino and I am currently writing some code to control a relay board. The on/off times are provided by the user at run-time and should be stored persistently (EEPROM or flash) ...
0
votes
0answers
21 views
Flash a .hex to an ATtiny45 with Arduino [duplicate]
I'm trying to upload a hex file to an ATtiny45 with an Arduino. I uploaded the Arduino ISP sketch to my board. I connected the ATtiny as shown below:
Then I go to CMD and type:
avrdude -c avrisp ...
1
vote
1answer
66 views
Flash a .hex to an ATtiny45 with Arduino
I'm trying to upload a hex file to an ATtiny45 with an Arduino. I uploaded the Arduino ISP sketch to my board. I connected the ATtiny as shown below:
Then I go to CMD and type:
avrdude -c avrisp ...
2
votes
1answer
39 views
Store floats in and reading them from flash
How do I store floats in flash and how do I read them from there? (I need a look-up table for pairs of float values.)
The storing part doesn't seem to be so difficult as this compiles:
PROGMEM float ...
1
vote
1answer
45 views
What protocols and tools does Arduino Due use for flashing and debugging?
I am interested in writing a simple C program outside of the Arduino IDE and respective libraries, but deploying it directly to an Arduino Due (which uses a SAM3X8E ARM MCU). I am trying to figure out ...
1
vote
1answer
46 views
How do I implement a userspace bootloader on Arduino Due?
Is it possible to use a custom bootloader, that loads and executes a main program which is stored for example on SD-card? The idea is to make it possible to update the Arduino remotely.
I tried this ...
0
votes
2answers
61 views
Storing data (strings) if ethernet fails to send it
Flow goes something like:
Read sensors
Send data
If send fails store the data in eeprom/flash/sd
If sent check if any previous ones have failed and send those
So my question is what's the best ...
0
votes
0answers
172 views
Unable to upload sketch after bootloader has been flashed on Arduino Micro
I have created my own custom Arduino Micro, but i am experiencing problems when i attempt to upload an sketch via USB in Arduino IDE.
Here is how i program the Arduino Micro:
avrdude -c ...
0
votes
1answer
155 views
Cheap 2-5mb memory to use with arduino
I'm looking for a storage solution for small files that would be moved into a small sensor running arduino-like processor.
Ideally the single memory unit would be cheap (in 1-10 cents range), but the ...
5
votes
3answers
1k views
PROGMEM: do I have to copy data from flash to RAM for reading?
I have got some difficulties understanding the memory management.
Arduino documentation says, it is possible to keep constants like strings or whatever I don't want to change during runtime in ...
1
vote
1answer
229 views
What is the capability of AVRISP and USBASP on ATMega48, 328, 2560?
For use with ATMega 48 (old Arduino?), 328 (UNO, Pro Mini) and 2560 (Mega2560) chips, what is the capability for the AVRISP and USBASP programmers on:
Can it read, write fuse?
Can it read, write ...
4
votes
2answers
1k views
Is it possible to run a binary from EEPROM?
Say I wrote a compiled sketch to EEPROM then read it. Could I run the program from EEPROM? I guess the question is: Can an Arduino run software not in flash memory in the middle of executing the ...
0
votes
1answer
100 views
question about progmem
I have a problem understanding the following code:
PROGMEM prog_uint16_t x={1232,3232,43343};
rawlen = pgm_read_word_near(x);
memcpy_P(uSendBuff, pfSendBuff+1, rawlen * sizeof(uint16_t));
Why do ...
1
vote
3answers
367 views
What happens to the sketch / memory when Arduino is powered off?
I have my Arduino Uno connected to the PC via USB when prototyping. I am developing a thermometer with memory, using DS18B20 sensors.
When PC is shut down, there is no power on the USB and the ...
1
vote
1answer
171 views
Error building Arduino WiShield Flash example: 'dflash' was not declared in this scope
I'm using WiShield library from: https://github.com/jcmuller/WiShield
What is wrong with this library?
The code:
/*
* Web Server using Flash
*
* A simple web server example using the WiShield ...
5
votes
4answers
1k views
Where can I find out how to make a hex file for arduino firmware?
I have followed this tutorial on flashing my Arduino R3 to turn it into a "USB keyboard", but the article doesn't explain how the hex works, it's just for granted. Where can I learn about how to make ...
4
votes
2answers
330 views
What are the FLASH_ARRAY/FLASH_TABLE macros in this code?
In this code for heating monitor, there appears to be macros called FLASH_ARRAY and FLASH_TABLE. I can't find any reference to them either in this code, Arduino, or on the Internet. What do they do?
...
9
votes
4answers
6k views
How do I erase the memory of the Arduino Uno?
I'm just a tinkerer learning Arduino with my son and I was surprised that when I plugged the USB cord back in to the Arduino the program was still running and I thought to myself, "it's a good thing I ...
13
votes
4answers
16k views
What can I do if I run out of Flash memory or SRAM?
According to the Arduino documentation, the ATmega328 has 32KB of Flash memory for the bootloader + uploaded sketch, and only 2KB SRAM for runtime data. The ATmega2560 has quite a bit more, totalling ...