Skip to content

build tools: fix target toolchain #12995

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 9 commits into from
May 19, 2020
Merged

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented May 19, 2020

Summary of changes

The latest merge introduced a bug. We assumed all targets should be built with ARM and GCC ARM but it's not true. Thus tests are failing now.

This PR introduces two fixes:

  • return previous version of toolchains supported (same functionality as previously)
  • revert baremetal for all targets (not yet ready)

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

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

Reviewers

@evedon @jamesbeyond


0xc0170 added 4 commits May 19, 2020 10:23
Revert back to the toolchain function. Although it should be refactored (return just list of toolchains from a target).
This reverts commit 9b4cddd.

Not all targets can be enabled, will need more work.
It might be a bug as it should work.
@@ -424,7 +424,8 @@ def get_mbed_official_release(version, profile=None):
tuple(
[
TARGET_MAP[target].name,
tuple(['ARM', 'GCC_ARM'])
tuple(transform_release_toolchains(
Copy link
Contributor

@jamesbeyond jamesbeyond May 19, 2020

Choose a reason for hiding this comment

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

since it calling the function transform_release_toolchains may I suggest please change
https://github.com/ARMmbed/mbed-os/blob/master/tools/build_api.py#L388
and
https://github.com/ARMmbed/mbed-os/blob/master/tools/build_api.py#L398
to if version in [ '5' , '6' ]
otherwise if passing '6' this API will not work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do we pass '6' ? It's not defined anywhere in the tools currently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the PR

Copy link
Contributor

Choose a reason for hiding this comment

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

This is what I am not sure, it is not defined, but it is a valid use case

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why we are introducing "6"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1, I would not introduce 6 in the tools . Let's stay with what we are . If we introduce 6, it should be with updated tools (not the current form). As adding 6, we are creating new flow (in reality, its the same as 5 here so not needed).

I would revert that 6 addition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I got it ready locally, can push :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

jamesbeyond
jamesbeyond previously approved these changes May 19, 2020
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 19, 2020

Investigating the TypeError there

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 19, 2020

CI restarted

Fixed, silly typo.

@mergify mergify bot dismissed jamesbeyond’s stale review May 19, 2020 11:44

Pull request has been modified.

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 19, 2020

I also fixed a version ('6' should be everywhere now)

@0xc0170 0xc0170 force-pushed the fix_target_toolchain branch from fd03697 to bcfa1f9 Compare May 19, 2020 12:05
@mbed-ci
Copy link

mbed-ci commented May 19, 2020

Test run: FAILED

Summary: 2 of 3 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 19, 2020

CI restarted

@ciarmcom ciarmcom requested review from evedon, jamesbeyond and a team May 19, 2020 13:00
@ciarmcom
Copy link
Member

@0xc0170, thank you for your changes.
@evedon @jamesbeyond @ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

@mbed-ci
Copy link

mbed-ci commented May 19, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_dynamic-memory-usage

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 19, 2020

CI restarted

@mergify mergify bot added needs: work and removed needs: CI labels May 19, 2020
@mbed-ci
Copy link

mbed-ci commented May 19, 2020

Test run: FAILED

Summary: 2 of 3 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 19, 2020

[Fatal Error] border_router_main.cpp@11,10: 'sal-stack-nanostack-slip/Slip.h' file not found
[ERROR] ./source/border_router_main.cpp:11:10: fatal error: 'sal-stack-nanostack-slip/Slip.h' file not found
#include "sal-stack-nanostack-slip/Slip.h"

This is in the logs, checking why suddenly it broke

@mbed-ci
Copy link

mbed-ci commented May 19, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 5
Build artifacts

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 19, 2020

Looks like this is ready to land.

@evedon @jamesbeyond Please review if the current form is what we agreed

Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

LGTM

@0xc0170 0xc0170 merged commit 9a8c9e2 into ARMmbed:master May 19, 2020
@mergify mergify bot removed the ready for merge label May 19, 2020
@jeromecoutant
Copy link
Collaborator

Hi
Why
"supported_application_profiles": ["rtos", "bare-metal"]
has not been added to "MCU_STM32" ?

@@ -1497,7 +1499,10 @@
"MPU"
],
"bootloader_supported": true,
"device_name": "STM32F303RE"
"device_name": "STM32F303RE",
"supported_application_profiles": [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove these lines and add in "MCU_STM32"

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @evedon, are all the STM32 MCUs able to be used in bare-metal mode?
I believe we haven't fully tested all of them? is there anything blocking them to be used in baremetal mode?

@@ -1648,7 +1653,10 @@
"MPU"
],
"device_name": "STM32F411RE",
"bootloader_supported": true
"bootloader_supported": true,
"supported_application_profiles": [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove these lines and add in "MCU_STM32"

@@ -2000,7 +2008,10 @@
"bootloader_supported": true,
"overrides": {
"network-default-interface-type": "ETHERNET"
}
},
"supported_application_profiles": [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove these lines and add in "MCU_STM32"

@@ -3474,7 +3485,10 @@
"BLE"
],
"device_name": "STM32L475VG",
"bootloader_supported": true
"bootloader_supported": true,
"supported_application_profiles": [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove these lines and add in "MCU_STM32"

@jamesbeyond
Copy link
Contributor

Hi
Why
"supported_application_profiles": ["rtos", "bare-metal"]
has not been added to "MCU_STM32" ?

one issue I can think of is in bare-metal mode we are supporting small lib (nanolib for GCC, microlib for ARMC6), those small lib will require the mbed 2-region memory model. not all the STM MCUs been ported to this 2-region memory model. e.g:
https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/device/TOOLCHAIN_ARM/stm32l486xx.sct
and
https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/device/TOOLCHAIN_ARM/stm32l496xx.sct

@jeromecoutant
Copy link
Collaborator

I agree, I got patches :-)
First push has been done with #12992

@0xc0170 0xc0170 deleted the fix_target_toolchain branch May 20, 2020 14:15
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