mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-21 16:46:30 +03:00
Provide programmer arduino_as_isp
This commit is contained in:
@@ -1339,6 +1339,21 @@ programmer
|
||||
connection_type = serial;
|
||||
;
|
||||
|
||||
#------------------------------------------------------------
|
||||
# arduino_as_isp
|
||||
#------------------------------------------------------------
|
||||
|
||||
# Not to be confused with arduinoISP, this is the same as `-c stk500v1`
|
||||
# but treats EEPROM r/w correctly for arduino_as_isp programmers
|
||||
|
||||
programmer
|
||||
id = "arduino_as_isp";
|
||||
desc = "Arduino board as programmer using arduino as ISP firmware";
|
||||
type = "stk500";
|
||||
prog_modes = PM_ISP;
|
||||
connection_type = serial;
|
||||
;
|
||||
|
||||
#------------------------------------------------------------
|
||||
# mib510
|
||||
#------------------------------------------------------------
|
||||
|
||||
@@ -966,8 +966,9 @@ static int set_memtype_a_div(const PROGRAMMER *pgm, const AVRPART *p, const AVRM
|
||||
|
||||
if(avr_mem_is_eeprom_type(m)) {
|
||||
*memtypep = 'E';
|
||||
// Word addr for bootloaders where part is a "classic" part (eg, optiboot, arduinoisp, ...), byte addr otherwise
|
||||
*a_divp = (pgm->prog_modes & PM_SPM) && !(p->prog_modes & (PM_UPDI | PM_PDI))? 2: 1;
|
||||
// Word addr for bootloaders or Arduino as ISP if part is a "classic" part, byte addr otherwise
|
||||
*a_divp = ((pgm->prog_modes & PM_SPM) || str_caseeq(ldata(lfirst(pgm->id)), "arduino_as_isp")) \
|
||||
&& !(p->prog_modes & (PM_UPDI | PM_PDI))? 2: 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user