Skip to content
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

Add proper support for NUCLEO-H723ZG. #15343

Merged
merged 3 commits into from Nov 16, 2022

Conversation

daniel-starke
Copy link
Contributor

Signed-off-by: Daniel Starke daniel-email@gmx.net

Summary of changes

  • add board specific EMAC setup to connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7
    • stm32h7_eth_init.c was derived from the NUCLEO-H743ZI2 code whilst comparing to the output of STM32CubeIDE
  • complete board specific code in targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H723xG
    • PeripheralPins.c and PinNames.h were created by targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py
    • ST ZIO connector pins in PinNames.h have been adapted from NUCLEO-H743ZI2
    • CONSOLE_TX and CONSOLE_RX have been interchanged in PinNames.h to match the actual board layout
    • startup_stm32h723xx.S was derived from startup_stm32h743xx.S
    • stm32h723xg.ld was completely rewritten to match the actual MCU including:
      • split heap support
      • SRAM2 and SRAM4 support - crash dump support - proper use of DTCM as stack
    • system_clock.c has been changed to support the maximal main clock speed of 550 MHz
  • fix handling of HS in FS mode for the target board in targets/TARGET_STM/USBPhy_STM32.cpp
  • add board definition to targets/targets.json and correct linker setup for the chip

Impact of changes

This change will allow the use of the NUCLEO-H723ZG board with Mbed.
May have some impact on USB HS in FS mode code on other STM32 targets.

Migration actions required

Probably not. The board was basically not usable until now.

Documentation

Subject to future work.


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

Only tested with PlatformIO.

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

Reviewers


- add board specific EMAC setup to connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7
  - stm32h7_eth_init.c was derived from the NUCLEO-H743ZI2 code whilst comparing to the output of STM32CubeIDE
- complete board specific code in targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H723xG
  - PeripheralPins.c and PinNames.h were created by targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py
  - ST ZIO connector pins in PinNames.h have been adapted from NUCLEO-H743ZI2
  - CONSOLE_TX and CONSOLE_RX have been interchanged in PinNames.h to match the actual board layout
  - startup_stm32h723xx.S was derived from startup_stm32h743xx.S
  - stm32h723xg.ld was completely rewritten to match the actual MCU including:
    - split heap support
    - SRAM2 and SRAM4 support
    - crash dump support
    - proper use of DTCM as stack
  - system_clock.c has been changed to support the maximal main clock speed of 550 MHz
- fix handling of HS in FS mode for the target board in targets/TARGET_STM/USBPhy_STM32.cpp
- add board definition to targets/targets.json and correct linker setup for the chip

Signed-off-by: Daniel Starke <daniel-email@gmx.net>
@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Oct 27, 2022
@ciarmcom ciarmcom requested a review from a team October 27, 2022 20:00
@ciarmcom
Copy link
Member

@daniel-starke, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@jeromecoutant
Copy link
Collaborator

Hi
Good job, I executed tests and it is 95% OK ! :-)

Maybe we can check the last issues?

  • I2C is not working
    I suggest to add this line in MCU_STM32H723xG definition in targets.json:
         "overrides": {
-            "system_power_supply": "PWR_LDO_SUPPLY"
+            "system_power_supply": "PWR_LDO_SUPPLY",
+            "i2c_timing_value_algo": true
         }
  • It seems tests around flash got issues....
$ mbed test -m NUCLEO_H723ZG -t GCC_ARM -v -n storage-*
$ mbed test -m NUCLEO_H723ZG -t GCC_ARM -v -n drivers-tests-tests-mbed_drivers-flashiap

stm32h723xg.ld was completely rewritten

Did you check ARM sct file ?

@daniel-starke
Copy link
Contributor Author

  • I2C is not working

I will add your suggested change.

  • It seems tests around flash got issues....

Do you have anything specific?

Did you check ARM sct file ?

No. I have only tested it with PlatformIO and this uses only GCC.

Add I2C configuration to MCU_STM32H723xG in target.json as suggested by @jeromecoutant.

Signed-off-by: Daniel Starke <daniel-email@gmx.net>
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2022

I set this needs: work (fixing the failing tests). Let us know once ready

@jeromecoutant thanks for running the tests

@daniel-starke
Copy link
Contributor Author

I set this needs: work (fixing the failing tests). Let us know once ready

I am afraid that someone else needs to take over here.
@0xc0170 What is the workflow in such case?

@jeromecoutant
Copy link
Collaborator

Hi
See 27d210a
I limited toolchain support to GCC only.
And I made several tests, I think this new target support is at the same level as other STM32H7 nucleo boards,
so I think this can be merged

Thx

Limit NUCLEO_H723ZG toolchain to GCC_ARM only.
This is the only toolchain this target has been tested with yet.

Signed-off-by: Daniel Starke <daniel-email@gmx.net>
@daniel-starke
Copy link
Contributor Author

I have added the limitation to GCC_ARM.
The order remains as it is MCUs -> NUCLEOs in targets.json.
I have also left the extra macro as it is. It doesn't hurt, is there also for the other NUCLEO boards and was there during my tests so I am sure it works this way.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 15, 2022

CI started

@mbed-ci
Copy link

mbed-ci commented Nov 15, 2022

Jenkins CI Test : ✔️ SUCCESS

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

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-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-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

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.

None yet

7 participants