[mbedmicro/pyOCD] Flash enhancements and fixes primarily for STM32 support (#627)

29 views
Skip to first unread message

Chris Reed

unread,
Apr 23, 2019, 5:23:16 PM4/23/19
to mbedmicro/pyOCD, Subscribed

This PR includes a number of flash related fixes. The most important is making use of erase sector vs program page sizes for .FLM flash algos coming from CMSIS Packs. This fixes issues with STM32 devices that have such large sector sizes that sector buffer won't fit in RAM. Now pyOCD will use the page size declared in the algo for buffers. This also enabled double buffer support, increasing flash programming speed.

Other included changes.

  • The debug.log_flm_info user option will cause details of an .FLM flash algo to be logged when it is loaded.
  • Builtin STM32 targets with large sectors were updated to use different sector/page sizes and enable double buffering.
  • Fixed an issue with reported erased byte count for flash programming, if the sector size is not the same as the page size.
  • The commander show map command prints both sector and page sizes.
  • Fixed flash_loader_test.py for the case where the test binary and generated test data would overlap.
  • The most recently created Session object is available via Session.get_current(), which allows code that doesn't have a direct reference to a session to make use of user options. This will mostly be used for debug or similar purposes.

You can view, comment on, or merge this pull request online at:

  https://github.com/mbedmicro/pyOCD/pull/627

Commit Summary

  • Global accessibility of current Session.
  • 'debug.log_flm_info' option to log .FLM details.
  • Support for page size different from sector size with .FLM algos.
  • Fixed page size and enabled double buffering for several STM32 targets.
  • Corrected FlashBuilder summing of erased bytes.
  • Fixed FlashEraser to support sector sizes.
  • Commander 'show map' prints both sector and page sizes for flash.
  • Minor changes to progress utility.
  • flash_loader_test.py fixes.

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Chris Reed

unread,
Apr 23, 2019, 5:26:01 PM4/23/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 25, 2019, 5:17:30 PM4/25/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 25, 2019, 5:48:46 PM4/25/19
to mbedmicro/pyOCD, Subscribed

Merged #627 into master.

Reply all
Reply to author
Forward
0 new messages