Python API cleanup for 1.0
Open
Nobody has claimed this yet.
python-api
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
Multiple tasks to clean up parts of the pyOCD Python API in preparation for a 1.0 release. Only potentially compatibility-breaking changes are listed here.
- need to make
MemoryMap.get_first_region_of_type()exclude non-default regions, or add aget_default_region_of_type() - rename
ResetType.SW_SYSRESETREQandSW_VECTRESETtoSW_SYSTEMandSW_CORE - split classes in flash_loader.py out into separate files
- add
TargetAPI to get the halt reason (i.e., breakpoint, vector catch, user halt request, etc) - clean up contains related methods on
MemoryRangeBase - move constants defined in
Targetout of the class and into enums - cleanup
CortexMconstants - cleanup
CortexMregisters - make read regs return None if it can't read a register (e.g. core is running)
- rename
FlashReaderContexttoElfReaderContext - remove
ELFSymbolProviderand makeElfSymbolDecodera subclass ofSymbolProvider? - standardize naming of acryonyms in symbols; ELF vs Elf, GDB vs Gdb, STLink vs Stlink, etc
- break out regcache, memcache, cache context and gdb packet and server into their own files for logging purposes so child loggers don't have to be created
- change
CortexM.available_breakpoint_countproperty to function that takes bp type, calls bpmgr function - remove fast_verify/trust_crc user option and never trust crc
- normalise setting names
Some possible changes are undecided:
- change "user option" terminology to "setting" (quite likely to happen)
- replace
FileProgrammerwith image file classes and factory function - finish init sequence work, extending outside of
CoreSightTarget, bringing session and board into the mix
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
This is a release-wide checklist covering MemoryMap, MemoryRangeBase, CortexM, Target, flash_loader.py, and ELF symbol classes. Start by reviewing the unchecked and undecided items, then narrow the work to one explicitly scoped API change; completion for the overall issue is not defined beyond resolving the remaining checklist items.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design, devtools, embedded-iot
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100