Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Overlay support on arm-none-eabi-gcc toolchain

  1. #1
    Banned
    Join Date
    Jul 2016
    Location
    Kochi
    Posts
    4

    Overlay support on arm-none-eabi-gcc toolchain

    Hi,

    we are working on a project based on ARM Cortex M0 controller. We are having a limited amount of RAM(190KB), which is causing us an issue that our application(.text + .data + .bss) itself is larger than RAM Size(Code directly runs from RAM since we only have an external flash which is interfaced with QSPI). We are using arm-none-eabi-gcc toolchain. We came across some mechanism named 'overlay' to solve this issue. But overlay is a mechanism which is provided by the toolchain itself. We were not able to find proper documentation for overlay support on arm-none-eabi-gcc toolchain. If anybody has some experience on this one, please help us solve this issue. Any help is appreciable.

    Thanks & Regards
    Jitheesh Surendran

  2. #2
    Senior Member
    Join Date
    Nov 2015
    Location
    Wales
    Posts
    578
    Last edited by Xenoamor; 07-19-2016 at 10:57 AM.

  3. #3
    Banned
    Join Date
    Jul 2016
    Location
    Kochi
    Posts
    4
    Hi

    Thanks for you valuable info.

    The first link explains based on Armlink toolchain which neatly explained with examples also. But unfortunately we are using GNU Toolchain. The second link has the explanation for GNU, but it doesn't provide any examples. So we are porting the one from ARMlink to support for GNU. But we came across some issues. What are the equivalent stub function in GNU(arm-link uses $Sub$$ and $Super$$). How to use EXPORT command in GNU with DCD to get 'code_base' and 'overlay_regions'(Which are explained in overlay_list.s). Googling doesn't seems to be helpful.

    Thanks & Regards
    Jitheesh Surendran

  4. #4
    Senior Member
    Join Date
    Nov 2015
    Location
    Wales
    Posts
    578
    ... I'm really struggling to see what you're doing here.

    Don't you just assign a function to a special area in the linker. Then in the linker you mark that area as OVERLAY? Such as in: http://codingrelic.geekhold.com/2011...t-extinct.html

  5. #5
    Banned
    Join Date
    Jul 2016
    Location
    Kochi
    Posts
    4
    Hi,

    Thanks for your help. I wasn't talking about the way to customise the linker script for including overlay. I was talking about some sort of overlay manager to copy the overlay-ed regions from flash to RAM at the run-time. Finally i found that ARM Compiler have more support for overlays than for gnu-GCC(not necessary to rewrite existing code when using ARM Compiler, $Sub$$ and $Super$$ takes care of that). But when using gnu-GCC we need to rewrite all the function calls(which involved in overlay module) to load the correct overlay before the actual function call.

    Anyway i was able to implement the overlay with the info provided. Once again thank for your time and effort.

    Regards
    Jitheesh Surendran

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •