AnsweredAssumed Answered

MQX Scatter Loading and GfxRAM

Question asked by NG Sari on May 28, 2014
Latest reply on Sep 15, 2014 by Timesys Support

Hello Folks;

I want to use SysRAM0 + SysRam1 for Code and GfxRAM for Data

Is it posbile ?

I have changed scatter file and It does not work.
I can't figure out why ?

 

And one more thing, Is it posible to use SysRAM0 for both code and data ?

 

Thank you for everything.

 

#! armcc -E --cpu Cortex-A5.neon


#define CODE_BASE_ADDR_START    0x3f000000
#define CODE_BASE_ADDR_END      0x3f070000
#define CODE_SIZE               (CODE_BASE_ADDR_END - CODE_BASE_ADDR_START)


#define DATA_BASE_ADDR_START    0x3f410000
#define DATA_BASE_ADDR_END      0x3f470000
#define DATA_SIZE               (DATA_BASE_ADDR_END - DATA_BASE_ADDR_START)


#define DATA_SHARED_START       0x3f400000
#define DATA_SHARED_END         0x3f40fff0


#define BOOT_STACK_SIZE         0x100
#define FIQ_STACK_SIZE          0
#define ABT_STACK_SIZE          0
#define UND_STACK_SIZE          0
#define SYS_STACK_SIZE          0


LOAD_REGION_CODE CODE_BASE_ADDR_START
{


    BOOT +0
    {
        *(STARTUP)
    }
    
    CODE +0
    {
        * (InRoot$$Sections)      ; All library sections for example, __main.o,
                                  ; __scatter*.o, __dc*.o, and * Region$$Table
        * (KERNEL)
        * (TEXT)
        * (+RO)
    }
    
    DATA DATA_BASE_ADDR_START ALIGN 32 
    {
        * (+RW, +ZI)
    }


    ; FIQ stack
    FIQ_STACKS +0 ALIGN 8 EMPTY FIQ_STACK_SIZE {}
    ; ABT stack
    ABT_STACKS +0 ALIGN 8 EMPTY ABT_STACK_SIZE {}
    ; UND stack
    UND_STACKS +0 ALIGN 8 EMPTY UND_STACK_SIZE {}
    ; SYS stack
    SYS_STACKS +0 ALIGN 8 EMPTY SYS_STACK_SIZE {}


    KERNEL_DATA_START +0 ALIGN 16
    {
        * (KERNEL_DATA_START)     ; start of kernel data
        * (SRAM_POOL_START)
        * (UNCACHED_DATA_START)
    }


    KERNEL_DATA_END DATA_BASE_ADDR_END - (0x03*0x10)      ; RAM_END - 3 x aligned value with align 0x04 
    {
        * (SRAM_POOL_END)
        * (UNCACHED_DATA_END)
        * (KERNEL_DATA_END)     ; end of kernel data
    }

    SHARED_RAM_START DATA_SHARED_START EMPTY 0xfff0
    {
    }


    SHARED_RAM_END DATA_SHARED_END
    {
        *(SHARED_RAM_END)
    }
    
    ; mem_init writes a storeblock_struct at the end of kernel data,
    ; max size 32 bytes, so use 0x100 offset
   


    BOOT_STACK_ADDR (DATA_BASE_ADDR_END - BOOT_STACK_SIZE) OVERLAY
    {
        *(BOOT_STACK)
    }


    ; We don't use their stack or heap, but the tools expect this
    ; to be here, so we have a dummy placeholder.
    ARM_LIB_STACKHEAP (DATA_BASE_ADDR_END - 0x100) OVERLAY EMPTY UNINIT 0x04 
    {
    }
    
}



Outcomes