Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Fix: SWDP and JTAG TAP routine types and understandability#1118

Merged
esden merged 20 commits into
mainfrom
fix/tap-types-and-understandability
Jul 19, 2022
Merged

Fix: SWDP and JTAG TAP routine types and understandability#1118
esden merged 20 commits into
mainfrom
fix/tap-types-and-understandability

Conversation

@dragonmux
Copy link
Copy Markdown
Member

In this PR we address a few aspects of the SWDP and JTAG TAP routines which were less than ideal. This resulted in over 400 bytes of Flash saved and what should be much more understandable routines to maintain moving forward.

The first major thing we addressed was the type confusion (uint8_t instead of bool) and inappropriate use of int for values that must not be negative. The second was refactoring out the delayed and non-delayed paths that can be taken. The third was creating a much higher degree of re-use and re-usability where possible with clarified names for parameters to better indicate what they do.

This also applies clang-format to many of the files involved, bringing the code base closer to formatting unity.

This has been tested on a couple of flavors of STM32 target (many thanks to @mubes), and Tiva-C (JTAG and SWD) without any sign of regressions caused by it.

@dragonmux dragonmux added the Enhancement General project improvement label Jul 18, 2022
@dragonmux dragonmux added this to the v1.9 release milestone Jul 18, 2022
@dragonmux dragonmux requested a review from esden July 18, 2022 03:17
esden
esden previously approved these changes Jul 19, 2022
Copy link
Copy Markdown
Member

@esden esden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some testing too. Seems to be working. 🤞 😸 Merging!

@esden
Copy link
Copy Markdown
Member

esden commented Jul 19, 2022

Oops, missed the fact that it has conflicts due to the other PRs that I merged. When you have a moment can you take a look at it @dragonmux ? :)

dragonmux added 20 commits July 19, 2022 02:14
This doesn't actually change the resulting binary size, so worth doing
@dragonmux dragonmux force-pushed the fix/tap-types-and-understandability branch from d2b9626 to f3950e9 Compare July 19, 2022 01:17
Copy link
Copy Markdown
Member

@esden esden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esden esden merged commit 52e5357 into main Jul 19, 2022
@dragonmux dragonmux deleted the fix/tap-types-and-understandability branch July 19, 2022 02:33
@dragonmux dragonmux mentioned this pull request Nov 18, 2022
6 tasks
@dragonmux dragonmux mentioned this pull request Nov 27, 2022
6 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Enhancement General project improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants