WIP: Add code size target #590

Draft
davidhorstmann-arm wants to merge 4 commits from davidhorstmann-arm/add-code-size-target into development
davidhorstmann-arm commented 2025-12-05 06:19:23 -06:00 (Migrated from github.com)

Use the scripts from Mbed-TLS/mbedtls-framework#246 to implement a new target in CMake called size which displays the code sizes of modules and generates a JSON code size report.

To use it, simply do the following:

cd build
cmake ..
make -j8
make size

When cross compiling with a toolchain file, this relies on the variable CMAKE_SIZE_UTIL being set to the size command for the relevant architecture (e.g. arm-none-eabi-size).

PR checklist

Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.

  • changelog provided | not required because:
  • framework PR provided Mbed-TLS/mbedtls-framework# | not required
  • mbedtls development PR provided Mbed-TLS/mbedtls# | not required because:
  • mbedtls 3.6 PR provided Mbed-TLS/mbedtls# | not required because:
  • tests provided | not required because:
Use the scripts from Mbed-TLS/mbedtls-framework#246 to implement a new target in CMake called `size` which displays the code sizes of modules and generates a JSON code size report. To use it, simply do the following: ``` cd build cmake .. make -j8 make size ``` When cross compiling with a toolchain file, this relies on the variable `CMAKE_SIZE_UTIL` being set to the `size` command for the relevant architecture (e.g. `arm-none-eabi-size`). ## PR checklist Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line. If the provided content is part of the present PR remove the # symbol. - [ ] **changelog** provided | not required because: - [ ] **framework PR** provided Mbed-TLS/mbedtls-framework# | not required - [ ] **mbedtls development PR** provided Mbed-TLS/mbedtls# | not required because: - [ ] **mbedtls 3.6 PR** provided Mbed-TLS/mbedtls# | not required because: - **tests** provided | not required because:
gilles-peskine-arm (Migrated from github.com) reviewed 2025-12-05 06:19:23 -06:00
This pull request has changes conflicting with the target branch.
  • framework
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'davidhorstmann-arm/add-code-size-target:davidhorstmann-arm/add-code-size-target'
git switch 'davidhorstmann-arm/add-code-size-target'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'development'
git merge --no-ff 'davidhorstmann-arm/add-code-size-target'
git switch 'davidhorstmann-arm/add-code-size-target'
git rebase 'development'
git switch 'development'
git merge --ff-only 'davidhorstmann-arm/add-code-size-target'
git switch 'davidhorstmann-arm/add-code-size-target'
git rebase 'development'
git switch 'development'
git merge --no-ff 'davidhorstmann-arm/add-code-size-target'
git switch 'development'
git merge --squash 'davidhorstmann-arm/add-code-size-target'
git switch 'development'
git merge --ff-only 'davidhorstmann-arm/add-code-size-target'
git switch 'development'
git merge 'davidhorstmann-arm/add-code-size-target'
git push origin 'development'
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto!590
No description provided.