Giter Club home page Giter Club logo

Comments (4)

adamgreig avatar adamgreig commented on June 3, 2024

You can do this without any changes to cortex-m-rt, though perhaps it could be better documented.

In your memory.x, write something like:

MEMORY
{
    FLASH  (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
    RAM    (rw) : ORIGIN = 0x20000000, LENGTH = 128K
    CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
}

SECTIONS
{
    .ccmram (NOLOAD) : ALIGN(4)
    {
        *(.ccmram .ccmram.*);
        . = ALIGN(4);
    } > CCMRAM
} INSERT AFTER .bss;

/* Place stack in CCMRAM (optional) */
_stack_start = ORIGIN(CCMRAM) + LENGTH(CCMRAM);

You can then place uninit statics into CCMRAM:

#[link_section=".ccmram"]
static mut BUF: [u8; 1024] = [0u8; 1024];

from cortex-m-rt.

tstellanova avatar tstellanova commented on June 3, 2024

Thanks for the assistance-- I did not realize SECTIONS could be modified this way. This works!

from cortex-m-rt.

therealprof avatar therealprof commented on June 3, 2024

Is this documented somewhere in this detail? If not it probably should be.

from cortex-m-rt.

tstellanova avatar tstellanova commented on June 3, 2024

Is this documented somewhere in this detail? If not it probably should be.

I'd be happy to write this up somewhere. Where's the right spot? Maybe the lib comments

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.