Skip to content

Add new target future sequana PSA #8745

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 10 commits into from
Dec 6, 2018
Merged

Add new target future sequana PSA #8745

merged 10 commits into from
Dec 6, 2018

Conversation

orenc17
Copy link
Contributor

@orenc17 orenc17 commented Nov 14, 2018

Description

  • Adds FUTURE_SEQUANA_PSA & FUTURE_SEQUANA_M0_PSA targets.
  • Modify original linker scripts to be compatible with bootloader and PSA.
  • Add memory protection.
  • Modify original post-build step to allow link with PSA binaries
  • Config kvstore for ITS on FUTURE_SEQUANA_PSA

Note to maintainers

This PR adds memory protection to the platform but it is disabled until some performance bugs will be fixed

Dependencies

#8667
#8680
#8730
#8744

Requires #8935
The actual changes of this PR are in commit 1de12db6690d727304893eed26dcff6e72ae6650

Pull request type

[ ] Fix
[ ] Refactor
[X] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@0xc0170 0xc0170 requested review from a team November 15, 2018 14:34
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 15, 2018

Passed, 112 files (+54 files)

Can you please fix the style issues?

[ERROR] ./rtos/TARGET_CORTEX/mbed_rtos_rtx.c:25:10: fatal error: spm_init.h: No such file or directory - Travis error

@mikisch81
Copy link
Contributor

Passed, 112 files (+54 files)

Can you please fix the style issues?

[ERROR] ./rtos/TARGET_CORTEX/mbed_rtos_rtx.c:25:10: fatal error: spm_init.h: No such file or directory - Travis error

Travis error fixed, what astyle issue is there? the astyle tests pass.

@cmonr
Copy link
Contributor

cmonr commented Nov 15, 2018

@mikisch81 It's not obvious yet because we haven't enabled the failing of the test yet, but if you go to the travis job, the +54 means 54 new files have astyle issues.

Check the console for more details: https://travis-ci.org/ARMmbed/mbed-os/jobs/455670910

@MarceloSalazar
Copy link

MarceloSalazar commented Nov 15, 2018

Question: Why would you create a new target FUTURE_SEQUANA_PSA instead of a PSA configuration for FUTURE_SEQUANA, which delelopers could enable using a mbed_app.json?

I understand developers won't be able to use the existing FUTURE_SEQUANA target with this feature on the Online compiler.

@0xc0170 @cmonr can you clarify this please?

@alzix
Copy link
Contributor

alzix commented Nov 16, 2018

@MarceloSalazar,
The target we added is conceptually different from FUTURE_SEQUANA. Applying our changes to existing target would be too invasive. We did not want to cancel/modify the default FUTURE_SEQUANA target.
Thinking of PSA as of an optional feature is wrong. It is a property if a target.
Since we did not have PSA infrastructure at the time FUTURE_SEQUANA was ported. We end up with a duplicate target.
I assume that future new targets ports on PSA compliant targets will be done only for the PSA variant.

********************************************************************************
* \copyright
*
* � 2018, Cypress Semiconductor Corporation
Copy link
Contributor

Choose a reason for hiding this comment

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

What are this strange / special characters on Cypress license header? Are we ok with it?
CC @alzix

Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be cleaned (characters fixed) ?

Also, what license is this? Should be apache 2.0 or known permissive license. Other drivers from Cypress are Apache 2.0

Copy link
Contributor

@danny4478 danny4478 left a comment

Choose a reason for hiding this comment

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

LGTM

  • See one comment about strange character in Cypress license header...
  • Did not review Cypress code...

@alzix
Copy link
Contributor

alzix commented Nov 19, 2018

This target does not have memory protection enabled due to issue with native flash drivers.
Memory protection will be applied in a separate PR. We are working with the vendor on finding a solution/workaround that will allow us to enable memory protection.

Without memory protection this target can not be considered production ready PSA target, and mainly intended for kicking off the integration work.

@mohammad1603 mohammad1603 mentioned this pull request Nov 21, 2018
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 22, 2018

tools/config/init.py

Note there is a conflict now

@mikisch81
Copy link
Contributor

tools/config/init.py

Note there is a conflict now

