Инициализация значения EEPROM при прошивке?
- Войдите на сайт для отправки комментариев
Чт, 28/07/2016 - 12:31
Вопрос в сабже. Нужно при прошивке обнулять значения.
вот так не работает - хотя вроде как и должна:
uint8_t EEMEM CntrE1=0;
Вы имеете в виду вот это ?
http://arduino.ru/forum/programmirovanie/eeprom-avrdude#comment-19047
Ключ -e у avrdude:
-e
Causes a chip erase to be executed. This will reset the contents of the flash ROM and EEPROM to the value ‘0xff’, and clear all lock bits
Вы имеете в виду вот это ?
http://arduino.ru/forum/programmirovanie/eeprom-avrdude#comment-19047
Оно, автор сам написал что не работает.
upd
-e
Causes a chip erase to be executed. This will reset the contents of the flash ROM and EEPROM to the value ‘0xff’, and clear all lock bits
А если все же обнулять, а предустанавливать ?
А если все же обнулять, а предустанавливать ?
-U memtype:op:filename[:format]
Perform a memory operation. Multiple ‘-U’ options can be specified in order to operate on multiple memories on the same command-line invocation. The memtype field specifies the memory type to operate on. Use the ‘-v’ option on the command line or the
part
command from terminal mode to display all the memory types supported by a particular device. Typically, a device’s memory configuration at least contains the memory typesflash
andeeprom
. All memory types currently known are:calibration
One or more bytes of RC oscillator calibration data.
eeprom
The EEPROM of the device.
Я правильно понял, что IDE не передает файл *.eep в качестве параметра avrdude ?
И прошивать руками из консоли ?
Что то тут не так, вот так читаю "-Ueeprom:r:D:\test_eeprom.ino.hex:i"
меняю значение на w "-Ueeprom:w:D:\test_eeprom.ino.hex:i" заливаю
Полный путь
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega328p -carduino -PCOM5 -b115200 -D -Ueeprom:r:D:\test_eeprom.ino.hex:i
Вы в EEPROM пытаетесь скетч залить что ли? test_eeprom.ino - это что?
Вы в EEPROM пытаетесь скетч залить что ли? test_eeprom.ino - это что?
test_eeprom.ino.hex -это дамп eeprom, создается первой командой.
У вас загрузчик optiboot? Ещё вариант - шейте через UsbASP.