Tool/software: TI C/C++ Compiler
Hi,
I am using the CCS6.0.1.00040 and TI v 5.1.4. When I am building starter ware boot loader code , in .map file it is showing the .data section uninitialized. The global variables are uninitialized. It is initializing the global variables with garbage values. For example consider the following global variable
tOPPConfig oppTable[] =
{
{MPUPLL_M_275_MHZ, PMIC_VOLT_SEL_1100MV}, /* OPP100 275Mhz - 1.1v */
{MPUPLL_M_500_MHZ, PMIC_VOLT_SEL_1100MV}, /* OPP100 500Mhz - 1.1v */
{MPUPLL_M_600_MHZ, PMIC_VOLT_SEL_1200MV}, /* OPP120 600Mhz - 1.2v */
{MPUPLL_M_720_MHZ, PMIC_VOLT_SEL_1260MV}, /* OPP TURBO 720Mhz - 1.26v */
{MPUPLL_M_300_MHZ, PMIC_VOLT_SEL_0950MV}, /* OPP50 300Mhz - 950mv */
{MPUPLL_M_300_MHZ, PMIC_VOLT_SEL_1100MV}, /* OPP100 300Mhz - 1.1v */
{MPUPLL_M_600_MHZ, PMIC_VOLT_SEL_1100MV}, /* OPP100 600Mhz - 1.1v */
{MPUPLL_M_720_MHZ, PMIC_VOLT_SEL_1200MV}, /* OPP120 720Mhz - 1.2v */
{MPUPLL_M_800_MHZ, PMIC_VOLT_SEL_1260MV}, /* OPP TURBO 800Mhz - 1.26v */
{MPUPLL_M_1000_MHZ, PMIC_VOLT_SEL_1325MV} /* OPP NITRO 1000Mhz - 1.325v */
};
The entire oppTable[] is initialized with garbage values.
My linker .cmd file is
-stack 0x0008 /* SOFTWARE STACK SIZE */
-heap 0x2000 /* HEAP AREA SIZE */
-e Entry
/* Since we used 'Entry' as the entry-point symbol the compiler issues a */
/* warning (#10063-D: entry-point symbol other than "_c_int00" specified: */
/* "Entry"). The CCS Version (5.1.0.08000) stops building from command */
/* line when there is a warning. So this warning is suppressed with the */
/* below flag. */
--diag_suppress=10063
/* SPECIFY THE SYSTEM MEMORY MAP */
MEMORY
{
IRAM_MEM : org = 0x402F0400 len = 0x1FBFF /* RAM */
}
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
SECTIONS
{
.init : {
bl_init.obj (.text)
} load > 0x402F0400
.text : load > IRAM_MEM /* CODE */
.data : load > IRAM_MEM /* INITIALIZED GLOBAL AND STATIC VARIABLES. */
.bss : load > IRAM_MEM /* UNINITIALIZED OR ZERO INITIALIZED */
/* GLOBAL & STATIC VARIABLES. */
RUN_START(bss_start)
RUN_END(bss_end)
.const : load > IRAM_MEM /* GLOBAL CONSTANTS */
.cinit : load > IRAM_MEM
.stack : load > 0x4030FFF0 /* SOFTWARE SYSTEM STACK */
}
My memory map file .map file is
ENTRY POINT SYMBOL: "Entry" address: 402f0400
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
IRAM_MEM 402f0400 0001fbff 0000fbe1 0001001e RWIX
SEGMENT ALLOCATION MAP
run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
402f0400 402f0400 0000ef2c 0000ef2c r-x
402f0400 402f0400 00000088 00000088 r-x .init
402f0488 402f0488 0000eea4 0000eea4 r-x .text
402ff32c 402ff32c 00000c00 00000000 rw-
402ff32c 402ff32c 00000a1d 00000000 rw- .bss
402ffd4c 402ffd4c 000001e0 00000000 rw- .data
402fff2c 402fff2c 00000020 00000020 r--
402fff2c 402fff2c 00000020 00000020 r-- .const
402fff50 402fff50 00000090 00000090 r--
402fff50 402fff50 00000090 00000090 r-- .cinit
4030fff0 4030fff0 00000008 00000000 rw-
4030fff0 4030fff0 00000008 00000000 rw- .stack
SECTION ALLOCATION MAP
output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.init 0 402f0400 00000088
402f0400 00000088 bl_init.obj (.text)
.text 0 402f0488 0000eea4
402f0488 00001d10 drivers.lib : uart_irda_cir.obj (.text)
402f2198 00001c8c : gpmc.obj (.text)
402f3e24 000019f8 utils.lib : uartStdio.obj (.text)
402f581c 00001338 bl_platform.obj (.text)
402f6b54 000012a8 libnand.lib : nand_gpmc.obj (.text)
402f7dfc 00001100 : nandlib.obj (.text)
402f8efc 00000b50 drivers.lib : gpio_v2.obj (.text)
402f9a4c 00000ad0 : hsi2c.obj (.text)
402fa51c 000009e4 platform.lib : gpio.obj (.text)
402faf00 000007d4 : SDS_DPE_Host_Pinmux.obj (.text)
402fb6d4 000007c0 drivers.lib : elm.obj (.text)
402fbe94 000006f0 platform.lib : dmtimer.obj (.text)
402fc584 0000069c drivers.lib : dmtimer.obj (.text)
402fcc20 00000638 utils.lib : ascii.obj (.text)
402fd258 00000448 platform.lib : hsi2c.obj (.text)
402fd6a0 0000042c : uart.obj (.text)
402fdacc 000003e4 system.lib : interrupt.obj (.text)
402fdeb0 00000380 bl_nand.obj (.text)
402fe230 00000310 platform.lib : nand.obj (.text)
402fe540 00000280 utils.lib : consoleUtils.obj (.text)
402fe7c0 00000220 platform.lib : cpld.obj (.text)
402fe9e0 00000180 rtsv7A8_A_le_eabi.lib : memcpy32.obj (.text)
402feb60 00000170 platform.lib : sysdelay.obj (.text)
402fecd0 0000014c : uartConsole.obj (.text)
402fee1c 000000f0 rtsv7A8_A_le_eabi.lib : u_div32.obj (.text)
402fef0c 000000d4 : auto_init.obj (.text)
402fefe0 000000b0 : memset32.obj (.text)
402ff090 00000098 : copy_decompress_rle.obj (.text)
402ff128 00000080 : cpy_tbl.obj (.text)
402ff1a8 00000060 system.lib : cpu.obj (.text)
402ff208 00000054 main.obj (.text)
402ff25c 0000004c utils.lib : delay.obj (.text)
402ff2a8 00000038 system.lib : device.obj (.text)
402ff2e0 00000020 rtsv7A8_A_le_eabi.lib : copy_zero_init.obj (.text:decompress:ZI)
402ff300 00000014 : copy_decompress_none.obj (.text:decompress:none)
402ff314 0000000c system.lib : cpu.obj (.text:CPUIntStatus)
402ff320 00000008 rtsv7A8_A_le_eabi.lib : copy_decompress_rle.obj (.text:decompress:rle24)
402ff328 00000004 : i_div0.obj (.text)
.bss 0 402ff32c 00000a1d UNINITIALIZED
402ff32c 00000800 bl_nand.obj (.bss:rxData)
402ffb2c 00000200 system.lib : interrupt.obj (.bss:fnRAMVectors)
402ffd2c 00000004 (.common:dataFromSlave)
402ffd30 00000004 (.common:dataToSlave)
402ffd34 00000004 (.common:deviceVersion)
402ffd38 00000004 (.common:freqMultDDR)
402ffd3c 00000004 (.common:oppMaxIdx)
402ffd40 00000004 (.common:rCount)
402ffd44 00000004 (.common:tCount)
402ffd48 00000001 (.common:ConsoleType)
.data 0 402ffd4c 000001e0 UNINITIALIZED
402ffd4c 00000108 bl_nand.obj (.data)
402ffe54 000000cc bl_platform.obj (.data)
402fff20 00000008 main.obj (.data)
402fff28 00000004 platform.lib : sysdelay.obj (.data)
.const 0 402fff2c 00000020
402fff2c 00000014 utils.lib : uartStdio.obj (.const:.string)
402fff40 00000008 bl_platform.obj (.const:.string)
402fff48 00000004 utils.lib : uartStdio.obj (.const)
.cinit 0 402fff50 00000090
402fff50 0000006a (.cinit..data.load) [load image, compression = rle]
402fffba 00000002 --HOLE-- [fill = 0]
402fffbc 0000000c (__TI_handler_table)
402fffc8 00000008 (.cinit..bss.load) [load image, compression = zero_init]
402fffd0 00000010 (__TI_cinit_table)
.stack 0 4030fff0 00000008 UNINITIALIZED
4030fff0 00000008 --HOLE--
LINKER GENERATED COPY TABLES
__TI_cinit_table @ 402fffd0 records: 2, size/record: 8, table size: 16
.data: load addr=402fff50, load size=0000006a bytes, run addr=402ffd4c, run size=000001e0 bytes, compression=rle
.bss: load addr=402fffc8, load size=00000008 bytes, run addr=402ff32c, run size=00000a1d bytes, compression=zero_init
LINKER GENERATED HANDLER TABLE
__TI_handler_table @ 402fffbc records: 3, size/record: 4, table size: 12
index: 0, handler: __TI_decompress_rle24
index: 1, handler: __TI_decompress_none
index: 2, handler: __TI_zero_init
Please help us where the error is occurring.
Thanks and Regards
Raja