@0xc0170 yes we are aware, we are waiting for any of the prerequisites to be merged first (especially #8667).

@bulislaw
Copy link
Member

What's the difference between sequana and PSoC6? Is FUTURE_SEQUANA going to be used for non-PSA and FUTURE_SEQUANA_PSA for PSA? If not what's the deprecation strategy?

@alzix
Copy link
Contributor

alzix commented Nov 23, 2018

@bulislaw,

What's the difference between sequana and PSoC6?

32-bit Arm® Cortex®-M4 PSoC® 6 - is the SOC name from Cypress
FUTURE_SEQUANA is a development kit provided by Future Electronics.
There are also other kits with same SOC:

  • PSoC 6 BLE Pioneer Kit - very similar to FUTURE_SEQUANA but still have some minor pin mappings. Not directly supported by mbed-os, but compatible with FUTURE_SEQUANA
  • PSoC® 6 WiFi-BT Pioneer Kit - currently not supported be mbed-os as it uses different revision of PSoC6 SOC

Is FUTURE_SEQUANA going to be used for non-PSA and FUTURE_SEQUANA_PSA for PSA? If not what's the deprecation strategy?

No deprecation is expected. Bith targets are valid and serve different purposes.

@bulislaw
Copy link
Member

bulislaw commented Nov 26, 2018

All the PRs need to be engineering ready (marked as "needs: CI") by the end of the day (Austin time). Otherwise it won't make 5.11 and will need to come in the next release (5.12 for features, 5.11.1 for fixes and new platforms).

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 6, 2018

@orenc17 Every prebuilt image should have a license (in this case PBL), the license file and Readme describing what is it + license description and what tools were used to compiled it (because of how toolchains versions can break things). Can you please add and we will trigger CI asap

An example of readme: targets/TARGET_RDA/TARGET_UNO_91H/lib/README.md

Why they were added (what was an issue with CI update) ?

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

License looks good , thanks

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 6, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 6, 2018

Test run: FAILED

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

Failed test jobs:

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

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 6, 2018

Please review artifacts, this is the error from the logs [Error] psa_crypto_partition.c@20,46: [Pe260]: explicit type is missing ("int" assumed)

@orenc17
Copy link
Contributor Author

orenc17 commented Dec 6, 2018

@0xc0170 run it again, we needed #8935

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 6, 2018

We should first check it, let me try to reproduce locally

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 6, 2018

CI restarted

@mbed-ci
Copy link

mbed-ci commented Dec 6, 2018

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 8
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

@cmonr
Copy link
Contributor

cmonr commented Dec 6, 2018

@orenc17 This one is a bit interesting.

Blinky failed to link when compiling with the gnuarmeclipse ide.

You can find the failure logs here: http://mbed-os-ci.s3-website-eu-west-1.amazonaws.com/?prefix=jenkins-ci/artifacts/exporter/8745/8/gnuarmeclipse/FAIL/FUTURE_SEQUANA_M0_PSA/

(gnuarmeclipse is very verbose, so the CI uploads an archive instead of just the .log file)

The specific failure can be seen below:
12:57:06 [FUTURE_SEQUANA_M0_PSA:gnuarmeclipse] ./main.o: In function `main': 12:57:06 [FUTURE_SEQUANA_M0_PSA:gnuarmeclipse] /builds/ws/mbed-os-ci_exporter-gnuarmeclipse/FUTURE_SEQUANA_M0_PSA_gnuarmeclipse_890/examples/mbed-os-example-blinky/Debug/../main.cpp:13: multiple definition of `main' 12:57:06 [FUTURE_SEQUANA_M0_PSA:gnuarmeclipse] ./mbed-os/components/TARGET_PSA/spm/COMPONENT_SPE/spm_main.o:/builds/ws/mbed-os-ci_exporter-gnuarmeclipse/FUTURE_SEQUANA_M0_PSA_gnuarmeclipse_890/examples/mbed-os-example-blinky/Debug/../mbed-os/components/TARGET_PSA/spm/COMPONENT_SPE/spm_main.c:24: first defined here 12:57:06 [FUTURE_SEQUANA_M0_PSA:gnuarmeclipse] collect2: error: ld returned 1 exit status 12:57:06 [FUTURE_SEQUANA_M0_PSA:gnuarmeclipse] makefile:254: recipe for target 'mbed-os-example-blinky.elf' failed 12:57:06 [FUTURE_SEQUANA_M0_PSA:gnuarmeclipse] make: *** [mbed-os-example-blinky.elf] Error 1 12:57:06 [FUTURE_SEQUANA_M0_PSA:gnuarmeclipse] 12:57:06 [FUTURE_SEQUANA_M0_PSA:gnuarmeclipse] 12:55:45 Build Finished (took 24s.535ms)

@orenc17
Copy link
Contributor Author

orenc17 commented Dec 6, 2018

@cmonr i'm working on a fix

@orenc17
Copy link
Contributor Author

orenc17 commented Dec 6, 2018

@cmonr Done

@cmonr
Copy link
Contributor

cmonr commented Dec 6, 2018

@orenc17 I'm wondering if c4c21d2 is the right way to fix this.

Doesn't this mean that PSA secure targets can no longer be compiled?

@orenc17
Copy link
Contributor Author

orenc17 commented Dec 6, 2018

@cmonr No, it means that the secure targets are not release devices
a normal user is not expected to build the secure image, he/she should use the prebuilt one

@cmonr
Copy link
Contributor

cmonr commented Dec 6, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 6, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 9
Build artifacts

@cmonr cmonr merged commit 78d6018 into ARMmbed:master Dec 6, 2018
@cmonr cmonr removed the needs: CI label Dec 6, 2018
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.