Skip to content

Conversation

@0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Feb 9, 2021

Summary of changes

Follow CMake Mbed OS convention for target naming. Using mbed- prefix and - as separators along with the lower case characters. This aligns the codebase. We are porting more targets and they will follow the same naming scheme to avoid conflicts (was it xE or XE or xe and similar).

The main logic is that tools/targets.json stays, we only translate the names coming from tools to CMake targets keeping our naming scheme. Nothing else required.

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

[x] 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


Using lowercase with dashes for targets with mbed- prefix
Follow the naming for other CMake targets, using prefix mbed-, lower case with dashes
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.

Many wrong file names

stm32f0xx_HAL_Driver/mbed-stm32f0xx_ll_usart.c
stm32f0xx_HAL_Driver/mbed-stm32f0xx_ll_usb.c
stm32f0xx_HAL_Driver/mbed-stm32f0xx_ll_utils.c
system_mbed-stm32f0xx.c
Copy link
Collaborator

Choose a reason for hiding this comment

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

wrong file

STM32F0xx_HAL_Driver/stm32f0xx_ll_usb.c
STM32F0xx_HAL_Driver/stm32f0xx_ll_utils.c
system_stm32f0xx.c
stm32f0xx_HAL_Driver/Legacy/stm32f0xx_hal_can_legacy.c
Copy link
Collaborator

Choose a reason for hiding this comment

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

Real name is with upper case : STM32F0xx_HAL_Driver ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe it was a search and replace oversight.
Thanks for pointing that out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, fixing now

if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f030x8.S)
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32f030x8.ld)
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_mbed-stm32f030x8.S)
Copy link
Collaborator

Choose a reason for hiding this comment

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

wrong file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixing now

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Feb 9, 2021
@ciarmcom
Copy link
Member

ciarmcom commented Feb 9, 2021

@0xc0170, thank you for your changes.
@ARMmbed/team-st-mcd @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested review from a team February 9, 2021 17:30
STM32F0xx_HAL_Driver/stm32f0xx_ll_usb.c
STM32F0xx_HAL_Driver/stm32f0xx_ll_utils.c
system_stm32f0xx.c
stm32f0xx_HAL_Driver/Legacy/stm32f0xx_hal_can_legacy.c
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe it was a search and replace oversight.
Thanks for pointing that out.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Feb 10, 2021

I fixed the errors with replacing the text, my initial regex was wrong :-) Please review again

@0xc0170
Copy link
Contributor Author

0xc0170 commented Feb 10, 2021

I added a readme section to document what we follow in CMake targets

@0xc0170 0xc0170 force-pushed the cmake-fix-naming-targets branch from d6e2495 to a6915af Compare February 10, 2021 09:43
@0xc0170 0xc0170 requested a review from hugueskamba February 10, 2021 09:57
add_library(STM32L4xxLegacyHALDriver INTERFACE)
target_include_directories(STM32L4xxLegacyHALDriver

add_library(mbed-stm32l4xxlegacy-hal-driver INTERFACE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
add_library(mbed-stm32l4xxlegacy-hal-driver INTERFACE)
add_library(mbed-stm32l4xx-legacy-hal-driver INTERFACE)

endif()

add_library(XDOT_L151CC INTERFACE)
add_library(xdot-l151cc INTERFACE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
add_library(xdot-l151cc INTERFACE)
add_library(mbed-xdot-l151cc INTERFACE)

# SPDX-License-Identifier: Apache-2.0

add_library(NUCLEO_F303RE INTERFACE)
add_library(nucleo-f303re INTERFACE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
add_library(nucleo-f303re INTERFACE)
add_library(mbed-nucleo-f303re INTERFACE)

# SPDX-License-Identifier: Apache-2.0

add_library(WIO_3G INTERFACE)
add_library(wio-3g INTERFACE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
add_library(wio-3g INTERFACE)
add_library(mbed-wio-3g INTERFACE)

# SPDX-License-Identifier: Apache-2.0

add_library(WIO_BG96 INTERFACE)
add_library(wio-bg96 INTERFACE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
add_library(wio-bg96 INTERFACE)
add_library(mbed-wio-bg96 INTERFACE)

# SPDX-License-Identifier: Apache-2.0

add_library(SDP_K1 INTERFACE)
add_library(sdp-k1 INTERFACE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
add_library(sdp-k1 INTERFACE)
add_library(mbed-sdp-k1 INTERFACE)

endif()

add_library(STM32H7A3xIQ INTERFACE)
add_library(mbed-stm32h7A3xiq INTERFACE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
add_library(mbed-stm32h7A3xiq INTERFACE)
add_library(mbed-stm32h7a3xiq INTERFACE)

@mergify mergify bot dismissed hugueskamba’s stale review February 10, 2021 12:15

Pull request has been modified.

Co-authored-by: Hugues Kamba <[email protected]>
@mergify mergify bot removed the needs: work label Feb 10, 2021
@mbed-ci
Copy link

mbed-ci commented Feb 10, 2021

Jenkins CI Test : ❌ FAILED

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_cmake-example-ARM
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM
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 ✔️

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.

Issue with:

  • ADV_WISE_1570
  • DISCO_L475VG_IOT01A
  • DISCO_H747I
  • DISCO_L4R9I
  • DISCO_L562QE
  • FF1705_L151CC
  • MOTE_L152RC
  • MTS_DRAGONFLY_L471QG
  • NUCLEO_F091RC
  • NUCLEO_F103RB
  • NUCLEO_F207ZG
  • NUCLEO_F303K8

@0xc0170
Copy link
Contributor Author

0xc0170 commented Feb 10, 2021

Investigating failures now

@0xc0170
Copy link
Contributor Author

0xc0170 commented Feb 10, 2021

ADV_WISE_1570
DISCO_L475VG_IOT01A
DISCO_H747I
DISCO_L4R9I
DISCO_L562QE
FF1705_L151CC
MOTE_L152RC
MTS_DRAGONFLY_L471QG
NUCLEO_F091RC
NUCLEO_F103RB
NUCLEO_F207ZG
NUCLEO_F303K8

I fixed all of these, found the typos in the targets. Tested randomly some locally to verify the fixes. Some were due to missing CMake targets after the last refactor.

@mergify mergify bot dismissed hugueskamba’s stale review February 10, 2021 15:33

Pull request has been modified.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Feb 10, 2021

CI started

@0xc0170
Copy link
Contributor Author

0xc0170 commented Feb 10, 2021

We will need also #14266, will come in after this one if all agree.

@mbed-ci
Copy link

mbed-ci commented Feb 10, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 2 | 🔒 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-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test

@mergify mergify bot added needs: work and removed needs: CI labels Feb 10, 2021
@0xc0170
Copy link
Contributor Author

0xc0170 commented Feb 10, 2021

Test failures not related, sync error for k64f, restarting

@mbed-ci
Copy link

mbed-ci commented Feb 10, 2021

Jenkins CI Test : ✔️ SUCCESS

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

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
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-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-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 0xc0170 merged commit 4236db4 into ARMmbed:master Feb 11, 2021
@0xc0170 0xc0170 deleted the cmake-fix-naming-targets branch February 11, 2021 08:02
@mergify mergify bot removed the ready for merge label Feb 11, 2021
@mbedmain mbedmain added release-version: 6.8.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Feb 16, 2021
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