This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Starterware/AM4378: Error when compile bootloader project

Part Number: AM4378
Other Parts Discussed in Thread: PRU-ICSS-INDUSTRIAL-SW

Tool/software: Starterware

Hi :

I try to compile bootloader project in starterware for am4378.

My ccs version is 6.1.2, compiler is GNU v4.9.3.

At first, I import the bootloader project. Then import the necessary dependent project and config them as below.

At last, I compile the bootloader ,but there are several errors and warnings as show below.

**** Build of configuration am43xx_boot_mmcsd_debug for project bootloader ****

"D:\\ti\\ccsv6\\utils\\bin\\gmake" -j 4 -s -k all 
'Building file: D:/ti/starterware/examples/mmcsd/hsmmcsd_app_pol.c'
'Building file: D:/ti/starterware/examples/gpio/gpio_app.c'
'Building file: D:/ti/starterware/bootloader/src/am43xx/sbl_am43xx_platform.c'
'Building file: D:/ti/starterware/bootloader/src/am43xx/sbl_am43xx_platform_ddr.c'
'Invoking: GNU Compiler'
'Invoking: GNU Compiler'
'Invoking: GNU Compiler'
'Invoking: GNU Compiler'
'Finished building: D:/ti/starterware/examples/gpio/gpio_app.c'
'Finished building: D:/ti/starterware/examples/mmcsd/hsmmcsd_app_pol.c'
'Finished building: D:/ti/starterware/bootloader/src/am43xx/sbl_am43xx_platform.c'
'Finished building: D:/ti/starterware/bootloader/src/am43xx/sbl_am43xx_platform_ddr.c'
' '
' '
' '
' '
'Building file: D:/ti/starterware/bootloader/src/sbl_copy.c'
'Building file: D:/ti/starterware/bootloader/src/am43xx/sbl_am43xx_platform_pll.c'
'Building file: D:/ti/starterware/bootloader/src/sbl_main.c'
'Building file: D:/ti/starterware/bootloader/src/sbl_mmcsd.c'
'Invoking: GNU Compiler'
'Invoking: GNU Compiler'
'Invoking: GNU Compiler'
'Invoking: GNU Compiler'
D:/ti/starterware/bootloader/src/sbl_main.c: In function 'main':
D:/ti/starterware/bootloader/src/sbl_main.c:88:14: warning: variable 'status' set but not used [-Wunused-but-set-variable]
uint32_t status;
^
'Finished building: D:/ti/starterware/bootloader/src/sbl_copy.c'
'Finished building: D:/ti/starterware/bootloader/src/sbl_main.c'
'Finished building: D:/ti/starterware/bootloader/src/sbl_mmcsd.c'
'Finished building: D:/ti/starterware/bootloader/src/am43xx/sbl_am43xx_platform_pll.c'
' '
' '
' '
' '
'Building target: ../../../binary/bootloader/bin/am43xx-evm/ccs/bootloader_boot_mmcsd_a9host_debug.out'
'Invoking: GNU Linker'
d:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe:../../../examples/gcc/am43xx_boot_ccs.lds:50: warning: redeclaration of memory region `DDR0'
d:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ../../../binary/bootloader/bin/am43xx-evm/ccs/bootloader_boot_mmcsd_a9host_debug.out section `.stack' will not fit in region `OCMCRAM'
d:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `OCMCRAM' overflowed by 61784 bytes
collect2.exe: error: ld returned 1 exit status
gmake: *** [../../../binary/bootloader/bin/am43xx-evm/ccs/bootloader_boot_mmcsd_a9host_debug.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

Is there anyone who have come across this problem that can give a hand?

  • user4999129,
    Could you please post your linker cmd file?

    Lali
  • Hi Lali:
    There are two link cmd file:
    1.am4378.lds

    *****************************************************************************
    MEMORY
    {
    DDR0 : o = 0x80000000, l = 0x10000000 /* 256MB external DDR Bank 0 */
    OCMCRAM : o = 0x40300000, l = 0x40000 /* 256KB of internal RAM */
    }

    OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
    OUTPUT_ARCH(arm)

    SECTIONS
    {
    .startcode :
    {
    . = ALIGN(4);
    *init.o (.text)
    } >OCMCRAM

    .text :
    {
    . = ALIGN(4);
    *(.text*)
    *(.rodata*)
    } >OCMCRAM

    .data :
    {
    . = ALIGN(4);
    *(.data*)
    } >OCMCRAM

    .bss :
    {
    . = ALIGN(4);
    _bss_start = .;
    *(.bss*)
    *(COMMON)
    _bss_end = .;
    } >OCMCRAM

    .heap :
    {
    . = ALIGN(4);
    __end__ = .;
    end = __end__;
    __HeapBase = __end__;
    *(.heap*)
    . = . + 0x800;
    __HeapLimit = .;
    } >OCMCRAM

    .stack :
    {
    . = ALIGN(4);
    __StackLimit = . ;
    *(.stack*)
    . = . + 0x10000;
    __StackTop = .;
    } >OCMCRAM
    _stack = __StackTop;
    }
    *****************************************************************************

    2.am43xx_boot_ccs.lds
    *****************************************************************************
    MEMORY
    {
    DDR0 : o = 0x80000000, l = 0x10000000 /* 256MB external DDR Bank 0 */
    OCMCRAM : o = 0x402F4000, l = 0x2FC00 /* 256KB of internal RAM */
    }

    OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
    OUTPUT_ARCH(arm)

    SECTIONS
    {
    .startcode :
    {
    . = ALIGN(4);
    *sbl_init.o (.text)
    } >OCMCRAM

    .text :
    {
    . = ALIGN(4);
    *(.text*)
    *(.rodata*)
    } >OCMCRAM

    .data :
    {
    . = ALIGN(4);
    *(.data*)
    } >OCMCRAM

    .bss :
    {
    . = ALIGN(4);
    _bss_start = .;
    *(.bss*)
    *(COMMON)
    _bss_end = .;
    } >OCMCRAM

    .heap :
    {
    . = ALIGN(4);
    __end__ = .;
    end = __end__;
    __HeapBase = __end__;
    *(.heap*)
    . = . + 0x800;
    __HeapLimit = .;
    } >OCMCRAM

    .stack :
    {
    . = ALIGN(4);
    __StackLimit = . ;
    *(.stack*)
    . = . + 0x10000;
    __StackTop = .;
    } >OCMCRAM
    _stack = __StackTop;
    }
    *****************************************************************************
  • Starterware CCS projects for AM437x were only supported in SYSBIOSSDK-IND-SITARA. TI has stopped providing free support for SYSBIOSSDK-IND-AM335x on 31 March 2017 as you can see from the notification here:

    e2e.ti.com/.../580869

    We are currently supporting development only with Processor SDK RTOS and PRU-ICSS-INDUSTRIAL-SW . We recommend that you migrate to this software baseline to get support on TI E2E forums.

    Processor SDK RTOS support for bootloaders is described here and we are happy to support this baseline.
    processors.wiki.ti.com/.../AM437x

    Regards,
    Rahul