Skip to content

Fixed float-abi linker option for CCES exporter. #7011

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 1 commit into from
May 29, 2018

Conversation

mharringADI
Copy link
Contributor

Description

This pull request fixes issue #6977. The CCES exporter was incorrectly specifying the float-abi linker option in the .json file. There was also an issue with handling the toolchain cpu options. The CCES exporter was supposed to remove the toolchain cpu options from the linker and compiler flags, but there was a bug preventing it from removing them.

Pull request type

[x] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@li-ho
Copy link

li-ho commented May 25, 2018

@mharringADI,

Those #'s in ADuCM4050.ld needs to be converted and removed by arm-none-eabi-cpp.

  • "arm-none-eabi-cpp" -E -P -DMBED_DEBUG -DMBED_TRAP_ERRORS_ENABLED=1 -Wl,-n -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group ../mbed-os/targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TOOLCHAIN_GCC_ARM/ADuCM4050.ld -o linker-script-debug.ld
  • "arm-none-eabi-cpp" -E -P -DNDEBUG -Wl,-n -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group ../mbed-os/targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TOOLCHAIN_GCC_ARM/ADuCM4050.ld -o linker-script-release.ld
  • "arm-none-eabi-cpp" -E -P -Wl,-n -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group ../mbed-os/targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TOOLCHAIN_GCC_ARM/ADuCM4050.ld -o linker-script-develop.ld

For Debug configuration, linker-script-debug.ld is chosen.

If ADuCM4050.ld is not converted, arm-none-eabi-g++ reports ignoring invalid character `#' in expression syntax error and does not generate elf or bin files

@andrew-mclachlan
Copy link

andrew-mclachlan commented May 25, 2018

Hi @li-ho - the issue regarding the LD script is a separate issue IMHO (#6954). This Pull Request is to set the float-abi option properly. Re: LD script issue, we need an update to CrossCore Embedded Studio (CCES) to handle the pre-processing. A JIRA issue has been logged internally and we'll work to update CCES for the next release.

@li-ho
Copy link

li-ho commented May 25, 2018

Hi @andrew-mclachlan, I only share some thoughts for your next PR. Please ignore me.

@0xc0170 0xc0170 requested review from a team May 25, 2018 09:38
flags.remove(flag)
for flag in flags_to_remove:
if flag in container:
container.remove(flag)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you split this rename into another commit?

Choose a reason for hiding this comment

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

For my own education, could you clarify why it should be a separate commit? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

This change (as far as I can tell) is unrelated. I would like to keep the changes related to the fix separate from format/naming changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The rename was added because the bug was caused by a confusion over what the two arguments referred to. By renaming the arguments it should avoid such a confusion in the future. You'll notice that there was more change here than just the rename; the container flags are now removed instead of the flags_to_remove flags

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Thanks for the explanation!

@0xc0170
Copy link
Contributor

0xc0170 commented May 28, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented May 28, 2018

Build : SUCCESS

Build number : 2178
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7011/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented May 28, 2018

@mbed-ci
Copy link

mbed-ci commented May 28, 2018

@theotherjimmy
Copy link
Contributor

@0xc0170 @cmonr Is there a reason to hold this up? Are we making a release candidate ATM?

@cmonr
Copy link
Contributor

cmonr commented May 29, 2018

It's coming in during gatekeeping, along with all of the other PRs that are marked "ready for merge".

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.

7 participants