cancel
Showing results for 
Search instead for 
Did you mean: 

SPC5 Studio, version 6.0: Info request to map function to an address.

OldArmySon
Associate

How does one go about setting main() to address 8?

Or any address, but I thought I'd be specific so I can see what the mechansim is to set things to specific addresses.  If you have a map input file (I see the out.map).

Also, getting error:

c:/spc5studio-6.0/eclipse/plugins/com.st.tools.spc5.tools.gnu.gcc.ppcvle.win32_4.9.4.20200908161514/toolchain/bin/../lib/gcc/powerpc-eabivle/4.9.4/../../../../powerpc-eabivle/bin/real-ld.exe: build/out.elf section `.bss' will not fit in region `ram'
c:/spc5studio-6.0/eclipse/plugins/com.st.tools.spc5.tools.gnu.gcc.ppcvle.win32_4.9.4.20200908161514/toolchain/bin/../lib/gcc/powerpc-eabivle/4.9.4/../../../../powerpc-eabivle/bin/real-ld.exe: region `ram' overflowed by 3792 bytes

No idea where to look for the problem or how to correct.  Not new to embedded software and this is usually in some sort of linker file etc..usually can fix these things by a descriptive output file that fully describes the location and sizes of the code...but where...hmmm what could it be called?

Map file describes the following:

0x00000000 __irq_stack_size__ = 0x0
0x00000800 __process_stack_size__ = 0x800
0x00080000 __flash_size__ = LENGTH (flash)
0x00000000 __flash_start__ = ORIGIN (flash)
0x00080000 __flash_end__ = (ORIGIN (flash) + LENGTH (flash))
0x00008000 __ram_size__ = LENGTH (ram)
0x40000000 __ram_start__ = ORIGIN (ram)
0x40008000 __ram_end__ = (ORIGIN (ram) + LENGTH (ram))
0x00000000 . = ORIGIN (flash)

 

Target is SPC560BCxx.

Have Platform components:

Init Package ,

FreeRTOS , 

Low Level Drivers

SPC560BCxx Board Initialization

SPC560BCxx IRQ

SPC560BCxx OSAL

 

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee

Hello ,

you have to update your linker file.

you can create your own linker file user.ld at the root of your project in order to map with your software.

copy paste application.l (generated) and rename it by user.ld

update your user.ld.

I suspect that your code is too big

    .sbss :
    {
        __bss_start__ = .;
        *(.sbss)
        *(.sbss.*)
        *(.gnu.linkonce.sb.*)
        *(.scommon)
    } > ram

    .bss :
    {
        *(.bss)
        *(.bss.*)
        *(.gnu.linkonce.b.*)
        *(COMMON)
        __bss_end__ = .;
    } > ram

    __heap_base__   = __bss_end__;
    __heap_end__    = __ram_end__;

           Best regards

                     Erwan

 

View solution in original post

1 REPLY 1
Erwan YVIN
ST Employee

Hello ,

you have to update your linker file.

you can create your own linker file user.ld at the root of your project in order to map with your software.

copy paste application.l (generated) and rename it by user.ld

update your user.ld.

I suspect that your code is too big

    .sbss :
    {
        __bss_start__ = .;
        *(.sbss)
        *(.sbss.*)
        *(.gnu.linkonce.sb.*)
        *(.scommon)
    } > ram

    .bss :
    {
        *(.bss)
        *(.bss.*)
        *(.gnu.linkonce.b.*)
        *(COMMON)
        __bss_end__ = .;
    } > ram

    __heap_base__   = __bss_end__;
    __heap_end__    = __ram_end__;

           Best regards

                     Erwan