This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

place heap in external location

Has anyone been successful in setting up the Keil tools and changing the Startup.s file to place the heap in external location (on SD/MMC Card or off-chip memory)?

The only reason that I want to use external memory is because I am using a library for the file system that needs to dynamically allocate space. The amount of space it needs to allocate is more than I have in internal memory.

Iam working on LPC2378 with keil uvision4.

Any help will be appreciated. Thanks in advance

Parents
  • You probably have something similar to:

    ; <h> Heap Configuration
    ;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
    ; </h>
    
    Heap_Size       EQU     0x00000000
    
                    AREA    HEAP, NOINIT, READWRITE, ALIGN=3
    __heap_base
    Heap_Mem        SPACE   Heap_Size
    __heap_limit
    


    in your startup file. You can explicitly control where HEAP should be located. Or you can just add more memory regions to the project and have the linker figure out where there are free space to store the HEAP.

Reply
  • You probably have something similar to:

    ; <h> Heap Configuration
    ;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
    ; </h>
    
    Heap_Size       EQU     0x00000000
    
                    AREA    HEAP, NOINIT, READWRITE, ALIGN=3
    __heap_base
    Heap_Mem        SPACE   Heap_Size
    __heap_limit
    


    in your startup file. You can explicitly control where HEAP should be located. Or you can just add more memory regions to the project and have the linker figure out where there are free space to store the HEAP.

Children
No data