Skip to content
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

msp430: Add newlib support #4766

Closed
wants to merge 6 commits into from

Conversation

jnohlgard
Copy link
Member

@jnohlgard jnohlgard commented Feb 8, 2016

MSPGCC (the old compiler) is usually used with msp-libc, while the new upstream GCC msp430 port (sometimes referred to as the Red Hat MSP430 compiler) is usually accompanied by newlib.
The new msp430 port started with version 4.9.x, the latest release of the old mspgcc is 4.6.3 in the beginning of 2012 and doesn't look like it will receive any updates.

Untested on actual hardware since I don't have access to any msp430 boards.

@jnohlgard jnohlgard added Platform: MSP Platform: This PR/issue effects MSP-based platforms Area: build system Area: Build system Impact: major The PR changes a significant part of the code base. It should be reviewed carefully labels Feb 8, 2016
@OlegHahm
Copy link
Member

OlegHahm commented Feb 8, 2016

At least in terms of memory footprint it seems to be okay. (msp430-size is showing similar results when building default and gnrc_minimal with and without this PR.)

@jnohlgard
Copy link
Member Author

@OlegHahm the changes with the old mspgcc 4.6 toolchain should be minimal, the big change is that it builds fine on msp430-elf-gcc-5.3.0 with newlib (though as I wrote in the top post I have not tested the resulting binary on real hardware)

@haukepetersen
Copy link
Contributor

side question: when using the gcc msp430 compiler, would it be possible/make sense to use our own linkerscript for msp430 boards? This way we could get closer to the arm cortex boards and it would allow us to add our own sections (as @jfischer-phytec-iot proposed for auto-init).

@jnohlgard
Copy link
Member Author

I guess so. There's like a bazillion ldscripts in the toolchain, but we
only support a small number of them so I guess it would be doable and even
beneficial in the long run to align them with the cortex platforms.

side question: when using the gcc msp430 compiler, would it be
possible/make sense to use our own linkerscript for msp430 boards? This way
we could get closer to the arm cortex boards and it would allow us to add
our own sections (as @jfischer-phytec-iot
https://github.com/jfischer-phytec-iot proposed for auto-init).


Reply to this email directly or view it on GitHub
#4766 (comment).

@haukepetersen
Copy link
Contributor

nice

@jnohlgard
Copy link
Member Author

@haukepetersen do you want to refactor the ldscripts?

@haukepetersen
Copy link
Contributor

nope, not planning on doing so. It was more a general question, and I have the feeling that @kaspar030 and @jfischer-phytec-iot will need to do so to follow on their init/static array ideas...

@jnohlgard jnohlgard added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Feb 15, 2016
@jnohlgard
Copy link
Member Author

Something broke after rebasing on latest master, it won't compile right now because of missing symbols but I did not debug further

# any updates. We use the numbers to decide if we use newlib by default.
CC_VERSION := $(shell $(CC) -dumpversion 2>&1)

ifeq (4.9, $(firstword $(sort 4.9 $(CC_VERSION))))
Copy link
Contributor

Choose a reason for hiding this comment

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

I love this hack!

@OlegHahm
Copy link
Member

Any time estimate for this one?

@jnohlgard
Copy link
Member Author

I won't have time to work on it, and I don't have any msp430 hardware to test on anyway so I would like to see someone adopt this.

@jnohlgard
Copy link
Member Author

I have done some updates to rebase on latest master. Everything builds now on both the new and the old toolchain, except for the chronos board with the newlib toolchain, something about missing USART_1. I don't have the board and no desire to dig any further in this topic, so do we have any msp430 developer who would like to take over this PR?

@PeterKietzmann
Copy link
Member

Probably @malosek :-) ?

@jnohlgard
Copy link
Member Author

won't make it for release

@jnohlgard jnohlgard modified the milestones: Release 2016.10, Release 2016.07 Jul 12, 2016
@jnohlgard jnohlgard mentioned this pull request Jul 17, 2016
55 tasks
@miri64
Copy link
Member

miri64 commented Oct 31, 2016

Postponed due to feature freeze

@miri64 miri64 modified the milestones: Release 2017.01, Release 2016.10 Oct 31, 2016
@OlegHahm
Copy link
Member

I will try to take the PR over if you agree, @gebart.

@jnohlgard
Copy link
Member Author

jnohlgard commented Dec 22, 2016 via email

@jnohlgard
Copy link
Member Author

postponed

@OlegHahm
Copy link
Member

Sorry that there was no progress from my side until now. But it's still on my list.

@jnohlgard jnohlgard added the State: archived State: The PR has been archived for possible future re-adaptation label Jun 21, 2017
@jnohlgard
Copy link
Member Author

closed in favour of #6445

@jnohlgard jnohlgard closed this Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Platform: MSP Platform: This PR/issue effects MSP-based platforms State: archived State: The PR has been archived for possible future re-adaptation State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants