Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Change linker script to support Teensy 3.0 #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Change linker script to support Teensy 3.0 #3

wants to merge 2 commits into from

Conversation

ratkins
Copy link

@ratkins ratkins commented Sep 18, 2016

Small change but relatively obscure—might help someone else if you added this branch

@mdaffin
Copy link
Owner

mdaffin commented Sep 21, 2016

Thanks for this, but it effectively limits the teensy 3.1 to a teensy 3.0 in terms of flash and ram. It would be better to support both chip sets at full specs. This is something I am still trying to find the best way to do but for now I think its best to maintain a layout.md for both versions. I am not overly fussed which is the default as long as we retain both for now.

Could you add the original back as mk20dx256vlh7.ld or your changes to mk20dx64vlh7.ld. I will figure out a nicer way to pick which version you use at a later date.

Thank you.

@ratkins
Copy link
Author

ratkins commented Sep 22, 2016

Ah, sorry—my git-fu is weak. My intent was that you add this branch with my changes to your repo, not that you merge this change into your master.

I've done what you asked and added both linker scripts under the above names and changed thumbv7em-none-eabi.json to refer to the Teensy 3.1 version.

(Having never seen a linker script before and just trying to get something working at a Rust workshop for the first time the other day, it would have helped me to see a Teensy 3.0 branch, if you can't think of a better way to parameterise this in the short term.)

@mdaffin
Copy link
Owner

mdaffin commented Sep 22, 2016

You forgot to revert the changes in the mk20dx256vlh7.ld version so the contents of the two files are the same.

Looking at the zinc project and the original teensy source they both keep multiple ld files for different chips and use the build tool (build.rs in our case) to copy the correct one. Something along these lines is what I would do for a more fully fledged library, but I like how this example is bare bones and simple. With that I think it's probably best to just add a section in the readme to describe how to use the alternitive ld files for the teensy 3.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants