Skip to content

CMSIS: update to CMSIS 5.7.0 #12949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
May 14, 2020
Merged

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented May 11, 2020

Summary of changes

Fixes #12568

There are couple of fixes here:

  • importer be compatible with python 3
  • importer sha for RTOS after move (sha updated , after I manually resolved the conflicts)

Impact of changes

Migration actions required

Documentation


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


0xc0170 and others added 13 commits May 11, 2020 09:47
As they were applied on the different code base (moved files), we remove them and
reapply locally manually and add new sha.
mbed OS used older RTX4 version and with osThreadDef accepting only 3
parameters, to preserve compatibility we hardcode the 'instances'
parameter to 1.

(cherry picked from commit 428acae)
(cherry picked from commit 4360b7b)
(cherry picked from commit 6a6e3ac)
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8)

(cherry picked from commit fb35475)
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.

(cherry picked from commit d3f7abd)
In case of ARM compiler, idle and timer thread stack though assigned
to `.bss.os` section since not zero initialized are part of `data` section.

In this commit, we are moving stacks of idle and timer thread to bss
section and thereby saving ROM space.
CMSIS repo does not support pre-processor defines, hence multiple assembly
files are added for secure/non-secure and floating point tools.
Mbed OS tools support assembly file pre-processing, but the build system
does not support multiple assembly files for each target, hence updating
the assembly files.

1. Patch RTX so irq_cm4f.S files work with no FPU targets
2. Patch RTX so irq_armv8mml.S files to work with and without FPU
2. Patch RTX so irq_armv8mml.S and irq_armv8mbl.S files to work with secure and
   non-secure builds
cherry pick otherwise fails because the sources were moved under rtos/source. I manually resolved these patches. For the future, lets use these newer sha that should work.
@0xc0170 0xc0170 changed the title cmsis 5 update to b5f0603d6 CMSIS: update to b5f0603d6 (cmsis + rtx) May 11, 2020
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 11, 2020

This needs testing that a script will actually find new SHAs there.

Note: You must resolve any conflicts that arise during this cherry-pick process. Make sure that the "(cherry picked from commit ...)" statement is present in the commit message. Re-execute the python script to apply rest of the SHA commits.

I however used git patch/am to apply patches (after updating the paths in each). I don't have this "cherry picked from commit ..." in the commit messages. I can see our script uses it so might resolution might not be correct way then for the future.

I'll test the script to update to another sha to see if it passes.

0xc0170 and others added 9 commits May 11, 2020 11:17
mbed OS used older RTX4 version and with osThreadDef accepting only 3
parameters, to preserve compatibility we hardcode the 'instances'
parameter to 1.

(cherry picked from commit 428acae)
(cherry picked from commit 4360b7b)
(cherry picked from commit 6a6e3ac)
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8)

(cherry picked from commit fb35475)
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.

(cherry picked from commit d3f7abd)
In case of ARM compiler, idle and timer thread stack though assigned
to `.bss.os` section since not zero initialized are part of `data` section.

In this commit, we are moving stacks of idle and timer thread to bss
section and thereby saving ROM space.

(cherry picked from commit 9549fff)
CMSIS repo does not support pre-processor defines, hence multiple assembly
files are added for secure/non-secure and floating point tools.
Mbed OS tools support assembly file pre-processing, but the build system
does not support multiple assembly files for each target, hence updating
the assembly files.

1. Patch RTX so irq_cm4f.S files work with no FPU targets
2. Patch RTX so irq_armv8mml.S files to work with and without FPU
2. Patch RTX so irq_armv8mml.S and irq_armv8mbl.S files to work with secure and
   non-secure builds

(cherry picked from commit 96e0689)
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 11, 2020

I was able to update to the latest release (my branch was older), here it is the review: https://github.com/0xc0170/mbed-os/pull/new/feature_CMSIS_5_a65b7c9a3

I can push these here and would be updated to the latest CMSIS 5 we have (I would leave both updates as one is to fix conflicts with renames and the latest one is using the updated shas). Let me know what you think

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 11, 2020

Updated. I updated to the newer version here: the latest CMSIS 5 release. It might be confusing there are two updates but one is served as a basement after our source/ restructure and t he other one is on top of that. I could possibly just resolve to the latest but would need need to go through the conflict manual resolution for multiple files once again. Having this sequence here, we just update twice. Let me know what you think.

I updated the readme as well to be more clear what it does.

@0xc0170 0xc0170 changed the title CMSIS: update to b5f0603d6 (cmsis + rtx) CMSIS: update to a65b7c9a3 (cmsis + rtx) May 11, 2020
@0xc0170 0xc0170 force-pushed the feature_CMSIS_5_b5f0603d6 branch from 61812ff to d04b403 Compare May 12, 2020 15:04
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 12, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented May 12, 2020

Test run: FAILED

Summary: 1 of 3 test jobs failed
Build number : 6
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 13, 2020

will review failures again 😞

0xc0170 added 5 commits May 13, 2020 10:43
define __PROGRAM_START so we use own startup as AD had it defined, this fixes the conflicts with
CMSIS_5 update (they introduced low level init).
Don't use CMSIS low level startup
Don't use CMSIS low level startup
We need a linker script as it was. As files update in the future, should be compatible
with newer CMSIS core.
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 13, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented May 13, 2020

Test run: FAILED

Summary: 1 of 3 test jobs failed
Build number : 7
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@mergify mergify bot added needs: work and removed needs: CI labels May 13, 2020
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 13, 2020

ci restarted

@mbed-ci
Copy link

mbed-ci commented May 13, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 8
Build artifacts

Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

LGTM

@0xc0170 0xc0170 merged commit e371db4 into ARMmbed:master May 14, 2020
@0xc0170 0xc0170 deleted the feature_CMSIS_5_b5f0603d6 branch May 14, 2020 11:21
@mergify mergify bot removed the ready for merge label May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing definition of __SXTB16_RORn in cmsis_gcc.h
5 participants