-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
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 |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
targets/targets.json
Outdated
@@ -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"], |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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. |
"default_lib": "small", | ||
"release_versions": ["2"], | ||
"device_name": "LPC11U35FHI33/501" | ||
"inherits": ["LPC11U35_501"], |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
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.
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.
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.