Skip to content

Add MBED_SECTION attribute #3676

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
Feb 2, 2017
Merged

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Feb 1, 2017

Allow the section that code is placed in to be explicitly specified with the attribute MBED_SECTION.

Allow the section that code is placed in to be explicitly specified
with the attribute MBED_SECTION.
@c1728p9
Copy link
Contributor Author

c1728p9 commented Feb 1, 2017

@mbed-bot: TEST

@c1728p9 c1728p9 requested a review from theotherjimmy February 1, 2017 15:24
@c1728p9
Copy link
Contributor Author

c1728p9 commented Feb 1, 2017

/morph test

@bridadan
Copy link
Contributor

bridadan commented Feb 1, 2017

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

mbed-bot commented Feb 1, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1488

All builds and test passed!

@mbed-bot
Copy link

mbed-bot commented Feb 1, 2017

[Build 1244]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@geky
Copy link
Contributor

geky commented Feb 2, 2017

Not to be a stickler, but this should come in with a test for compiler support
https://github.com/ARMmbed/mbed-os/tree/master/TESTS/mbedmicro-mbed/attributes

@c1728p9
Copy link
Contributor Author

c1728p9 commented Feb 2, 2017

Since there is no guarantee on section names by the current linker files in the code base I can't think of a good way to test this. When bootloader support comes it will test this. Furthermore if linker script generation with named sections becomes a thing this will be easily testable. If you can think of a clean way to test this in its current form then I would be glad to add tests.

@geky
Copy link
Contributor

geky commented Feb 2, 2017

Ah interesting, fair enough, go for it 👍

@pan-
Copy link
Member

pan- commented Feb 2, 2017

@c1728p9 What is the use case of this extension for the end user if it is not possible to provide custom linker script ? Is it for internal mbed-os internal use only ?

@c1728p9
Copy link
Contributor Author

c1728p9 commented Feb 2, 2017

@pan- this feature will be used by the bootloader to put data in a dedicated no-init ram region. It is possible to specify a custom linker script from the command line if someone want to use it for another purpose though.

@theotherjimmy
Copy link
Contributor

@pan- Basically

if it is not possible to provide custom linker script ?

It is possible

  -l LINKER_SCRIPT, --linker LINKER_SCRIPT
                        use the specified linker script

@pan-
Copy link
Member

pan- commented Feb 2, 2017

@c1728p9 @theotherjimmy Thanks for the clarification. There's something I've missed apparently 😆 .

@sg- sg- merged commit 3a90cde into ARMmbed:master Feb 2, 2017
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.

8 participants