Post Reply 
PX41CX
06-08-2023, 11:48 AM
Post: #50
RE: PX41CX
(06-08-2023 01:06 AM)goosnarrggh Wrote:  I've dug through that tool's source code. Essentially, the -m option allows you to pick whether the erase will impact the whole chip (Flash + EEPROM), or just the Flash, or just the EEPROM. The tool doesn't seem to allow anything more fine-grained than that. This is also consistent with what you'd be able to do via the Studio.

After digging a little deeper, it appears that the back-end code in that tool will vary depending on which series of microcontroller you are programming, which type of programming adapter you are using, and as a consequence, which variant of the UPDI protocol is in use. If you're using the simple RS232 serial programming adapter, with the modern AVR UPDI backend, it looks like the bulk erase (Flash + EEPROM + User Signature) is executed in a single atomic command.

But when you are erasing just the Flash space in isolation, it falls back to a loop in which it sends individual debugger commands to erase each page in sequence. The section in the device datasheet describing the UPDI debugger command set is pretty obtuse, but my gut says that it might be feasible to break up that loop. You could probably hack the tool so that it can selectively erase individual ranges of pages in isolation. It would probably also involve adding new command line arguments to allow you to specify an optional start address and length parameters to the selective flash memory erase command.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
PX41CX - agarza - 10-29-2022, 07:58 PM
RE: PX41CX - Massimo Gnerucci - 10-29-2022, 09:05 PM
RE: PX41CX - Liam Hays - 10-31-2022, 01:50 PM
RE: PX41CX - SammysHP - 10-31-2022, 03:53 PM
RE: PX41CX - agarza - 11-01-2022, 01:50 AM
RE: PX41CX - johnb - 10-31-2022, 07:05 PM
RE: PX41CX - agarza - 11-01-2022, 01:44 AM
RE: PX41CX - Massimo Gnerucci - 10-31-2022, 07:16 PM
RE: PX41CX - Jlouis - 11-02-2022, 01:19 AM
RE: PX41CX - agarza - 11-02-2022, 02:43 AM
RE: PX41CX - Jlouis - 11-02-2022, 03:08 AM
RE: PX41CX - Sylvain Cote - 11-02-2022, 05:18 AM
RE: PX41CX - J-F Garnier - 11-02-2022, 08:29 AM
RE: PX41CX - Sylvain Cote - 11-02-2022, 02:49 PM
RE: PX41CX - J-F Garnier - 11-02-2022, 03:50 PM
RE: PX41CX - agarza - 11-02-2022, 06:48 PM
RE: PX41CX - rprosperi - 11-02-2022, 08:11 PM
RE: PX41CX - agarza - 11-02-2022, 10:17 PM
RE: PX41CX - goosnarrggh - 06-07-2023, 04:27 PM
RE: PX41CX - goosnarrggh - 06-07-2023, 05:37 PM
RE: PX41CX - agarza - 06-07-2023, 09:38 PM
RE: PX41CX - Eric Rechlin - 06-08-2023, 02:12 AM
RE: PX41CX - toml_12953 - 11-04-2022, 03:58 AM
RE: PX41CX - Jlouis - 11-04-2022, 06:23 AM
RE: PX41CX - TomC - 11-04-2022, 02:19 PM
RE: PX41CX - agarza - 11-19-2022, 04:53 PM
RE: PX41CX - TomC - 11-19-2022, 06:00 PM
RE: PX41CX - TomC - 11-19-2022, 06:02 PM
RE: PX41CX - agarza - 11-19-2022, 08:20 PM
RE: PX41CX - Sylvain Cote - 11-20-2022, 02:25 AM
RE: PX41CX - agarza - 11-20-2022, 02:54 PM
RE: PX41CX - anetzer - 06-06-2023, 05:53 PM
RE: PX41CX - agarza - 06-06-2023, 06:24 PM
RE: PX41CX - Liam Hays - 11-20-2022, 05:15 PM
RE: PX41CX - agarza - 11-20-2022, 07:30 PM
RE: PX41CX - grbrum - 06-05-2023, 06:07 PM
RE: PX41CX - agarza - 06-06-2023, 04:37 PM
RE: PX41CX - rprosperi - 06-06-2023, 10:51 PM
RE: PX41CX - agarza - 06-07-2023, 02:20 AM
RE: PX41CX - rprosperi - 06-07-2023, 11:39 AM
RE: PX41CX - agarza - 06-07-2023, 04:33 PM
RE: PX41CX - goosnarrggh - 06-07-2023, 05:24 PM
RE: PX41CX - agarza - 06-07-2023, 09:32 PM
RE: PX41CX - goosnarrggh - 06-07-2023, 09:40 PM
RE: PX41CX - agarza - 06-07-2023, 10:35 PM
RE: PX41CX - goosnarrggh - 06-08-2023, 01:06 AM
RE: PX41CX - goosnarrggh - 06-08-2023 11:48 AM
RE: PX41CX - rprosperi - 06-07-2023, 09:02 PM
RE: PX41CX - agarza - 06-07-2023, 09:57 PM
RE: PX41CX - thenozone - 06-06-2023, 05:36 PM
RE: PX41CX - revwillie - 06-11-2023, 04:10 PM
RE: PX41CX - agarza - 06-11-2023, 06:21 PM
RE: PX41CX - comabereni - 09-09-2023, 09:03 PM



User(s) browsing this thread: 1 Guest(s)