Skip to content

Add Arduino Portenta H7 as target #13826

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 18 commits into from
Jan 5, 2021
Merged

Conversation

facchinm
Copy link
Contributor

@facchinm facchinm commented Oct 28, 2020

Summary of changes

This PR series introduces the support for Arduino Portenta H7 .
The patchset has been split into independent PRs for an easier review.
#13816
#13817
#13863

/cc @pennam @pnndra

Impact of changes

Except the standalone TARGET_PORTENTA* content, some other files have been touched (all of them in separate commits).

In particular, COMPONENT_WHD has been made generic (any mbed target implementing SERIAL_FC can now compile it) but this could impact PSOC6 targets which used to configure it via Cypress HAL.

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[x] 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)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[x] Tests / results supplied as part of this PR

Test results attached (this branch build over #13863 )

report-13-11.zip


Reviewers

@jeromecoutant
@romanjoe (for the WHD patches)


@facchinm facchinm marked this pull request as draft October 28, 2020 15:28
@ciarmcom ciarmcom requested review from jeromecoutant and a team October 28, 2020 15:30
@ciarmcom
Copy link
Member

@facchinm, thank you for your changes.
@jeromecoutant @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-core please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2020

As this is a draft, I'll mark it as do not merge until the update provided.

Please review Travis license failures.

@facchinm
Copy link
Contributor Author

facchinm commented Nov 2, 2020

Hi @0xc0170 ,
I pushed a fix ae8de08 for the licenses on Arduino original files.
However, scancode recognized other files to be missing the SPDX identifier or with a non permissive license.
These files are from ST / Cypress directly so I have no clue if they must remain as-is or if there's any other action I can do to make Travis pass.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2020

I've checked few, they are related to Permissive Binary License , scancode does not yet recognize it. I'll create an issue and we will fix it.

@jeromecoutant
Copy link
Collaborator

Hi
Maybe you could remove updates in COMPONENT_CYW43XXX from this PR?
and push a specific one for BLE with the BLE expert in review ?

/******************************************************************************/
/* PLL (clocked by HSE) used as System clock source */
/******************************************************************************/
uint8_t SetSysClock_PLL_HSE(uint8_t bypass, bool lowspeed)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add some comment about this 2 speed mode ?
Thx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will do

@facchinm facchinm force-pushed the portenta-mainline branch 4 times, most recently from 48758cf to 8038a6c Compare November 4, 2020 13:32
Copy link
Contributor

@ABOSTM ABOSTM left a comment

Choose a reason for hiding this comment

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

LGTM for dual core part

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

Will execute tests when I have HW!

@mbed-ci
Copy link

mbed-ci commented Jan 5, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 5 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 5, 2021

All green now. The fix for gpio is in the cI as well. is there anything else oustanding here or ready for the last round of review?

@facchinm
Copy link
Contributor Author

facchinm commented Jan 5, 2021

All green now. The fix for gpio is in the cI as well. is there anything else oustanding here or ready for the last round of review?

Ready! 💪

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 5, 2021

CI restarted

@mbed-ci
Copy link

mbed-ci commented Jan 5, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 6 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 5, 2021

I'll merge this now. Please send separate PR addressing the review coments.

@Flydroid
Copy link

Hi,
Is the support for Portenta H7 in mbed public? How can I compile an mbed program for the portenta h7?
In the targets.json the board has set the attribute public to false.

I'm running platformio and have added mbed as framework to the portenta_h7_m7.json board definiton (I know its a hack).
Platformio compiles fine a simple blink program and flashes it via DFU. However the program doesn't run (no blinking led) and no com port in windows.

Any advice appriciated!

@jeromecoutant
Copy link
Collaborator

Hi, Is the support for Portenta H7 in mbed public? How can I compile an mbed program for the portenta h7? In the targets.json the board has set the attribute public to false.

Yes, you can build an application for M7 core with PORTENTA_H7_M7, or M4 with PORTENTA_H7_M4:
https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L3478

@Flydroid
Copy link

Hi @jeromecoutant

I could now find the PORTENTA_H7_M7 in mbed studio and compile. Neither studio nor mbed online could detect the portenta while it is in bootloader mode, so flashing was not possible through mbed tools.

Interesting is also that https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L3478
sets mbed_rom_start": "0x08000000. while the arduino part sets it to 0x8040000 because the arduino bootloader sits at 0x08000000. See https://github.com/arduino/ArduinoCore-mbed/blob/master/variants/PORTENTA_H7_M7/linker_script.ld.
0x8040000 is also the adress where the binary is flashed through dfu.

I have verified that through adding a custom linker script in my platformio setup, where I then was able to get a simple blink code running, however some quirkyness remainded as no com port was available and the LEDs were not acting according to my code.

Should I make a new issue, rather than contiuing discoussion here?

@jeromecoutant
Copy link
Collaborator

Should I make a new issue, rather than contiuing discoussion here?

Yes, a new issue is always better

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.

10 participants