Other Parts Discussed in Thread: SYSBIOS
Hi,
I've been trying to add I2C functions to my already running project. Fixing all config file and initializing the board builds ok. Only after I call I2c_init() function the linker error comes up:
"configPkg/linker.cmd", line 161: error #10099-D: program will not fit into
available memory. run placement with alignment fails for section ".fardata"
size 0x4001150 . Available memory ranges:
L2SRAM size: 0x80000 unused: 0x7ef72 max hole: 0x7ef6c
error #10010: errors encountered during linking; "myEVMstart.out" not built
Here is the part of map file that seems to be relevant:
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
L2SRAM 00800000 00080000 000385da 00047a26 RW X
MSMCSRAM 0c000000 00400000 00186a00 00279600 RW X
DDR3 80000000 20000000 00000000 20000000 RWIX
SEGMENT ALLOCATION MAP
run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
00000000 00000000 04000000 00000000 rw-
00000000 00000000 04000000 00000000 rw- .fardata.1
00800000 00800000 0001f680 00000000 rw-
00800000 00800000 00001094 00000000 rw- .fardata.2
00801098 00801098 0001e5e8 00000000 rw- .far
0081f680 0081f680 000161b2 000161b2 r-x
0081f680 0081f680 00013220 00013220 r-x .text
008328a0 008328a0 00002f92 00002f92 r-- .const
00835838 00835838 00002120 00000000 rw-
00835838 00835838 00002000 00000000 rw- .stack
00837838 00837838 00000120 00000000 rw- .cio
00837958 00837958 00000098 00000098 r--
00837958 00837958 00000098 00000098 r-- .switch
008379f0 008379f0 0000002c 00000000 rw-
008379f0 008379f0 00000010 00000000 rw- .bss
00837a00 00837a00 0000001c 00000000 rw- .neardata
00837a1c 00837a1c 00000008 00000000 r--
00837a1c 00837a1c 00000008 00000000 r-- .rodata
00837c00 00837c00 00000bc0 00000bc0 r-x
00837c00 00837c00 00000200 00000200 r-x .vecs
00837e00 00837e00 000009c0 000009c0 r-- .cinit
0c000000 0c000000 00186a00 00000000 rw-
0c000000 0c000000 00186a00 00000000 rw- .myHeap
SECTION ALLOCATION MAP
output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.stack 0 00835838 00002000 UNINITIALIZED
00835838 00000008 boot.ae66 : boot.oe66 (.stack)
00835840 00001ff8 --HOLE--
.bss 0 008379f0 00000010 UNINITIALIZED
008379f0 00000008 (.common:time1$1$0)
008379f8 00000004 (.common:data1_reg_val)
008379fc 00000004 (.common:pElemLog)
.neardata
* 0 00837a00 0000001c UNINITIALIZED
00837a00 0000000c ti.utils.profiling.ae66 : profilingHooksC66.oe66 (.neardata)
00837a0c 00000008 ti.platform.evm6678l.ae66 : platform.dbg.oe66 (.neardata)
00837a14 00000004 ti.drv.i2c.profiling.ae66 : I2C_drv.oe66 (.neardata)
00837a18 00000004 ti.drv.uart.ae66 : UART_drv.oe66 (.neardata)
.rodata 0 00837a1c 00000008 UNINITIALIZED
00837a1c 00000008 app_pe66.oe66 (.rodata)
.cinit 0 00837e00 000009c0
00837e00 00000923 (.cinit..fardata.2.load) [load image, compression = rle]
00838723 00000001 --HOLE-- [fill = 0]
00838724 00000025 (.cinit..fardata.1.load) [load image, compression = rle]
00838749 00000003 --HOLE-- [fill = 0]
0083874c 0000000c (.cinit..neardata.load) [load image, compression = rle]
00838758 0000000c (__TI_handler_table)
00838764 00000009 (.cinit..rodata.load) [load image, compression = rle]
0083876d 00000003 --HOLE-- [fill = 0]
00838770 00000008 (.cinit..bss.load) [load image, compression = zero_init]
00838778 00000008 (.cinit..far.load) [load image, compression = zero_init]
00838780 00000008 (.cinit..myHeap.load) [load image, compression = zero_init]
00838788 00000038 (__TI_cinit_table)
.init_array
* 0 00800000 00000000 UNINITIALIZED
.fardata.1
* 0 00000000 04000000 FAILED TO ALLOCATE
.fardata.2
* 0 00800000 00001094 UNINITIALIZED
00800000 00000500 app_pe66.oe66 (.fardata:ti_sysbios_family_c66_tci66xx_CpIntc_Module_State_0_dispatchTab__A)
00800500 00000218 app_pe66.oe66 (.fardata)
00800718 00000216 main.obj (.fardata:sizeTable_half)
0080092e 00000002 --HOLE--
00800930 00000180 app_pe66.oe66 (.fardata:ti_sysbios_timers_timer64_Timer_Module_State_0_device__A)
00800ab0 00000098 app_pe66.oe66 (.fardata:ti_sysbios_family_c66_tci66xx_CpIntc_Module_State_0_hostIntToSysInt__A)
00800b48 00000098 app_pe66.oe66 (.fardata:ti_sysbios_knl_Task_Object__table__V)
00800be0 00000080 app_pe66.oe66 (.fardata:ti_sysbios_knl_Swi_Module_State_0_readyQ__A)
00800c60 00000080 app_pe66.oe66 (.fardata:ti_sysbios_knl_Task_Module_State_0_readyQ__A)
00800ce0 00000080 app_pe66.oe66 (.fardata:ti_sysbios_timers_timer64_Timer_Module_State_0_gctrl__A)
00800d60 00000080 app_pe66.oe66 (.fardata:ti_sysbios_timers_timer64_Timer_Module_State_0_handles__A)
00800de0 00000080 app_pe66.oe66 (.fardata:ti_sysbios_timers_timer64_Timer_Module_State_0_intFreqs__A)
00800e60 00000080 ti.drv.uart.ae66 : UART_soc.oe66 (.fardata:uartInitCfg)
00800ee0 00000050 app_pe66.oe66 (.fardata:ti_sysbios_timers_timer64_Timer_Object__table__V)
00800f30 00000048 ti.drv.i2c.profiling.ae66 : I2C_soc.oe66 (.fardata:i2cInitCfg)
00800f78 00000040 app_pe66.oe66 (.fardata:ti_sysbios_gates_GateMutex_Object__table__V)
00800fb8 00000030 app_pe66.oe66 (.fardata:ti_sysbios_knl_Swi_Object__table__V)
00800fe8 00000018 app_pe66.oe66 (.fardata:ti_sysbios_family_c64p_Hwi_Object__table__V)
00801000 00000018 app_pe66.oe66 (.fardata:ti_sysbios_heaps_HeapMem_Object__table__V)
00801018 00000014 app_pe66.oe66 (.fardata:ti_sysbios_family_c66_tci66xx_CpIntc_Module_State_0_initSIER__A)
0080102c 00000004 rts6600_elf.lib : _lock.obj (.fardata:_lock)
00801030 00000010 ti.csl.ae66 : csl_cpsgmii.oe66 (.fardata:cpsgmiiPortBaseAddr)
00801040 00000010 app_pe66.oe66 (.fardata:ti_sysbios_family_c66_tci66xx_CpIntc_Module_State_0_controller__A)
00801050 00000010 app_pe66.oe66 (.fardata:xdc_runtime_HeapMin_Object__table__V)
00801060 00000010 app_pe66.oe66 (.fardata:xdc_runtime_System_Module_State_0_atexitHandlers__A)
00801070 0000000c rts6600_elf.lib : exit.obj (.fardata)
0080107c 00000004 : _lock.obj (.fardata:_unlock)
00801080 00000008 app_pe66.oe66 (.fardata:ti_sysbios_hal_Hwi_Object__table__V)
00801088 00000004 app_pe66.oe66 (.fardata:ti_sysbios_gates_GateHwi_Object__table__V)
0080108c 00000004 --HOLE--
00801090 00000004 app_pe66.oe66 (.fardata:ti_sysbios_knl_Task_Module_State_0_idleTask__A)
.far 0 00801098 0001e5e8 UNINITIALIZED
00801098 00018000 (.common:ti_sysbios_heaps_HeapMem_Instance_State_0_buf__A)
00819098 000042c0 (.common:mask)
0081d358 00002000 app_pe66.oe66 (.far:taskStackSection)
0081f358 00000200 (.common:xdc_runtime_SysMin_Module_State_0_outbuf__A)
0081f558 00000084 (.common:UartObjects)
0081f5dc 00000004 --HOLE--
0081f5e0 0000004c (.common:I2cObjects)
0081f62c 00000004 --HOLE--
0081f630 00000020 (.common:dropletData)
0081f650 00000020 (.common:output)
0081f670 00000008 (.common:parmbuf)
0081f678 00000008 (.common:uart_stdio)
I can not figure out what's going on. Would you please help.
Thanks.