Hi there,
My original problem is that my code section is nearing the 64Kbyte mark. I'm trying to add some code that is about 160 bytes and the linker complains. When I review the map file, I see that there is room for the sysinit section but the problem is that the hwi_vec section leaves a large gap between itself and the bios section. the linker then tries to place the sysinit section next but the 64K mark is exceeded. I looked at the cmd file and it has the following:
.hwi_vec: {
HWI_A_VECS = .;
*(.hwi_vec)
} align = 0x400 > CODE_ROM
I do not remember why the 0x400 value was used. It was provided by Tim Harron (SR #1-629511745, Aug 18/09 email attachment, in the bootcfg.cmd file). Can it be made smaller? Or could I add something to the cmd file so that the sysinit section follows the bios section? That may allow the hwi_vec to leave a gap but still fit.
Here is the map file before I add my code:
.text 0 00003000 00009fc0 00003000 000013c0 tcdplsrcnt.obj (.text) 000043c0 000013c0 tcdpsendxxxmsg.obj (.text) 00005780 00000ee0 tcdpeeprom.obj (.text) 00006660 00000ba0 tcdpfpga.obj (.text) 00007200 00000ae0 tcdprxdac.obj (.text) 00007ce0 00000900 tcdpprcscmd.obj (.text) 000085e0 00000780 tcdpisr.obj (.text) 00008d60 00000720 tcdpeeputil.obj (.text) 00009480 00000700 tcdplaser.obj (.text) 00009b80 000006e0 tcdpuart.obj (.text) 0000a260 00000600 tcdpmsghandler.obj (.text) 0000a860 00000500 tcdpmain.obj (.text) 0000ad60 000004e0 tcdputil.obj (.text) 0000b240 00000380 tcdptimer.obj (.text) 0000b5c0 00000320 rts6700.lib : frcdivd.obj (.text:__frcdivd) 0000b8e0 00000280 : divd.obj (.text:__divd) 0000bb60 00000240 : log.obj (.text:_log) 0000bda0 00000240 : memcpy62.obj (.text:_memcpy) 0000bfe0 000001a0 : divf.obj (.text:__divf) 0000c180 00000160 csl6701.lib : csl_timer.obj (.text:_TIMER_open) 0000c2e0 00000160 : csl.obj (.text:__CSL_init) 0000c440 00000160 rts6700.lib : frexp.obj (.text:_frexp) 0000c5a0 00000120 csl6701.lib : csl_timer.obj (.text:_TIMER_reset) 0000c6c0 00000120 : csl_irq.obj (.text:_mux2Tables) 0000c7e0 00000100 rts6700.lib : frcdivf.obj (.text:__frcdivf) 0000c8e0 000000e0 : modf.obj (.text:_modf) 0000c9c0 000000c0 : fixfu.obj (.text:__fixfu) 0000ca80 000000c0 csl6701.lib : csl_irq.obj (.text:_getMux) 0000cb40 00000080 : csl_emif.obj (.text:_EMIF_config) 0000cbc0 00000080 : csl_timer.obj (.text:_TIMER_close) 0000cc40 00000080 : csl_irq.obj (.text:__IRQ_init) 0000ccc0 00000060 tcdpdelay.obj (.text) 0000cd20 00000060 csl6701.lib : csl_timer.obj (.text:_TIMER_config) 0000cd80 00000060 rts6700.lib : ceil.obj (.text:_ceil) 0000cde0 00000040 csl6701.lib : csl_irq.obj (.text:_IRQ_enable) 0000ce20 00000040 : csl_irq.obj (.text:_IRQ_resetAll) 0000ce60 00000040 : csl_timer.obj (.text:_TIMER_start) 0000cea0 00000040 ErtSwcfg_csl.obj (.text:cslCfgInit) 0000cee0 00000020 csl6701.lib : csl_irq.obj (.text) 0000cf00 00000020 : csl.obj (.text:_CSL6701_LIB_) 0000cf20 00000020 : csl_irq.obj (.text:_IRQ_globalDisable) 0000cf40 00000020 : csl_irq.obj (.text:_IRQ_globalEnable) 0000cf60 00000020 rts6700.lib : _lock.obj (.text:__nop) 0000cf80 00000020 : _lock.obj (.text:__register_lock) 0000cfa0 00000020 : _lock.obj (.text:__register_unlock) .bios 0 0000cfc0 000027e0 0000cfc0 00000520 bios.a67 : swi.o67 (.bios) 0000d4e0 00000440 : hwi_disp_asm.o67 (.bios) 0000d920 000002c0 : sem_pend.o67 (.bios) 0000dbe0 000002a0 : knl_run.o67 (.bios) 0000de80 00000260 : knl_tick.o67 (.bios) 0000e0e0 00000200 : sem_dopo.o67 (.bios) 0000e2e0 00000200 : tsk_setu.o67 (.bios) 0000e4e0 000001c0 : knl_swit.o67 (.bios) 0000e6a0 000001c0 biosC6000.a67 : clk.o67 (.bios) 0000e860 000001a0 bios.a67 : tsk_exit.o67 (.bios) 0000ea00 00000180 : autoinit.o67 (.bios) 0000eb80 00000140 : tsk_stup.o67 (.bios) 0000ecc0 00000140 : knl_chec.o67 (.bios) 0000ee00 000000e0 : knl_exit.o67 (.bios) 0000eee0 000000e0 : sem_post_asm.o67 (.bios) 0000efc0 000000e0 : sem_post.o67 (.bios) 0000f0a0 000000c0 : knl_post.o67 (.bios) 0000f160 000000c0 : lck.o67 (.bios) 0000f220 000000c0 : sys_exit.o67 (.bios) 0000f2e0 000000c0 : knl_ipos.o67 (.bios) 0000f3a0 00000080 : sts.o67 (.bios) 0000f420 00000080 : fxn.o67 (.bios) 0000f4a0 00000080 : log.o67 (.bios) 0000f520 00000060 : utl_putc.o67 (.bios) 0000f580 00000060 : sys_abor.o67 (.bios) 0000f5e0 00000060 : sem_pend_counting.o67 (.bios) 0000f640 00000060 : hwi_c.o67 (.bios) 0000f6a0 00000040 : utl_doab.o67 (.bios) 0000f6e0 00000020 : gbl_vers.o67 (.bios) 0000f700 00000020 : utl_doer.o67 (.bios) 0000f720 00000020 : sts_set.o67 (.bios) 0000f740 00000020 : fxn_c.o67 (.bios) 0000f760 00000020 : idl.o67 (.bios) 0000f780 00000020 : utl_halt.o67 (.bios) .hwi_vec 0 0000f800 00000200 0000f800 00000200 ErtSwcfg.obj (.hwi_vec) .sysinit 0 0000fa00 00000420 0000fa00 000001e0 ErtSwcfg.obj (.sysinit) 0000fbe0 000000e0 bios.a67 : mem_init.o67 (.sysinit) 0000fcc0 000000c0 : boot.o67 (.sysinit) 0000fd80 00000080 : tsk_init.o67 (.sysinit) 0000fe00 00000020 : obj_init.o67 (.sysinit)