Skip to content

Disable Cortex-A in tooling for better error messages #4377

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 2 commits into from
May 31, 2017

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented May 23, 2017

Description

This PR will disable building of Cortex-A targets for the mean time. The tools
bits that disable Cortex-A are (currently) in a single commit that can be
reverted to re-enable Cortex-A support.

Tests

  • /morph test (ensure that Cortex-A is not building)
  • /morph export-build (ensure that Cortex-A is not building)

…ted in CMSIS5/RTX2"

This partially reverts commit e535493.
tools/options.py Outdated
@@ -121,3 +121,12 @@ def extract_profile(parser, options, toolchain, fallback="develop"):
" supported by profile {}").format(toolchain,
filename))
return profile

def not_disabled(parser, mcu):
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks like generic function but semes like only for cortex-a, should it be an arugment and related to MCU (mcu in the name?) . Why is it negative by default - not_disabled?

should it be is_core_disabled(parser, core, mcu) ? However this would make more work to get the url link work with the release one. If no, at least is_cortex_a_disabled or something ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's named that way so that I can use assert in front of it. Even if asserting "not_disabled" is not actually what happens, it documents the intent well. The intent being Fail now, hard or keep going.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, is_cortex_a_disabled implies that I'm checking if all cortex-A CPUs are disabled, not this particular CPU.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would vote for is_disabled, usually logic is positive is_active, is_disabled, is_whatever. No strong preference, I care more about the name than logic being negative.

Also, is_cortex_a_disabled implies that I'm checking if all cortex-A CPUs are disabled, not this particular CPU.

The function should have be more specific than generic name, either provide MCU parameter or something more to make it generic or change the function name specify what the function does is_rza1h_disabled() (the file for the implementation is options.py that is for anything).

these are minor things though

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 would vote for is_disabled,

The function has to either pass or fail an entire build. I'm willing to go for is_enabled

is_rza1h_disabled()

The function does not test for this. the function test for all Cortex-A support. As it stands, the RZ_A1H is the only cortex-A part we have. Further, it is generic: it tests any mcu you give it to verify that the MCU is enabled in the current release. If we disabled cortex-M7, we would extend this function to disable all cortex-M7 builds as well.

I propose: mcu_is_enabled

@TomoYamanaka
Copy link
Contributor

Thank you for this PR.

I can not confirm from the error message whether there is Cortex-A(RZ/A1H etc) in the future release.
Therefore, I would like to add the mention such as below to the error message.
"Cortex-A(RZ/A1H etc) will be supported in mbed OS 5.6."

RZ_A1H example:

  • Before
    To use the RZ_A1H, please checkout the mbed OS 5.4 release branch.
    See (Link snip) for more information
  • After
    RZ/A1H will be supported in the next release(mbed OS 5.6) again.
    To use the RZ_A1H, please checkout the mbed OS 5.4 release branch.
    See (Link snip) for more information

@theotherjimmy
Copy link
Contributor Author

@TomoYamanaka Thanks for the text update. I'll update the commit to use that text.

@theotherjimmy theotherjimmy force-pushed the disable-cortex-A branch 2 times, most recently from 22df496 to 67ca2c4 Compare May 25, 2017 20:19
@theotherjimmy
Copy link
Contributor Author

Updated.

@TomoYamanaka
Copy link
Contributor

@theotherjimmy

Thanks!

@0xc0170
Copy link
Contributor

0xc0170 commented May 26, 2017

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 357

Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented May 26, 2017

The build above seems to be OK , no errors.

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 360

Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented May 30, 2017

@theotherjimmy please look at failures. looks like test tries to execute anyway for these cortex-a targets?

@theotherjimmy
Copy link
Contributor Author

Yeah, I'm going to have to add some more code!

@theotherjimmy
Copy link
Contributor Author

I squashed the two commits, so that we can revert all of the tools changes as one commit for 5.6

Disable Cortex-A in compile supported matrix
Disable Cortex-A in export supported matrix
@sg-
Copy link
Contributor

sg- commented May 30, 2017

/morph test

@sg-
Copy link
Contributor

sg- commented May 30, 2017

/morph export-build

@sg- sg- added needs: CI and removed needs: work labels May 30, 2017
@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 373

All builds and test passed!

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 46

All exports and builds passed!

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