TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320C6678: "_c_int00" address: 0c057aa0 在MSM

Part Number:TMS320C6678

工程是基于bios的,map文件中显示如下:

"_c_int00"  address: 0c057aa0 表示程序入口在MSM中吗?

我看其他的工程这个地址都是在L2SRAM中,而且在固化的时候这个地址要转换成各个核的全局地址。

那么此处的地址0c057aa0在固化的时候也需要这么转一下吗?好像也没有对应的全局地址吧?

请大佬指点一下,谢谢!

Shine:

是的,_c_int00表示程序入口地址,0c057aa0表示程序入口地址在MSM中,8个核都可以访问MSM,没有全局地址。

,

user6501245:

为什么有的工程的入口地址是在L2SRAM中,请问这是由什么决定的呢?

,

Shine:

可以看一下cmd文件里分配到哪里?请看附件的wiki网站上的说明。If you are using SYS/BIOS, system start up and initialization is handled by XDCtools. For some targets, the c_int00 code is a C function. The C code is compiled with the "-mo" flag which places the symbol _c_int00 in a subsection of .text (.text:_c_int00).accessing _c_int00.txt

Accessing c int00Contents [hide]1 Introduction
2 Retrieving the c_int00Address
3 Setting the c_int00 Addressto a Fixed Location 3.1 UsingDSP/BIOS
3.2 UsingSYS/BIOS
3.3 Not using SYS/BIOS orDSP/BIOS4 Related information and forumpostsIntroduction[edit]_c_int00 is the name of the symbol of the C environment entry point. Sometimes it is necessary to obtain this address (e.g., to reset the software) or even to set c_int00 address to a fixed location (so that the host that is booting the processor can make it jump to that location). This page describes how to achieve that.Retrieving the c_int00 Address[edit]If you need to retrieve the address of c_int00 at run time, use the code below as an example:extern void c_int00(void);void main( void )
{void (*x)(void) = c_int00;
}For EABI programs, the symbol's name is _c_int00:extern void _c_int00(void);void main( void )
{void (*x)(void) = _c_int00;
}Setting the c_int00 Address to a Fixed Location[edit]When using an external host to boot the DSP, it might need the c_int00 address to be always the same. The procedures below describe how to achieve that.Using DSP/BIOS[edit]If you are using DSP/BIOS, the symbol _c_int00 is placed in a section named .sysinit.You can create a new memory section and put .sysinit in it.To do that, go to your DSP/BIOS Configuration file (.tcf). At System, right click on MEM – Memory Section Manager and select Insert MEM to create a new section. Adjust the properties of the new section: base, len. You can look in your map file to see the size of the .sysinit section to determine the minimum length that you need to fit it in this memory section that you created. Do not forget to adjust the other memory sections to make sure that they do not overlap each other. So, for example, if you are going to put sysinit in internal memory, reduce the base and len of IRAM if necessary. You can remove the heap in this section by unchecking the option create a heap in this memory. At the bottom of the Properties window, select space: code.After that, right click on MEM – Memory Section Manager and select Properties. In the BIOS Code tab select your new memory section for Startup Code Section (.sysinit).Thus, the linker will always put the c_int00 entry point in the same location.If you not only need the address of c_int00 to be always in the same location, but want to specify that location, you may need to create a custom linker command (.cmd) file that references the DSP/BIOS generated file.To do that, in the tcf file, create a new memory region (for example called RAM4CINT00). Then create your own custom .cmd file containing (example for C5000):-l configcfg.cmd/* name of your original .cmd */SECTIONS {.bootcode: {-lbios.a55L<boot.o55L>(.sysinit)} > RAM4CINT00}This should only put the code for _c_int00 into the new section .bootcode. Don't forget to put the normal .sysinit back to your original memory location.Here's an example for 64x+ core:SECTIONS
{boot > 0x00800000{-l bios.a64P<boot.o64P>(.sysinit)}}In the above example we are pulling in only the code for c_int00 and hard-coding it to a specific address, 0x00800000. This might be helpful on a device such as TMS320C6455 for doing HPI boot which begins executing from address 0x00800000 after the host sends the interrupt to the DSP to begin execution.NOTE: If you you are using a C674x DSP, use a674 and o674. If you are using huge memory model for C5000, use a55H and o55H.Using SYS/BIOS[edit]If you are using SYS/BIOS, system start up and initialization is handled by XDCtools. For some targets, the c_int00 code is a C function. The C code is compiled with the "-mo" flag which places the symbol _c_int00 in a subsection of .text (.text:_c_int00).To place the .text symbol at an explicit address, add a custom linker command (.cmd) file to your project with a directive similar to:SECTIONS {.text:_c_int00 > 0xc3000000}On other targets, the _c_int00 code is written in assembly language. As of XDC 3.24.02, this assembly code is placed in .text and not .text:_c_int00. This will be fixed in a future release of XDC and BIOS. But, until then, the following linker workaround can be applied to place the _c_init00 function. You will have to update your path and library name accordingly. Check your .map file for the name of the boot library, and the generated linker.cmd filed for the full path.boot : > 0x3D8000 PAGE = 0{-l"C:\ti\ccsv5_3_0_00042\xdctools_3_24_02_30\packages\ti\targets\rts2800\lib\boot.a28FP" <boot_cg.o28FP> (.text)}Not using SYS/BIOS or DSP/BIOS[edit]If you are not using DSP/BIOS, you should be able to specify the address using the linker command file. The general idea is to put the boot module (where _c_int00 is defined) into an output section of its own, then allocate that output section to a specific memory address. For example for C5000:boot > 0x1234
{-l rts55.lib<boot.obj>(.text)
}You can change the address 0x1234 to be whatever address that you want to put the code. Probably the start of your RAM would be a good place so that the linker doesn’t have problems allocating other objects around it.NOTE: If you are using a C64x+ DSP, replace rts55.lib with rts64plus.lib. If you you are using a C674x DSP, use rts6740.lib. If you are using huge memory model for C5000, use rts55h.lib.Related information and forum posts[edit]address of _c_int00_c_int00 addressHow to specify an exact address for c_int00?

赞(0)
未经允许不得转载:TI中文支持网 » TMS320C6678: "_c_int00" address: 0c057aa0 在MSM
分享到: 更多 (0)