rp-hal icon indicating copy to clipboard operation
rp-hal copied to clipboard

Using sram4/5

Open alexkazik opened this issue 6 months ago • 11 comments

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.

alexkazik avatar Aug 26 '24 17:08 alexkazik