-
Notifications
You must be signed in to change notification settings - Fork 484
Major refactoring tasks
Chris Reed edited this page Dec 12, 2022
·
4 revisions
This todo list contains plans and ideas for incompatible changes in the pyOCD API, major refactoring and related changes, as well as work required before a major version bump. These tasks are not set in stone, may or may not be completed, and may be replaced with a related or different plan. Work towards these tasks is invited, but you really, really should discuss your plans in detail with maintainers first.
(See the icon key from the main todo list.)
misc for version 1.0:
- 🛠 session option handling merging and types correctly (#561)
- 🛠 disable traceback printing by default to simplify error messages, use session option to enable (#564)
- session option name normalisation (?)
changing terminology:
- session option ⟶ setting
- unique id ⟶ probe id (?) .. wait til probe urls are implemented
API changes and cleanup:
- clean up contains related methods on MemoryRangeBase
- cleanup CortexM and other register constants; define pattern and stick to it; use MemoryMappedRegister class?
- finish init sequence work, extending outside of CST, bringing session?, ap, and board into the mix
- call sequence for disconnect
- standardize naming of acryonyms in symbols; ELF vs Elf, GDB vs Gdb, etc
- change CortexM.available_breakpoint_count property to function that takes bp type, calls bpmgr function
- remove fast_verify/trust_crc user option and never trust crc -> replace with 64-bit murmurhash?
- multiple flash sector sizes without having to create separate FlashRegions [handled via subregions]
- merge several of the utility modules
- remove unused autoflush utility
- rename color_log utility module to something more general
- swo: remove core param on SWOParser ctor; don't keep exception name attr in TraceExceptionEvent
- reset types: distinct System and Core reset types that are converted to actual type based on arch, etc.
- default reset types: too complicated having both default reset and default sw reset; maybe not even have default reset types?
- remove 'blocksize' attribute from FlashRegion, so it and page_size/sector_size defaults don't return each other
new memory interface:
- add optional attribute parameter to MemoryInterface APIs, for per-transfer HPROT/HNONSEC/etc control
- reworked memory access API with better write size control
- redefine for clean and simple type annotation support
- mem map per memif
- multiple svds per memif (or per mem map?)
- deferred reads as async functions, or return concurrent.Future?
core register api:
- redefine for clean type annotations... float vs int returns must be separate apis
- multiple cooked r/w (not just raw)
major refactoring:
- 🛠 multi-plane graph
- class hierarchy changes to support non-Arm architectures [v2+]
- probe under Session
- DebugProbe interfaces
- refactor Flash class into FlashAlgo; create instance per usage
- refactor get_{sector, page, flash}_info() to be on the region, not Flash
- augment FileProgrammer with image file classes and factory function [non-breaking so any release]
API questions:
- restructure Target/SoCTarget/CoreTarget/CoreSightCoreComponent/CortexM and MemoryInterface, DebugContext??
- figure out how these are connected
- want Target/CoreSightCoreComponent/CortexM reg and mem accesses to be cached, but need raw access too
- also how DebugController fits in
- want things like core state cached, but with some layer that always provides direct uncached access
- split Target functionality between SoCTarget and CoreTarget
- limited functionality in Target
- move core_registers property to CoreTarget from Target
- breakpoints/watchpoints?
- no longer have SoCTarget.selected_core etc
- relationship to DebugContext?
- remove ELFSymbolProvider and make ElfSymbolDecoder a subclass of SymbolProvider?
- MEM_AP should raise MemoryAccessError from TransferFaultError when possible; separate from TransferFaultError?
- flash/loader naming
- move MemoryLoader out from pyocd.flash? where?
- rename pyocd.flash to pyocd.programming or pyocd.loader?
- move pyocd.flash.flash.Flash somewhere? to pyocd.core?
- move RamBuilder to pyocd.x.builder?
- move pyocd.target.pack to pyocd.dfp? (or some similar name like pack, cmsis_pack, cmsis_dfp, etc)