Skip to content

Correct the floating options for Cortex-M7 and Cortex-M4 #9477

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

Closed
wants to merge 5 commits into from

Conversation

deepikabhavnani
Copy link

@deepikabhavnani deepikabhavnani commented Jan 23, 2019

Description

As per the IAR Development guide, below options for CPU are valid and separate --fpu is not needed.

  1. Cortex-M4
  2. Cortex-M4F
  3. Cortex-M7
  4. Cortex-M7.fp.dp (floating-point unit with support for double precision)
  5. Cortex-M7.fp.sp (floating-point unit with support for single precision)

Commit for this PR is afb559b

Dependent on : #9431

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@kjbracey-arm

deepikabhavnani added 4 commits January 18, 2019 10:56
Cortex-M23 / Cortex-M33 CPU settings for baseline and mainline
profile (with optional floating and dsp options) updated.
As per the IAR Development guide, below options for CPU are valid

1. Cortex-M33
2. Cortex-M33.no_dsp (core without integer DSP extension)
3. Cortex-M33.fp (floating-point unit with support for single precision)
4. Cortex-M33.no_se (core without support for TrustZone)
As per the IAR Development guide, below options for CPU are valid

1. Cortex-M4
2. Cortex-M4F
3. Cortex-M7
4. Cortex-M7.fp.dp (floating-point unit with support for double precision)
5. Cortex-M7.fp.sp (floating-point unit with support for single precision)
@ciarmcom
Copy link
Member

@deepikabhavnani, thank you for your changes.
@kjbracey-arm @ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

#endif



Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this removed?

Copy link
Author

Choose a reason for hiding this comment

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

they are dummy defines in code, may be old trial code

Copy link
Contributor

@SenRamakri SenRamakri Jan 23, 2019

Choose a reason for hiding this comment

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

I see, but it happens to be in target code which we are modifying/removing, hope its ok with Nuvoton.

Copy link
Author

Choose a reason for hiding this comment

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

Actual PR for this change is #9431
Please note: Commit for this PR is afb559b
Dependent on : #9431

elif target.core == "Cortex-M7F":
cpuchoice = "Cortex-M7.fp.sp"
elif target.core.startswith("Cortex-M33FD"):
cpuchoice = "Cortex-M33.fp"
Copy link
Contributor

@SenRamakri SenRamakri Jan 23, 2019

Choose a reason for hiding this comment

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

Wonder why this is not fp.dp (double-prec) as in M7? Is this correct, please double-check?

Copy link
Author

Choose a reason for hiding this comment

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

D in case of Cortex-M33 is DSP and not double floating point.

Copy link
Contributor

@kjbracey kjbracey Jan 24, 2019

Choose a reason for hiding this comment

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

Which is a very bad idea, as I believe I've previously commented. Why are we making up non-standard inconsistent naming?

If you really want to have a single-letter name, "M33FE" would make more sense, as "E" is the letter historically used by ARM to represent the DSP Extensions. (Although that makes me think of the ARM7500FE where it meant EDO RAM, so maybe reverse to M33EF - putting the DSP extensions closer to the core than the FP unit is also logical).

But I would really rather go with what all the tools are consistently doing - using the "no_fp" and "no_dsp" suffixes. We're in the odd situation where all 3 toolchains agree on that, and Mbed OS is being different. (Okay, they don't totally agree on polarity of the FP flag)

Copy link
Author

Choose a reason for hiding this comment

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

While performing some changes recently, I see why Mbed OS used its own letters, as we do not have consistency among all toolchaina and even between assembler and compilers. Flags are +nodsp / .no_dsp / .dsp / +dsp

Copy link
Author

Choose a reason for hiding this comment

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

single-letter name, "M33FE"

Yes can change this now to some other letter for DSP, as no target is added.
@mbed-os-tools - thoughts on this please

Copy link
Contributor

Choose a reason for hiding this comment

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

Please make the core names consistent with the ARM historical single letter abbreviations; use E for DSP.

Copy link
Author

Choose a reason for hiding this comment

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

@theotherjimmy @kjbracey-arm - One more Query, for DSP and FPU. Should it be F-Eor FE
Floating point - F and FD looks fine, but with addition of E, FDE will be confusing. And will be allow any order here? like FD-E or E-FD?

@deepikabhavnani deepikabhavnani requested a review from a team January 23, 2019 20:24
@deepikabhavnani deepikabhavnani deleted the iar_fp branch January 25, 2019 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants