Skip to content

Using sram4/5 #843

Open
Open
@alexkazik

Description

@alexkazik

In my previous project with rust on a STM32 I managed to place assembly code in ram. The code is compiled with gcc via build.rs and cc. And is more or less this:

.section .data
.global mode0
.p2align 2
.type mode0,%function
mode0:
.fnstart
... code

and

  RAM  (rwx) : ORIGIN = 0x20000000, LENGTH = 31K

I'd like to use sram4 and 5 for the assembly code, I tried several things and it does compile but the elf says:

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
...
  4 .sram4and5    0000004c  00000000  00000000  000086e0  2**2
                  CONTENTS, READONLY
...

Any tips on how to do that?

Otherwise I'll try compile the assembly program with gcc into an elf, convert that to bin and include it in the rust code and copy it there myself - in the hope that I can get that to work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions