Git Product home page Git Product logo

Comments (2)

rukai avatar rukai commented on June 5, 2024

After some research it appears this needs to be solved on the users end. Although if we could change upstream to make this more convenient that would be great.

I ended up with a per binary crate build.rs exactly the same as the one at: https://github.com/japaric/f3/blob/b40415b4c4f7e76bdf27dcb570bf961c75cb707b/build.rs

This solves my problem so feel free to close this issue, or it can be kept open if there is a better solution that could be done upstream.

from cortex-m-rt.

adamgreig avatar adamgreig commented on June 5, 2024

I think your conclusion is basically right: we don't control where the linker gets the memory.x from, it searches its own search path, which starts with the current working directory (the workspace or crate if not in a workspace) and then goes to the OUT_DIR. When users are building a not-in-workspace crate or have one memory.x shared by all crates in a workspace, no build.rs script is required, but otherwise one such as your example is.

The only thing we've discussed that could be a nicer solution is to revamp the linker script entirely so that it's generated at build time by a function inside the user's build.rs which could then also specify other sections and so forth, but that's some way off.

Thanks for reporting the issue and your conclusions!

from cortex-m-rt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.