Skip to content

Commit

Permalink
Exclude jtag2updi sib memory
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanrueger committed Aug 9, 2024
1 parent 80cd5a9 commit 2ae5f08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/avr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1601,13 +1601,15 @@ Memtable avr_mem_order[100] = {

#include "dryrun.h"
#include "jtag3.h"
#include "jtagmkII.h"
#define is_type(pgm, what) ((pgm)->initpgm == what ## _initpgm)

// Whether a memory is an exception that shouldn't be there for this particular i/face
int avr_mem_exclude(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem) {
return
is_type(pgm, dryrun)? 0: // Never exclude dryrun memories
// jtag3 cannot read beyond addr 6 on classic prodsig, so excluse memories in prodsig/sigrow
(mem_is_sib(mem) && is_type(pgm, jtagmkII_updi)) || // jtag2updi cannot deal with sib
// jtag3 cannot read beyond addr 6 on classic prodsig, so exclude memories in prodsig/sigrow
(is_type(pgm, jtag3) && mem_is_in_sigrow(mem) && is_classic(p) && both_jtag(pgm, p)) ||
// Classic part usersig memories cannot be read/written using ISP
(mem_is_usersig(mem) && is_classic(p) && both_isp(pgm, p));
Expand Down

0 comments on commit 2ae5f08

Please sign in to comment.