Skip to content
Chris Reed edited this page Dec 11, 2022 · 1 revision

This is a massive general todo list for pyOCD. There are all sorts of tasks and ideas, from tiny issues to major refactoring or new features. They were added randomly as I noticed something, so are entirely unsorted.

Pretty much anything in this list is open for contributors, but please contact the maintainers via Slack or a GH discussion before beginning work on a task. This is especially important for in-progress tasks since there is a starting point on a branch somewhere. For larger chunks of work, it would probably be a good idea to create a GH issue.

Key
- 🛠: in progress, or at least some work has been done
- ✅: completed
- ❌: removed from list, because it is no longer needed, was a dumb idea, or some other reason
  • 🛠 create position independant sample code that can run on any cortex-m and be used for testing
    • need to deal with watchdogs; can use flash algo for turning off watchdog?
  • use bytes, bytearray, and/or array.array instead of lists of ints
  • 🛠 software breakpoints in flash
  • user option object hierarchy similar to the one provided by DTSL, presentable in a gui like GNU ARM Eclipse
  • support lldb gdb server extensions [https://llvm.org/svn/llvm-project/lldb/trunk/docs/lldb-gdb-remote.txt]r
  • gdbserver: report swbreak and hwbreak, and add those to supported features list; introduced in gdb 7.9
  • much better handling of a board being disconnected
  • conditional breakpoint support?
  • 🛠 recover from low power states; user option to disable timeout for swd faults and continually retry
  • 🛠 retries on certain swd faults (related to low power support)
  • gui version of flash tool (wxWindows or PySide?) with drag and drop and folder watching
  • create a debug controller that controls and monitors the target state; gdb server would use the debug controller and notifications instead of managing target state itself
  • deal with recursive module imports by breaking out constants into separate modules
    • couldn't import symbols from cortex_m into semihost
  • semihosting option for console to convert newlines LF->CRLF and vice versa
  • 🛠 image file class hierarchy (binary, ihex, srec, elf)
  • check the DHCSR.S_RESET_ST bit to see if the core has been unexpectedly reset; send notification when detected; should be part of debug controller
  • kinetis: need to ensure device is in run mode before flashing
    • some devices support boot to VLPR
  • use project dir as working directory for semihosting requests
  • provide some way for gdbserver to report a locked board and the user to request it be unlocked
    • mostly for integration with debug host (ide)
    • should be via an oob comms channel
  • 🛠 provide real vendor, part number, family, etc attributes for targets, not just the class name
    • can report packs' device family hierarchy
  • for auto-mode flash operations, if we try chip erase and it fails then retry with sector erase
    • solves issues if some sectors are protected
  • need to be able to have different memory maps for each memory interface (core)
  • change breakpoint memory filter to a DebugContext? or add specific memory filter objects
  • need per-target flash init/shutdown scripts
    • set up and restore clocks
    • switch to run mode for kinetis
    • see IAR flashloader .mac files for examples of uses
    • add delegate and user script methods for this
  • 🛠 use memory map to automatically determine flash algo addresses
    • allow for overrides via flash subclasses
    • done for FLM algos, not for builtin
  • optimize instruction stepping over flash breakpoints
    • ❌ write instr+bkpt to unused ram and step or resume there
      • can't do this if the instr uses PC-relative data
      • also won't work for PC-relative branches
      • need elf to know unused ram regions
    • use FPB flash patching, which handles PC-relative accesses correctly
    • for M0+ devices with only BPU, need an instruction decoder and possibly simulator
  • support a separate svd file for each memory map
  • 🛠 make flash breakpoints use unused ram regions for flash algo and buffers if elf is provided
  • verify alignment and size for Flash.program_page()
  • flash algo debug mode should report used stack space
  • instruction simulator for optimized stepping and flash breakpoints
  • sometimes seeing reports from gdbserver about '$' being received instead of expected n/ack even though acks should be disabled, occurs when run through GNU ARM Eclipse
  • simulator target
  • can get an SWD fault during disconnect after kinetis is mass erased, maybe just suppress
    • caused by inability to halt after mass erase
  • periodically test CMSIS-DAP connection by sending some command like DAP_INFO, to detect disconnect?
  • automatically attempt to reconnect, in attach mode, if the CMSIS-DAP connection fails
  • check DAPLink firmware version and update automatically if outdated; look online for latest firmware; part of pyDAPAccess
  • auto-detect target and flash algo by reading ID registers; can we detect the vendor and mcu family?
  • Cortex-A support
  • add FlashRegion flag to mark the memory as containing persistent config options (like nRF5x UICR)
  • specify min&max sizes for memory regions, to indicate when a region may not be fully occupied by accessible memory
  • make SoCTarget halt(), step(), resume(), and vector catch methods apply to all cores by default, with option to apply only to a single core
  • support coresight topology detection (not really useful until we have tracing and cti)
  • support CTI for multicore control
  • filter writes so sw breakpoints don't get overwritten; is re-applying a sw bkpt when new code is written safe?
  • massErase() failed on locked KW24D after connecting with pyocd-tool
  • trace via MTB/ETB
  • add automated tests for rtos support; limit to single or few targets at least initially
  • memory mapped register access API derived from SVD, to make it easy to programmatically access registers
    • use descriptors so the syntax is like Peripherals.LPTMR0.CSR.TEN = 1
    • make register class resuable for statically defined registers such as used in coresight components
  • 🛠 use pytype/pyright to statically type check code
  • 🛠 disable traceback printing by default to simplify error messages, use session option to enable
  • add asserts to all public apis to check param types; still do this with type annotations?
  • retest hidapi locking on windows, figure out what the pywinusb bug is with K3S and report it
  • make CortexM.reset() only reset the core, perhaps via VECTRESET (only on v7-M); make SoCTarget.reset() reset chip (?)
  • add support for tests that run only on certain targets, in order to easily expand test coverage
  • change base DebugContext to r/w memory using MemIntf, and CortexM to use its target context?
  • support C++ name unmangling of IAR, GCC, and ARMCC (see demangler package on PyPI)
  • handle ELF files generated by the armcc linker; may require special casing use of segments
  • refactor rtos providers to commonize more code
  • gdbserver hangs til ctrl-c with vCont to step a non-current thread and default is continue; if a step is requested for at least one thread then it needs to halt automatically - is this fixed?
  • could make Target a subclass of DebugContext?
  • let targets specify default? and max swd/jtag clock speed, with override at board level
  • fully support flash-erase gdb command by supporting vFlashErase without vFlashWrite
  • sometimes flash programming reported progress can exceed 1.0 (diff between estimated and actual)
  • add user option to disable CM write buffer: SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk;
  • 🛠 have an optional default thread provider that shows main and process stacks as two threads
  • rtx5 support frequently seems to fail to detect enabled kernel (STM32L475 wifi demo)
  • add functional test for gdb non-stop mode
  • look into registering default pyocd ports with IANA, changing from 3333,4444 (those are already registered)
    • gdbremote service is port 2159
  • standardise naming of session options using a reverse-dns form (i.e., 'core.vector_catch')
    • this won't work for bool-opt, no-boot-opt, maybe just drop?
    • could allow dashes for dots and underscores: target.auto_unlock -> target-auto-unlock, no-target-auto-unlock
    • -Otarget.auto_unlock=false
    • -Ono-target-auto-unlock
  • revisit how flash builder does a pre-scan using crc or 32-byte reads
  • support writing registers in a thread debug context
  • support programming flash via alias regions with automatic address remapping
  • add flash algo metadata about whether chip erase (erase all) will erase only the one region or all on chip
  • make FlashEraser support a progress callback
  • support read-back verify in FileProgrammer (and FlashLoader?) (needed by htrun module_copy_pyocd)
  • gdbserver needs to send stop notifications for all threads in non-stop mode
  • make register cache postpone writing dirty regs to target until right before step or resume
  • create a RegisterField class and maybe Register class for easy accessing of fields; ctor accepts bit range
    • MVFR2_VFP_MISC = RegisterField(mask=0x000000f0, shift=4) # or auto-compute shift? *iscval = MVFR2_VFP_MISC(regval)
  • add functional test for memory access through each MEM-AP; need to add multicore device to CI
  • need api to read multiple core registers non-raw (clean up core register r/w apis)
  • 🛠 FreeRTOSThreadContext may incorrectly handle (inException && !vector-catch) when getting exception LR
  • BreakpointManager should handle watchpoints too
  • FlashBuilder resets after programming, which is not ideal when driven by FlashLoader for multiple regions
  • test_results.xml needs to be encoded as ascii, filtering any bad chars
  • support IPv6 connections
  • target-specific commands for commander (makes most sense when there's a common command parser)
  • ~/.pyocd.yaml or ~/.config/pyocd/pyocd.yaml for user level settings
  • add user option to direct log messages to either stdout or stderr
  • user option to separately direct warning and/or error log messages to stdout or stderr
  • no direct way for a family created for a dfp to override flash class
  • monitor mode debugging; see https://github.com/NordicPlayground/j-link-monitoring-mode-debugging
  • make DP and AP graph nodes too; use "coresight" graph plane
  • don't require semihosting to be enabled to support swv; especially for raw swo
  • test for and prevent infinite recursion in delegates or user scripts if they call an API that is being hooked
  • 🛠 jtag support; user option to select between swd & jtag; cmsis-dap jtag
  • can open/init/connect close/uninit/disconnect terminology be normalised for session, board, probe, target?
  • clean up contains related methods on MemoryRangeBase to just contains(), contained_by(), intersects() that accept a variety of parameters and does the right thing based on type [v1.x]
  • make Breakpoint and Watchpoint classes more usable with enable/disable/etc methods, support creating new instances
  • gdbserver unit test; connect to server port and send commands
  • serial port integration into semihosting/swv stream? (CMSIS-DAP v2.1 UART COM)
  • remove ELFSymbolProvider and make ElfSymbolDecoder a subclass of SymbolProvider?
  • standardize case of acryonyms in symbols; ELF vs Elf, GDB vs Gdb, etc
  • add expect_invalid_access_to_fault attribute to targets (and/or should be on mem regions?)
  • memcache should just pass accesses to parent/core if the core is running, instead of repeatedly invalidating the cache
  • allow memcache accesses to cross region boundaries
  • refactor constants in CortexM and elsewhere into namespace classes
  • cmsis-dapv2 with ulinkplus raises on disconnect and sometimes on connect with samplbär (?)
  • KeyboardInterrupt can leave probes, particularly pydapaccess, in an invalid state, so that disconnect fails
  • 🛠 for each delegate method there should be a method on the calling class that can be overridden by subclasses, with the default implementation just calling the delegate method (if present)
  • need a way to tell FlashBuilder a chip erase was previously done
  • all memory region attributes should be writable up to a point, then frozen
  • change Flash prepare_target() and restore_target() to delegate methods on CoreSightTarget
  • move crc analyzer into its own class
  • refactor get_{sector, page, flash}_info() to be on the region, not Flash (?)
  • subcommand that prints licenses of included third-party dependencies; mostly for the binary release
  • group logging of dwt and fpb init with core info so it's easier to understand for multicore devices
  • create flash regions for algos defined in pdsc that don't map onto existing region (eg STM32F401 OPT), even if default=0?; mark non-testable
  • need simple way to override core's default reset type from CoreSightTarget during init sequence
  • replace fast_verify/trust_crc user option with 64-bit murmurhash
  • allow numbers passed to pyocd commander command line arguments to have underscores
  • elf files should be added at the session level, not directly on targets or cores (?); but need the option to set a core for each elf
  • test jtag in ci for list of targets known to have jtag, or autodetect
  • 🛠 jtag scan chain auto detect using DAP_JTAG_Sequence command for CMSIS-DAP
  • share .FLM loading code between CmsisPackDevice._build_flash_regions() and CoreSightTarget.create_flash()
  • add FlashRegion.is_sector_erased() that uses a method on Flash (?) so it's overridable
  • need a way to combine/wrap contiguous memory regions, particularly flash regions for multiple sector sizes
  • support gdbserver QThreadEvents for thread creation and deletion
  • add note to docs about potential issues when running in a VM
  • raise a more helpful exception for missing file from .pack; currently zipfile raises KeyError which gets trapped and reported as 'target foo not recognized'
  • only create Flash instances as needed and don't keep around; add create_flash() method to FlashRegion
  • move state save and restore from flash bp to Flash as optional feature
  • make BreakpointManager use priorities and capabilities for selecting bp type instead of hard-coded knowledge of providers
  • memcache should prefetch up to packet size; need probe api to get max prefetch size
  • change FileProgrammer to use image file classes
  • add session option to override the default boot memory; maybe do it via an 'initial_vtor' value per core
  • fix rtos thread contexts not being cached
  • Cortex-M7 r0p1 erratum 702596 causes MASKINTS to not work if MASKINTS==0 at any point between halt and step
  • add logic to set DEMCR.TRCENA only if an SCS component is found, and then re-scan the ROM table if SCS is not first component in table; bonus points if only invalid ROM table entries are re-scanned
  • pass flash region and address range (maybe data?) into flash program notifications
  • user option to disable double buffering during flash programming (why?)
  • make 'pyocd list --boards' include whether the board's target type is available
  • OptionsManager.contains should return true even for options with default values
  • don't assume primary/boot core is core 0; add user option and target method to set boot core
  • openocd has a 'deferred-examine' option for cores
  • support match transfers in DebugProbe API; via multiple register access API
  • CallSequence should support dotted notation for hierarchical task names
  • support AP trace logging for the high level memory access API, as used for STLink
  • for user scripts, if a hook function has the expected number of params then accept any name?
  • make CoreSightTarget use AP for memory accesses if core is not available (which AP?); what about GenericMemAPTarget?
  • memory region attribute mechanism needs a complete revisit; copy support was a pain
  • add 'coresight_soc' as an alias for 'cortex_m'
  • usb backends should catch exceptions related to disconnected devices and raise DeviceDisconnectedError
  • need support for component-instance-specific settings, i.e. core-specific (by graph node name)
  • support a combined telnet port for multicore; in addition to individual; with core # log prefix?
  • separate creation of DebugContext stack from CoreSightTarget.add_core(); can reuse for rtos threads contexts?
  • need a central, easy way for target impl to override classes used for various objects (cores, flash, etc); dependency injection, anyone? (more like factory injection)
  • need a way for the user to select non-default flash algos, and/or easily add new flash algos or override existing; must be settable in config file
  • handle read/write of double float regs in single pass, like cfbp
  • memory and register caches check whether the core is running each operation, which is inefficient; use notifications to track running state (probably so inefficient it partially nulls the cache performance improvement!)
  • 🛠 send notifications on √DP and -probe reset methods
  • change all public attributes to properties
  • allow setting 'project_dir' setting from yaml config file
  • kinetis targets that disable ROM vector remap should do it after every reset, not just after connect
  • target-specific session options
  • board and probe API to get voltage, as supported by STLink and JLink
  • board and probe API and user option to control board power
  • add optional 'format' arg to read32/read8 to support auto conversion; how does this interact with bytearray?
  • automatically temporarily disable a breakpoint set on the current instruction when single stepping; should be debug controller doing this
  • give graph nodes names and allow child nodes to be accessed by name, e.g. "target.core0.dwt"
  • remove reset(), set_clock(), flush(), assert_reset(), is_reset_asserted() from DP (?)
  • add an auto-flush timer to pydapaccess
  • CortexM.is_halted() should return a cached value once we know it's halted, until it resumes; same for get_state()? or do the caching in DebugController and make CortexM always be low-level and simple.
  • 🛠 document Target methods and add type annotations!
  • add an option to read_core_register(s) to select between raising on failure to read or returning None
  • adopt IOKit-style multi-plane graph architecture, so there can be both a coresight plane and board/core plane
  • add target flag to indicate support for security (locking); use in commander
  • consider caching usb device scans within a short time window
  • use DFP debugconfig to know whether a SWJ sequence is required; add setting to disable SWJ; add setting to force SWJ use
  • support JTAG for STLink and JLink
  • create TargetSupportProvider plugins classes instead of TARGET dict
  • 🛠 add optional attribute parameters to MemoryInterface APIs, for per-transfer HPROT/HNONSEC/etc control [v1]
  • make StreamServer spawn threads for connections with a handler object; or, why can't socketserver.ThreadingTCPServer be used?; need to rework semihost and swv to have connection muxes so they still have a file-like interface
  • change gdbserver to use StreamServer? and support multiple connections?
  • really need to clean up ListenerSocket, it's awful!
  • capabilities set for the Target class (memory, core regs, bp, wp, etc)?
  • change async mem read callbacks to an object with call so if the callback is invoked more than once it can still return the value that was read; callbacks still work as-is, maybe use obj for caching
  • have thread-local stack of MemAttrContext, AP uses top of stack, attrs param of mem access overrides
  • FlashEraser chip erase should optionally accept sector address/range or region name(s) and only erase the matching regions; most important with external flash memories; integrate with 'pyocd erase' commands
  • allow any number of user scripts to be loaded; if there are conflicting delegate symbols, scripts loaded later override; just an optimization over manually writing a script that loads others
  • targets need a list of supported reset methods
  • add a presentation order value to CoreRegisterInfo so registers like msp and psp can be shown next to each other
  • need presentation sort order for register groups
  • rtoses need to check for supported architectures (in preparation for cortex-a)
  • strip off leading '$' and trailing checksum from gdbserver packets added to packet queue; use GdbServer(Packet | Command) class
  • which functionality is in GDBContextFacade versus GDBServer is not coherent
  • use enum or simple constants for option names so invalid names can be detected
  • allow a session to be reused for multiple connections? maybe cloning of sessions instead
  • remote: connect_mode and disconnect_resume should behave differently, particularly if multiple clients are connected
  • 🛠 switch from six.ensure_{str,bytes}() to interal versions; replace to_{str,bytes}_safe() <- rework to remove six!
  • register cache is cortex-m architecture dependent due to CFBP support; support cache architecture adapter classes
  • make pydapaccess gracefully disable its plugin if no backend is available; pyusb[_v2]?_backend needs to handle usb.core.NoBackendError
  • restructure sessions so finding etc a probe happens within a session instead of outside [v1]
  • need a better way to define debug context stacks; method to return list of classes? dependency injection?
  • if a software breakpoint is set on an SVC instruction, the immediate syscall number is read incorrectly by the SVC_Handler; can we use a watchpoint to work around this?
  • gdb 'advance' command in an exception handler will attempt to set a breakpoint on EXC_RETURN in LR; catch this, and FNC_RETURN and ignore, or set bp on real LR addr on appropriate stack
  • bring back soft_bkpt_as_hard option
  • use sets in BreakpointManager for cleaner code (_get_updated_breakpoints)
  • refactor user script support in Session into a UserScript class that handles everything
  • have a DebugContext for each of S and NS worlds; also the current world (aka "live")?
  • replace Session.user_script_proxy with user_script_namespace property? or add
  • save most recently set SWD/JTAG frequency so it is readable; extend set_frequency() api to return actual freq
  • options should be added to the session's OptionsManager, not OPTIONS_INFO that affects all sessions
  • SWO locking: does adding flush() to the DAPAccessCMSISDAP swo methods remove the need for gdbserver/SWVReader locking?
  • adjust SIGINT so only main thread can receive it; especially to resolve SIGINT breaking probe drivers
  • remove GDBServer support for running directly on the SoCTarget
  • make target type a URI? imagine --target=https://keil.com/packs/Keil.STM32F4xx_DFP.pack/STM324%20Family/STM32F411RETx
  • if a delegate did_reset() method is set, force reset to always halt, run the delegate, then continue
  • use prompt_toolkit or tqdm or rich for progress bars and time remaining computation
  • allow plugins to add commands; use plugins instead of metaclass for builtin commands?
  • have a single plugin type with features/capabilities?
  • when one session loads DFPs into the global TARGET dict, another session will see them; is this ok?
  • should step() raise an exception if you try to step when the target isn't halted?
  • clearly define the purpose of CortexM.is_debug_trap(); what is its use case and why are some DFSR flags ignored?
  • adjust step timeout automatically based on debug permissions (S debug); maybe multiple timeout options
  • look at using 'qXfer:exec-file' to give gdb the path to the elf passed to pyocd
  • method to easily add target support from the filesystem, similarly to packs (with 'pack' session option); use target support plugin
  • semihost agent _get_string() should use memory map to ensure it doesn't try to read past end of memory
  • make usb read/write timeouts for probes configurable via options, probably a single usb timeout option
  • implement STLink quirks: JTAG DP read from J24 through J31 (fixed J32), must read RDBUFF to get the data (see openocd STLINK_F_QUIRK_JTAG_DP_READ); closeAP return code fix from J29; V3J6 max 8-bit packet size is 512 bytes
  • add trst support? for jtag
  • commonize remote probe status codes; duplicated in TCPClientProbe.StatusCode and DebugProbeRequestHandler.StatusCode
  • info/show/target subcommand; prints target info like available flash algos, memory map, default reset, etc
  • use a simple dependency injection system for things like AP and CoreSight ID maps? nice having central table, but hard for other modules to contribute, even harder for plugins
  • support reset via Class 0x9 ROM table CSYSRSTREQ
  • support config of power domains via setting; can have power domain plane and graph nodes
  • have an abstract power domain manager interface class, superclass of GPR and class 0x9 ROM table
  • 🛠 memory interfaces should be the owners of memory maps [v1]
  • add a commands group for cortex-m specific commands (e.g. show fault)
  • probe locking needs revisit; DebugProbe methods are not locked, serialization only happens on call to lock(); existing probes have internal impl lock too, should these locks be merged where possible (e.g., pydapaccess still needs lock for cmd queue), or DebugProbe methods always locked?
    • even though DebugPort and DAPConnect now lock the probe during connect and SWJ, another client that attempts a transfer will not be serialized and may fail or cause problems with the SWJ
  • support clean re-execution of discovery
  • CallSequence should accept and filter None elements in sequence lists, to make building conditionalized sequences easier
  • lock probe during reset and reset&halt sequences
  • replace CortexM._supports_vectreset with set of supported reset methods
  • define method to advance run token instead of directly modifying _run_token everywhere?
  • 🛠 should reset_and_halt() be merged into reset()?
  • more specific naming of DFPs for pack subcommand
  • add uninstall command to pack subcommand
  • tcp servers: allow user to specify interface(s) on which to server; for multiple, open multiple socket servers
  • need to be able to specify probe unique ID to use from yaml config file; related to selecting probe within session
  • rename serve_local_only to allow_remote throughout code and options [v1]
  • have individual allow_remote options per server, plus a global allow_remote_all option [v1]
  • jlink: option to set the jlink script file; limited use due to only CoreSight connection?
  • jlink: set project file by calling "ScriptFile = /pyocd.jlink"; have session option to override path; probably need probe-within-session change
  • support variable substitution for some session options like paths
  • MEM-AP v2: provide access to AUTHSTATUS reg; use for is_enabled_for()?
  • call sequence subclass for invoking a call sequence on an iterable; so it's possible up front to see entire call sequence tree rather than rely on runtime-constructed sequences, e.g for AP init
  • control mode for gdbserver with bidirectional json-based command, status, log, notification over stdio (and socket?)
  • for gdb (or all?), add a fake register with the current v8-M security state
  • accept glob pattern for --name argument on list subcommand
  • use prettytable for --help-options
  • flash: skip page transfer to RAM if data is same as previous page (mostly programming blank pages, those should be skipped already)
  • flash: use BlankCheck FLM API if available
  • json: it would be nice to report a board's target taking into account config file and probe-specific config
  • json: support multiple output types being requested; have only a single json schema version [v1]
  • gdbserver debug log shows two POST_RESET events
  • pack subcommand: arg to restrict find/install to specified vendor
  • flash subcommand: arguments to control target state after flash; post-reset, halt, etc
  • move reset handling to a ResetController object? with support for delegate/plugins/dependency injection? for implementing target-specific reset methods [v1]
  • have a generic plugin class discovery mechanism with scoping, e.g. session foo has modified default classes based on its target
  • ADIv6: need to program DP regs after selecting wire protocol; DLCR (SWD only), SELECT1, others are already written
  • option to force halt on reset; maybe always enable if the did_reset() delegate method is implemented
  • add 'run' subcommand; how is this different from 'flash' or 'load'? idea is more like a debugger starting an app (with VTOR, SP, reset handler) than simply copying stuff to target memory, maybe user script to be involved/supported
  • have a target properties obj; things like supported reset types, expect-fault-on-invalid-addr, etc [v1]
  • instead of SharedDebugProbeProxy, have DebugProbe be shared by default; make DebugProbe thread safe; with Session creating a DebugProbeConnection object which is added to the DebugProbe [v1]
  • flash: when creating an algo from FLM, set the FlashRegion attributes if not already set (huh?)
  • allow cores to have names; use graph node name; for DFP targets use Pname
  • need a way to reference flash algo (FLM) paths within the target type's DFP, like "pack://self/flash/foo.flm" or "@pack/cmsis/foo.flm"
  • run gdb remote commands in a separate thread so we can cancel the command with ^C from gdb
  • memory map: start params on query methods should be optional with default None
  • settings for customizing or selecting flash algos without needing user script
  • python-based flash algos -> that's the Flash class...; provide example and test for use from user script
  • memory map: refuse to add overlapping regions?
  • export some commonly used symbols in pyocd/init.py [v1]
  • if multiple --config files are passed on command line, add in order as option layers
  • move user script init to after board creation in Session ctor?
  • make probe, board, other? attributes available to user script as soon as they are created
  • hierachical memory maps? MemoryRegion has submap; MemoryMap needs bounds? or should be a MemoryRange itself; this could solve multiple sector size flash complexities
  • Session.get_current() needs to be thread local; set thread's session when a new thread is created
  • show some feedback (eg spinner) when gathering probes if stdout is a tty
  • switch to python-libusb1 instead of pyusb, to have full libusb API access?
  • DebugPort does not update DP_SELECT cache if DP_SELECT is explicitly written to
  • PackTargets._generate_pack_target_class() should use types.new_class()
  • DebugPort: add properties to indicate type and/or supported protocols (SW-DP, JTAG-DP, SWJ-DP)
  • pack subcommand: add examine subcommand to print data from a .pack
  • breakpoints: need provider can_handle() method; attempt to set sw bp in non-RAM region will result in AssertionError
  • cmsis-dap: support v2.1 UART channel via DAP
  • probeserver and gdbserver: revert ignoring of --local-only; use as inverse to --allow-remote
  • track discovery state (not started, in progress, completed); make available somewhere (session?)
  • calling DebugPort.connect() directly to reconnect will not include any target-specific (including pack target) modifications of the DP init sequence
  • support nicknames for probes, defined in config file?
  • erase subcommand: session option to do chip erase if no args are passed?
  • add a utility context manager class that temporarily sets session options; requires thread-local session options
  • gdbserver: add 'echo', 'gdb_port', and 'telnet_port' commands for OpenOCD command line compatibility, then handle -c args like commander
  • list subcommand: switch to subcommands for each list type, maybe top-level eg 'pyocd probe list', 'pyocd target find nrf53' [v1]
  • CoreSightTarget.create_flash() does not handle multi-sector-size regions
  • reset: use ResetTactic object that describes type (hw, sw, etc), domain (soc, core), and controller (eg core on which SYSRESETREQ is toggled); does ResetTactic contain reset logic itself, or only pass options to SoCTarget.reset() or ResetController?
  • read/write access flags on memory regions aren't checked for memory transfers; should be optional cuz many DFPs get it wrong
  • support -L style logger control in config files via session options
  • cortex-m: remove eapsr, iapsr, iepsr variants of xpsr; maybe also apsr, epsr, ipsr? [v1]
  • architecture adapter for register cache (handling CFBP etc)
  • Q registers for MVE
  • flash programming: session option for max allowed failures, so first failure doesn't abort long program; report failures at end
  • flash programming: retry on failure
  • stlink: support JTAG_READWRITEMISC_OUT/IN for deferred transfers
  • flash: refactor Flash class into FlashAlgo and make it device-independent; move override_security_bits() to FlashRegion attribute? [v1]
  • Target.halt() and reset with halt should return bool indicating successful halting
  • recognize Cypress KitProg2/3 as using board IDs (do they?)
  • DP: need to init DP CTRL/STAT for SWD
  • run probe queries in separate threads for each plugin, for stlink separate threads per device for board id lookup
  • DP/AP: 'cached' keyword argument for read_reg() to force reading from the device
  • Mem cache: 'cached' keyword argument for MemIf transfer methods when mem transfer kwargs are supported
  • DFP: add column for the device package when listing DFP targets to help distinguish part numbers
  • subcommand: add subcommand to print path to SVD file for a target type
  • subcommand: add subcommand to print info about a debug probe
  • load: if a bin files has no base address, default to being concatenated with previous file, or flash base if no previous
  • load: merge multiple files into one image to be programmed, with later files overriding content of earlier files at the same address
  • SWV: should support outputting printf to gdb console syscall
  • SWV: should support reading SystemCoreClock (gdb symbol request or elf); have to deal with invalid value til main(); option to override symbol name
  • SWV: watch relevant session options for live updates
  • CortexM: emulated reset: clear pended NMI (needed?), PendSV for both S & NS, SysTick for both worlds
  • print statistics for erasing chip and sector
  • JTAG: DebugPort._handle_error(): write_reg(DP_ABORT) will not work for JTAG
  • rework commands base and metaclass to remove ALL_COMMANDS; maybe remove metaclass which doesn't do much
  • get_halt_reason(): change to return set of reasons? returning only one can be misleading.
  • options: support an enum type
  • probe-specific config options: support multiple comma separated uids in one key
  • Session ctor only accepts project_dir from options param, not kwargs
  • delegate: add hooks for pre-flash and post-flash, like the Flash.{prepare,restore}_target() methods; need post-init too
  • modify connect modes: halt and attach are very similar, meaning no reset, only differing in whether to halt; add code-loading modes that expect fw download after connect, and/or auto load the given elf? [v1]
  • gdbserver: test which set of registers in a T response causes gdb to least often request a full reg context for statement step debug
  • command: support cloning and merging? of command sets; allow execution context's command set to be replaced; have session-level default command set
  • 'board.name' option
  • user script: if name from --script is empty, don't load script; eg --script=''
  • cortex-m: optimise reg read of multiple cfbp/xpsr subregs in one call; the main reg is read once per subreg
  • make DebugProbe?, MemoryRange, MemoryRegion, ? hashable
  • erase subcmd: if the target has to be auto unlocked, erase --mass will double erase it
  • probe-specific config options: parse and match uids as URI; allow probe plugin to override match
  • TCP servers: support writing port number to files
  • set 'disabled' attr on all trace loggers to True
  • make --color/PYOCD_COLOR apply to all uses of colour
  • add entries to AP_TYPE_MAP with var=None to match new variants of MEM-APs
  • RTOS: optimise thread read_core_registers_raw() by either reading an entire saved context at once and extracting regs, or using deferred reads
  • flash: option to skip erasing entirely?; for optimising cases where the user knows flash is erased; is this even useful since pyocd checks if pages are erased?
  • target type specific command line options
  • should DEMCR.TRCENA be cleared on disconnect? only if we set it.
  • flash: analyser should report sector erased status too, with configurable erased value
  • thread awareness: set bp on main(), enable reading when hit; configurable symbol name
  • thread awareness: 'threads' command should be more clear about what enabled/disabled means; 'status' should include RTOS type
  • thread awareness: handle RETPSR.SPREALIGN (bit 9) for running thread in Handler mode
  • strip CortexMExtensions down to only those useful to a debugger; check for all that are defined [v1]
  • define classes to hold the location of a value and can lazy load; use for core register access in debug contexts; consider Target core register access methods [v1]
  • running 'pyocd list -t' logs "Target type is cortex_m" multiple times
  • memory regions should have cache+prot+domain setting used as default for transfers
  • DebugContext.core should be optional; see GenericMemAPTarget and how it should support a DebugContext
  • pack subcmd must show or install only the most recent version of a pack if multiple versions are in the index
  • must ensure PPB accesses are privileged and device even if user has changed hprot; use xfer attrs and/or ctx mgr
  • pyocd on 32-bit python on windows doesn’t work because CPM 32-bit wheel fails to load
  • options: track both raw and converted option values
  • color log: [see elfmimi's thread on slack]
  • cores should support reporting architecture minor version, eg v8.1-M
  • watchpoints: support value match in DWT v2.1 (v8.1-M)
  • watchpoints: support linking in DWT v2.x
  • watchpoints: deprecate Target.find_watchpoint(), replace with .iter_watchpoints()
  • SWO: switch to push callback based output from probe so reader doesn't have to poll probe; not possible with many probe protocols
  • use SWJ-DPv2+ RESEND register to retry reads on corrupted SWD read
  • flash: use dfp algo RAMsize attr to determine stack size? (seems too small in some dfps, esp for double buffering)
  • mem attrs: support a 'signed' attribute that will perform two's-comp conversion (is write needed?)
  • Session.find_user_file() needs to be rewritten; can return invalid path source from option; poor design
  • dfp: add release date to 'pack show' and 'pack find' output tables
  • elf: watch for modification date changes on attached elf files, send notifications and rebuild decoders
  • gdbserver: refactor with a GdbserverConnection class
  • debug: null pointer detection feature via DWT watchpoint, with configurable size
  • move PyOCDTool code to new pyocd.main module, and import it from pyocd.main; use name for logger
  • 🛠 create TransferError subclass NoAckTransferError
  • 🛠 DebugPort: handle NoAckTransferError by attempting a DP IDR read and reconnecting if it fails (post_reset_recovery); have to reissue the failed transfer
  • cmsis-dap probe: when using v2.1 info, include a test binary from internal info if available
  • config: have subcommand or usage context sections in config file so, for instance, different config can be used for the erase subcommand vs gdb
  • cmsis-dap: commonise v1 and v2 code to check for "CMSIS-DAP" string; right now v2 doesn't check device name!
  • options: distinguish between raw and cooked values; allows str type for both
  • swv: SWVReader should support system-level usage, not tied to a core
  • breakpoints: somewhat revive the swbp-as-hwbp option in the form of "prefer hwbp"; probably default enabled
  • AP: not caching TAR
  • AP: use BD0-3 instead of switching TAR for small reads within range
  • mem attrs: support 'stride' and 'elements' attributes for accessing sparse data with block transfers
  • executing 'until *' in gdb causes it to report "Not implemented stop reason (assuming exception): location-reached" and cortex-debug shows an "Exception occurred" note; could be a range step issue?
  • gdb façade: return 0 for core register values when core is in reset (like it used to be!)
  • FlashRegion should have a list of programmable ranges (MemoryRange), each with algo and sector+page size
  • target: per-core control of reset type; currently can only be set globally (requires target/node-specific options)
Clone this wiki locally