Skip to content

Add TARGET_LPC11U35_501 for Xadow M0 device #4252

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 1 commit into from
Closed

Add TARGET_LPC11U35_501 for Xadow M0 device #4252

wants to merge 1 commit into from

Conversation

adamgreen
Copy link
Contributor

targets/targets.json already added MCU_LPC11U35_501 as an extra label
but it didn't have LPC11U35_501 (without the MCU_ prefix). Both of
these target names are used as folder names to organize files
specific to this device. For example the LPC11U35.ld linker script used
by GCC_ARM for this target is located in a TARGET_LPC11U35_501 folder.

@0xc0170
Copy link
Contributor

0xc0170 commented May 2, 2017

Thanks for the fix. I checked, this platform is not in the linking test in travis (many of them are not)

cc @studavekar - to be aware of this

@0xc0170
Copy link
Contributor

0xc0170 commented May 2, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented May 2, 2017

Result: FAILURE

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

/morph test

Output

mbed Build Number: 119

Test failed!

@@ -151,7 +151,7 @@
"inherits": ["LPCTarget"],
"core": "Cortex-M0",
"default_toolchain": "uARM",
"extra_labels": ["NXP", "LPC11UXX", "MCU_LPC11U35_501"],
"extra_labels": ["NXP", "LPC11UXX", "MCU_LPC11U35_501", "LPC11U35_501"],
Copy link
Contributor

Choose a reason for hiding this comment

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

We discourage adding another target's name as an extra label. Further, you cannot do this change because both of the targets in question (LPC11U35_501 and XADOW_M0) are released for mbed 2.

Full explanation: When we do a release of mbed 2, we build all targets that have a release_versions key which contains a 2 into a library. After release, when you build for the XADOW_M0 target, you will pick up two mbed libraries. This is an error. This change thus introduces a bug.

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead, you could have the XADOW_M0 inherit from the LPC11U35_501 and modify the target as needed, without adding the release_version key.

targets/targets.json already added MCU_LPC11U35_501 as an extra label
but it didn't have LPC11U35_501 (without the MCU_ prefix). Both of
these target names are used as folder names to organize files
specific to this device. For example the LPC11U35.ld linker script used
by GCC_ARM for this target is located in a TARGET_LPC11U35_501 folder.

I switched to using inheritance to properly setup the target labels
based on @theotherjimmy comments on PR #4252. Everything in the
XADOW_M0 targe appears to have been copy/pasted from LPC11U35_501
anyway so inheritance seems to be the best way to set the values of
the XADOW_M0 properties.
@adamgreen
Copy link
Contributor Author

I guess some properties aren't inherited and my latest update broke things.

Obviously I don't understand the format of this JSON file well enough to being making PRs to it. I will close out this PR and let someone more knowledgeable than me attempt a fix for this. Sorry to have wasted your time.

@adamgreen adamgreen closed this May 2, 2017
"default_lib": "small",
"release_versions": ["2"],
"device_name": "LPC11U35FHI33/501"
"inherits": ["LPC11U35_501"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Drop the comma at the end of this line. It's not valid json.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks

adbridge pushed a commit that referenced this pull request May 5, 2017
targets/targets.json already added MCU_LPC11U35_501 as an extra label
but it didn't have LPC11U35_501 (without the MCU_ prefix). Both of
these target names are used as folder names to organize files
specific to this device. For example the LPC11U35.ld linker script used
by GCC_ARM for this target is located in a TARGET_LPC11U35_501 folder.

I switched to using inheritance to properly setup the target labels
based on @theotherjimmy comments on PR #4252. Everything in the
XADOW_M0 targe appears to have been copy/pasted from LPC11U35_501
anyway so inheritance seems to be the best way to set the values of
the XADOW_M0 properties.
adbridge pushed a commit that referenced this pull request May 5, 2017
targets/targets.json already added MCU_LPC11U35_501 as an extra label
but it didn't have LPC11U35_501 (without the MCU_ prefix). Both of
these target names are used as folder names to organize files
specific to this device. For example the LPC11U35.ld linker script used
by GCC_ARM for this target is located in a TARGET_LPC11U35_501 folder.

I switched to using inheritance to properly setup the target labels
based on @theotherjimmy comments on PR #4252. Everything in the
XADOW_M0 targe appears to have been copy/pasted from LPC11U35_501
anyway so inheritance seems to be the best way to set the values of
the XADOW_M0 properties.
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.

4 participants