Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Linker - scripting section mappings

Hi,

I am trying to automatize the generation of my application in a gui-less environment as follows:

All is good until I get to the linker assignments: I did not find any possibility to specify where .bss .text .rodata .rwdata .heap would be placed.

The only solution that was working for a while was passing the "default_sections_mapping" parameter to the nios2-bsp command in create-this-bsp.sh

NIOS2_BSP_ARGS="--default_sections_mapping onchip_ram"

I am in a situation where this solution is no longer sufficient: I must use 2 smaller on-chip RAMs (onchip_ram_1 and onchip_ram_2) and assign specific sections of the application to each of these RAMs.

So far I was not able to find a solution.

I would appreciate any help!

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Just directly run the compiler and linker completely outside the altera environment.

    Then you can just write a linker script than contains exactly what you need (and nothing else).