Faster RLP

Would it be possible to change the RLP.LoadELF() method, so it can load elf files with .text and static data regions into FLASH instead of RAM? I have figured out that, when doing graphics stuff in RLP, that change would give a 2x to 3x speed boost.

I’m trying to figure out how I can load my own procedures to FLASH and then jump to the address, but that would be a dirty work-around. And I would have to make an assumption of which flash area is free to use.

I guess it would be easier for GHI to implement this in the RLP extension.

F.e. it would then be possible to use a linkscript like this:


OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)

MEMORY
{
  FLASH (wx) : ORIGIN = 0x803BE000, LENGTH = 0x00040000
  SDRAM (wx) : ORIGIN = 0xA0F00000, LENGTH = 0x000FFFFC
}

SECTIONS
{
        . = ALIGN(4);
        .text : 
        { 
        	*(.text)
        } > FLASH

        . = ALIGN(4);
        .rodata : 
        { 
          *(.rodata )
        } > FLASH
        
        . = ALIGN(4);
        .data : 
        { 
        	*(.data)
        } > FLASH

         . = ALIGN(4);
        .bss : 
        {
            __bss_start__ = .;
            *(.bss)
            __bss_end__ = .;
        } > SDRAM

   
}
end = .;  /* define a global symbol marking the end of application RAM */

10 Likes

Perhaps. We can look into it in future.