Академический Документы
Профессиональный Документы
Культура Документы
13
Reconfiguring
VxWorks
Production Issues
VxWorks Start-Up
Overview
After development is completed, you may need to:
Exclude unneeded VxWorks facilities.
Link application code into VxWorks.
Extend VxWorkss start-up code to spawn
application tasks.
Final application may be:
Linked with VxWorks and put into ROM or flash.
Downloaded from host over a network.
Loaded from a local disk.
Compressed 0
3.
VxWorks
bootstrap data
1. bootstrap data
RTA bootstrap text RAM_HIGH_ADRS
STACK_SAVE
RBA
RAM_LOW_ADRS
RESERVED
LOCAL_MEM_LOCAL_ADRS LMLA
Compressed 3.
Boot Program
Decompressed
bootstrap data Boot Program 0 2. Zero RAM
RBA
1.
bootstrap data
RTA = ROM_TEXT_ADRS
RBA = ROM_BASE_ADRS bootstrap text
RAM_LOW_ADRS
STACK_SAVE
RESERVED
LOCAL_MEM_LOCAL_ADRS LMLA
The above slide refers to the standard compressed boot program image
bootrom. Other boot images are provided: bootrom_uncmp is an
uncompressed bootrom image, while bootrom_res is ROM-resident.
The bootstrap portion of the standard bootrom program copies itself
and its data into RAM at RAM_LOW_ADRS, zeroes some other RAM on a
cold reboot, and then decompresses the primary boot program from
ROM into RAM at RAM_HIGH_ADRS. After doing so, it jumps to the
entry point of the decompressed boot program. At this point the
bootstrap portion in RAM is no longer needed.
RAM_LOW_ADRS and RAM_HIGH_ADRS are defined in
wind/target/config/bspName/Makefile and in
wind/target/config/bspName/config.h.
Standard bootrom Program, B
LMLA +
USER_RESERVED_MEM LOCAL_MEM_SIZE
Local Storage
Decompressed
Boot Program
RAM_HIGH_ADRS
FREE_RAM_ADRS
Downloaded
VxWorks Image
RAM_LOW_ADRS
Initial Stack
Network
RESERVED
LOCAL_MEM_LOCAL_ADRS LMLA
The boot program obtains boot parameters from nonvolatile RAM, from
the user, from a service such as DHCP or BOOTP, or from the default
boot line.
It then downloads VxWorks from the network or from some local
storage device such as a disk. The downloaded image is loaded into
RAM at RAM_LOW_ADRS; the top of the image is called FREE_RAM_ADRS.
After downloading VxWorks, the boot program jumps to the sysInit()
entry point (located at RAM_LOW_ADRS) of the downloaded image.
From this point, the boot program code and data may be overwritten.
Rebuilding Boot ROMs
If system image is large, downloading will overwrite
the booting code, which may fail while printing:
Loading... 400316 + 28744 + 23852
Need to increase RAM_HIGH_ADRS in:
wind/target/config/bspName/config.h
wind/target/config/bspName/Makefile
The Project facility configuration for the bootable
VxWorks project.
New ROMs are also required to boot from a local disk,
or other boot devices not configured by default into the
boot program.
The last line of a vxWorks build displays the sizes of the text, data, and
bss sections of the built image, and shows also how much margin
remains between the end of the bss and RAM_HIGH_ADRS. So you dont
have to wait for the download to fail to know that it will do so!
You may also use the project facility or your compiler Toolkits sizeArch
command to determine the size of your VxWorks images and other
modules.
The maximum size of a downloadable system image for your
architecture is RAM_HIGH_ADRS - RAM_LOW_ADRS.
Traditional VxWorks Configuration
The traditional VxWorks configuration mechanism is
required for configuring boot ROMs and still available
for other builds.
Edit target/config/bspName/config.h to configure
VxWorks.
Define the INCLUDE_xxx macro for a component to
include it.
Define the values of other parameter macros.
Many defaults are defined in target/config/all/
configAll.h, and may need to be redefined.
Build VxWorks or boot ROM using Makefile in BSP
directory, e.g. make bootrom.
It is recommended that one keep a pristine copy of ones BSP with its
original configuration. One may copy a BSP to a folder with a different
name under target/config/, and make changes in that.
Most changes made to a BSPs configuration by editing config.h only
affect builds done in the project facility when one creates a new
bootable project from the BSP after reconfiguring it; the new project
would be created starting with the new BSP configuration.
Normal use of the project facility will not modify a BSP. Of course, if
you edit the BSP files sysLib.c, sysALib.s, or romInit.s which are
referenced by the project, you are modifying these files in the BSP, and
the modifications will be seen in any project based on the BSP.
The Build => Build Boot ROM... menu item allows one to do a traditional
build of a boot ROM target from the Windows GUI.
Redundant Address Parameters
The following macros are defined in: 1. The bootable
project build spec; 2. bspName/config.h; and 3. bspName/
Makefile.
RAM_LOW_ADRS
RAM_HIGH_ADRS