Tornado compiling VxWorks Essence and process

Source: Internet
Author: User
Tags builtin snmp win32
2013-07-25 17:10 3349 People read review (0) Favorite Report

Directory (?) [-] Essentially executes the CONFIGGENTCL script to compile the project file and generate Prjobjslst link the project file generated O and static link libraries to execute the MUNCHTCL script to generate the symbol table file SYMTBLC and compile the compilation DATASEGPADC Link Birth to VxWorks detect VxWorks size is out of bounds 0 essence

Tornado compilation actually executes the makefile under the project, and the compiled chain used is the GNU GCC. As tested, directly executing make in the DOS command line can be compiled (add the path Make.exe in tornado to the environment variable, such as C:\Tornado2.2\host\x86-win32\binTornado\host\ X86-win32\bin is the path to the Tornado executable program, so that the path to the makefile file is found in the DOS interface and can be compiled using the Make command.

The GCC compilation options are first referenced in the GCC Chinese Manual (downloaded), and the special can be found in the GNU support in Tornado Docs docs. 1 Execute CONFIGGEN.TCL script

WTXTCL D:\TORNADO2.0\HOST\SRC\HUTILS\CONFIGGEN.TCL D:\Tornado2.0\target\proj\TC1600A\TC160

0a.wpj

After executing the script, generate the file: LINKSYMS.C, PrjComps.h, PRJCONFIG.C, prjParams.h

Question: Why did the config.h and configall.h changes have no effect after the project was established?

When building the project in tornado, the configuration information of the component is recorded in the XXX.WPJ project file, and the component configuration information in the XXX.WPJ file is modified when the component is added or removed in tornado;

The prjconfig.c file is important, and it is the project configuration file that is generated from the user-configured component, and the relationship to the USRCONFIG.C:

Bootrom compiled Bootconfig,

1 I6}1 ' 1 o& wvxworks command-line compilation usrconfig.c,

0 R (@4 L + C7 V5 x) U1 r# ~vxworks Integrated Environment (Tornado2.2) Compile prjconfig.c

LINKSYMS.C is a collection of symbolic information; 2 compiling the project file and generating the Prjobjs.lst

Ccppc-g-mcpu=860-ansi-nostdinc-fvolatile-fno-builtin-fno-for-scope-p-X assembler-

With-cpp-id:\tornado2.0\target\proj\tc1600a-id:\tornado2.0\target\config\tc1600a-id:\to

Rnado2.0\target\h-id:\tornado2.0\target\config\comps\src-id:\tornado2.0\target\src\drv-

Dcpu=ppc860-dprj_build-c D:\Tornado2.0\target\config\TC1600A\sysALib.s-o SYSALIB.O

Vxrm D:\Tornado2.0\target\proj\TC1600A\prjObjs.lst

Generating D:\Tornado2.0\target\proj\TC1600A\prjObjs.lst ...

PRJOBJS.LST lists the user works. o File

3 Link up the. O and static link libraries generated by the project files

Ccppc-bd:\tornado2.0\host\x86-win32\lib\gcc-lib\-nostdlib-r-wl,-x \

-wl,@d:\tornado2.0\target\proj\tc1600a\prjobjs.lst VERSION.O D:\Tornado2.0\target\li

B\libppc860gnuvx.a-o PARTIALIMAGE.O

Note: Prjobjs.lst is all works. o directory; libppc860gnuvx.a is ppc860 static library file; PARTIALIMAGE.O is a linked file.

4 Execute MUNCH.TCL script

NMPPC PARTIALIMAGE.O @d:\tornado2.0\target\proj\tc1600a\prjobjs.lst | WTXTCL D:\Tornado2.0

\host\src\hutils\munch.tcl-asm PPC > Ctdt.c

The script makes initialization in PARTIALIMAGE.O prior to engineering. O, which makes the initialization of the VxWorks system level more than the initialization of the user.

5 generating the symbol table file symtbl.c and compiling

Copy PARTIALIMAGE.O TMP.O

1 files have been copied.

D:\TORNADO2.0\HOST\X86-WIN32\BIN\MAKESYMTBL PPC TMP.O > SYMTBL.C

Ccppc-c-fdollars-in-identifiers-g-mcpu=860-ansi-nostdinc-drw_multi_thread-d_reentr

Ant-fvolatile-fno-builtin-fno-for-scope-id:\tornado2.0\target\proj\tc1600a-id:\tornad

O2.0\target\proj\tc1600a\alarmtask-id:\tornado2.0\target\proj\tc1600a\approot-id:\tornad

O2.0\target\proj\tc1600a\datar_manager-id:\tornado2.0\target\proj\tc1600a\eos-id:\tornad

O2.0\target\proj\tc1600a\fomux_sm-id:\tornado2.0\target\proj\tc1600a\hdlcctrl-id:\tornad

O2.0\target\proj\tc1600a\lcdctrl-id:\tornado2.0\target\proj\tc1600a\snmp-id:\tornado2.0\

Target\proj\tc1600a\smagent-id:\tornado2.0\target\proj\tc1600a\rtl8366sr-id:\tornado2.0\

Target\proj\tc1600a\testctrl-id:\tornado2.0\target\config\tc1600a-id:\tornado2.0\target\

H-id:\tornado2.0\target\h\snmp-id:\tornado2.0\target\config\comps\src-id:\tornado2.0\ta

Rget\src\drv-dcpu=ppc860-dprj_build Symtbl.c-o SYMTBL.O

6 Compiling DATASEGPAD.C

Ccppc-g-mcpu=860-ansi-nostdinc-drw_multi_thread-d_reentrant-fvolatile-fno-builtin

-fno-for-scope-id:\tornado2.0\target\proj\tc1600a-id:\tornado2.0\target\proj\tc1600a\ala

Rmtask-id:\tornado2.0\target\proj\tc1600a\approot-id:\tornado2.0\target\proj\tc1600a\dat

Ar_manager-id:\tornado2.0\target\proj\tc1600a\eos-id:\tornado2.0\target\proj\tc1600a\fom

Ux_sm-id:\tornado2.0\target\proj\tc1600a\hdlcctrl-id:\tornado2.0\target\proj\tc1600a\lcd

Ctrl-id:\tornado2.0\target\proj\tc1600a\snmp-id:\tornado2.0\target\proj\tc1600a\smagent

-id:\tornado2.0\target\proj\tc1600a\rtl8366sr-id:\tornado2.0\target\proj\tc1600a\testctrl

-id:\tornado2.0\target\config\tc1600a-id:\tornado2.0\target\h-id:\tornado2.0\target\h\s

Nmp-id:\tornado2.0\target\config\comps\src-id:\tornado2.0\target\src\drv-dcpu=ppc860-d

Prj_build-c D:\TORNADO2.0\TARGET\CONFIG\COMPS\SRC\DATASEGPAD.C

The file requested a page to protect the code snippet, as detailed in the comments inside the file description

7 chains delivered to VxWorks

Ldppc-x-n-e _sysinit-ttext 00010000 \

DATASEGPAD.O partialimage.o CTDT.O Symtbl.o-o vxWorks

8 Detect if VxWorks size is out of bounds

D:\Tornado2.0\host\x86-win32\bin\vxsize ppc-v 00200000 00010000 vxWorks

vxworks:1333300 (t) + 322020 (d) + 210668 (b) = 1865988 (165628 unused)

Where 0x00200000 is the memory of the high ram_high_adrs;0x00010000 is the memory low address Ram_low_adrs, and the VxWorks image is downloaded to the low address and high address, so the VxWorks size can not be greater than 0x00200000- 0x00010000 = 0x001f0000.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.