This is an automated email from Gerrit. Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/612
-- gerrit commit 1761327427be26c81da82f163531d74be1249673 Author: Spencer Oliver <[email protected]> Date: Thu May 3 10:44:42 2012 +0100 flash: fix protect check for pic32mx1x/2x family Change-Id: Ib2692d8b79e52cd40f429008047494aa7f552984 Signed-off-by: Spencer Oliver <[email protected]> diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c index 248e061..8cd0fe6 100644 --- a/src/flash/nor/pic32mx.c +++ b/src/flash/nor/pic32mx.c @@ -275,8 +275,13 @@ static int pic32mx_protect_check(struct flash_bank *bank) num_pages = 0; /* All pages unprotected */ else num_pages = 0xffff; /* All pages protected */ - } else /* pgm flash */ - num_pages = (~devcfg0 >> 12) & 0xff; + } else { + /* pgm flash */ + if (pic32mx_info->dev_type == MX_1_2) + num_pages = (~devcfg0 >> 10) & 0x3f; + else + num_pages = (~devcfg0 >> 12) & 0xff; + } for (s = 0; s < bank->num_sectors && s < num_pages; s++) bank->sectors[s].is_protected = 1; -- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
