Skip to content

Adding STM32L071xx target #13509

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 6 commits into from
Sep 2, 2020
Merged

Adding STM32L071xx target #13509

merged 6 commits into from
Sep 2, 2020

Conversation

andreagilardoni
Copy link
Contributor

Adding STM32L071CXCTX as a generic target to be extended.
This addition required to fix some issues on stml0 library

Summary of changes

Added a new generic target for STM32L071CXCTX based boards. If you want to use this you have to create a custom target that inherits from this target.

Impact of changes

Migration actions required

Documentation

The changes performed are on the following files/directories:

  • targets/TARGET_STM/TARGET_STM32L0/device/stm32l0xx_hal_conf.h: some HAL features had to be disabled since the MCU is not using them
  • targets/TARGET_STM/TARGET_STM32L0/device/stm32l0xx_hal_tsc.h: changed the order of preprocessor directives to for extern "C" { ... } definition, since if TSC was disabled the curly bracket (}) was missing causing all sort of problems
  • targets/targets.json: added the target definition
  • targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L071CXCTX/: added the target definition files

I performed the changes on mbed-os-6.2.0, the next step is to adapt the target definition for mbed-os-6.2.1, where STM related target definitions have been improved following the various STM32 mcu families.


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

I still have not received yet the board using the proper MCU, I performed the unit test with the following command:

mbed test -m TEST -t GCC_ARM -v --test-config mbed-os/TESTS/configs/baremetal.json

I was not able to test against all the available compilers, since I only have the GCC_ARM, but I followed the STM guidelines.

The test were performed by creating a dummy custom test target. The required files are here attached: tests.zip, test.tar.gz.

The test result log are the following: test_results.log


Reviewers


@mergify
Copy link

mergify bot commented Aug 28, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@mergify mergify bot added the needs: work label Aug 28, 2020
@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Aug 28, 2020
@ciarmcom ciarmcom requested a review from a team August 28, 2020 14:30
@ciarmcom
Copy link
Member

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

@andreagilardoni
Copy link
Contributor Author

andreagilardoni commented Aug 28, 2020

How can I make this PR on mbed-os-6.2.0?

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.

Very good starting point!
Thx

@jeromecoutant
Copy link
Collaborator

Maybe, you could update PR title with something "STM32L071 xxx" ?

@andreagilardoni andreagilardoni changed the title Adding a new target Adding STM32L071xx target Aug 28, 2020
@andreagilardoni
Copy link
Contributor Author

thanks @jeromecoutant, I forgot to update the files for all the toolchains that are not GCC.

I am not an expert of stm32 mcu families and I don't know the differences between all the mcus under stm32l071xx, is it safe to assume that this target could be used for all the mcus in this family?

Adding STM32L071CXCTX as a generic target to be extended.
This addition required to fix some issues on stml0 library
@mergify mergify bot removed the needs: review label Aug 28, 2020
@andreagilardoni
Copy link
Contributor Author

I did a rebase to the master branch and fixed everything you listed and renamed the target MCU_STM32L071xx, I hope that this is safe to use with all the mcu in that family.

@jeromecoutant tell me if I am still missing something.

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.

For my information, do you an information webpage for your custom target ?
Thx

@jeromecoutant
Copy link
Collaborator

@ARMmbed/team-st-mcd

@andreagilardoni
Copy link
Contributor Author

The custom target I am creating out of this MCU family is not planned to be publicly available right now, since it is intended for internal usage

@mergify mergify bot dismissed 0xc0170’s stale review September 1, 2020 08:11

Pull request has been modified.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 1, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Sep 1, 2020

Jenkins CI Test : ✔️ SUCCESS

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

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-ARM ✔️
jenkins-ci/mbed-os-ci_build-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

@0xc0170 0xc0170 merged commit 29f54fe into ARMmbed:master Sep 2, 2020
@mergify mergify bot removed the ready for merge label Sep 2, 2020
@andreagilardoni andreagilardoni deleted the new_target_STM32L071CXCTX branch September 2, 2020 09:14
@mbedmain mbedmain removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Sep 16, 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.

6 participants