BSP configuration file and generated download

xiaoxiao2021-03-06  78

BSP configuration file and generated download

VxWorks BSP main configuration file config.h and makefile annotations

Related Contents Refer to VxWorks BSP and Startup Process

Config.h

/ * This File Contains The Configuration Parameters for the CPU Evaluation Board. * /

#ifndef inconfigh # Define Inconfigh

/ * BSP Version / Revision Identification, Before configall.h * / # define bsp_ver_1_2 1 # define bsp_ver_1_1 1 # define bsp_version "1.2" / * a tornado 2.0 bsp * / # define bsp_rev "/ 3" / * 0 for first revision * /

#include "configall.h" / * This file defines all the default settings for VxWorks * /

/ ** Define ONE of the following to specify the revision of the PPC405GP chip * you are using. Undefine all others. SysModel () will return * "Unknown processor" if the correct selection is not made. * /

/ ** Default boot line * /

/ *

Explanation: This line is very important to configure the network, connect Target Server and download debugging procedures.

Default_boot_line is to design without NVRAM's target, so that users do not need to be manually entered manually at each system startup.

XXXendLoad () explains this line when the system starts the network and load it according to the definition of this line.

EMAC (0,0): Start the device, but the device name, such as floppy disk, hard disk, PCMCIA card, etc.

FD is a floppy disk, (0, 0) represents the first floppy drive, 3.5 inch disk. DC indicates starting from the DEC 21x4x chip, that is, the system has NVRAM existence, this way is now not used .lpci indicates the startup device to 3Com Etherlink XL PCI NIC. FEI: Intel 82559 EtherExpress NIC. Nene: NE2000 NIC ELT: 3COM Ethernet Card EEX: Intel NIC ATA: ATA / IDE hard disk .........

405GP: Host Name VxWorks Loaded from Host VxWorks File H = 172.16.1.159 Host IP Address

E = 172.16.254.52 Target machine IP address, if the network starts Target Server, this IP must match the Target IP address configured on the host, and set the back end option for wdbrpcu = xxx username, PW = xxx password: If you load debugged from the network, the username and password of the host's FTP server and the target machine must be the same TN = VXTARGET target name.

* /

#define default_boot_line / "EMAC (0) 405GP: vxWorks h = 172.16.1.159 E = 172.16.254.52 / u = xxx pw = xxx tn = vXTarget

/ ** Memory settings. * If you define local_mem_autosize, the size of the SDRAM will specify when boot * /

#undef LOCAL_MEM_AUTOSIZE / * runtime memory size * / # define LOCAL_MEM_SIZE 0x02000000 / * 32MB memory default * / # define LOCAL_MEM_LOCAL_ADRS 0x00000000 / * memory base address 0 * / # define USER_RESERVED_MEM 0 / * see sysMemTop () * // * * Define SDRAM_ECC_ENABLE to enable ECC if an ECC SDRAM DIMM is detected * during SDRAM auto-configuration. If not defined, ECC will not be enabled * if an ECC SDRAM DIMM is detected, and the DIMM will be used as a normal DIMM. * /

#undef sdram_ecc_enable

/ * Interpretation: Here mainly sets the memory allocation definition of the system. If it is assigned, the system does not load and run normally.

ROM_TEXT_ADRS, ROM_SIZE, RAM_HIGH_ADRS, and RAM_LOW_ADRS are defined in config.h and makefile files, and must be consistent, and the definition of these addresses must be made to the VxWorks loading execution process, the hardware manual, MMU, and VxWorks. Main principle It is guaranteed that VxWorks Image has certain running spaces in ROM and RAM and efficiently runs, see VxWorks BSP and startup procedures.

* / # Define ROM_BASE_ADRS 0xfff80000 / * ROM base address * / # define ROM_TEXT_ADRS (ROM_BASE_ADRS 0x100) / * program pointer and stack pointer * / # define ROM_WARM_ADRS (ROM_TEXT_ADRS 0x0004) / * Hot Start entry address * / # define ROM_SIZE 0x0007F000 / * ROM size 512kb * / # define RAM_LOW_ADRS 0X00010000 / * RAM low address run vxworks * / # define RAM_HIGH_ADRS 0X00C00000 / * RAM High Address Storage Bootrom * / # define user_reserved_mem 0 / * user retention address * /

/ ** Cache Options Definition Cache * /

#define incrude_cache_support

#define user_d_cache_enable # define user_i_cache_enable # undef user_d_cache_mode # define user_d_cache_mode (cache_copyback)

/ ** 405 TIMERS (Pit, Fit, WDT) can be driven by external clock or CPU drive * /

#define Timer_Clock_External

/ ** Optional TimeStamp Support * /

#undef incrude_timestamp

/ *** Auxilliary Timer Rate defines auxiliary timer frequency * /

#ifdef TIMER_CLOCK_EXTERNAL # define AUX_CLK_RATE_MIN (EXT_TIMER_CLK_FREQ / (1 << 21)) #define AUX_CLK_RATE_MAX (EXT_TIMER_CLK_FREQ / (1 << 9)) #define AUX_CLK_RATE_DEFAULT (EXT_TIMER_CLK_FREQ / (1 << 17)) #else

/ * ZZZZZZZZZ TODO PUT RATES IN for System Clock Derived Timer Clock * /

#ENDIF

/ ** watchdog timer rats * / # define wdt_rate_min 1 / * minimum Watchdog Timer Rate * / # define WDT_RATE_MAX 5000 / * Maximum Watchdog Timer Rate * /

/ * Real-time clock setting * /

#define incrude_rtc

/ * Remove unwanted network driver * /

#undef incrude_ei # undef incrude_ex # undef incrude_enp # undef incrude_ln # undef incrude_sm_net # undef incrude_sm_seq_addr

/ * #define for software floating point support * /

#undef include_sw_fp

/ * Defines the serial port control * /

#define incrude_serial

/ * PCI setting, PCI Configuration * /

#define incrude_pci

#ifdef INCLUDE_PCI / ** Three programmable processor local memory address to PCI memory address * mappings. If a region is enabled, PMMx_LOCAL_ADRS must be between * PCI_MEMORY_START and PCI_MEMORY_END. If PMMx_PCI_HIGH_ADRS is non-zero in * an enabled region, 64 bit dual cycle Addresses Will Be generated on the * pci bus for this region. * /

/ / Define the initialization address of the PCI device to see the PCI device (NIC) initialization code analysis

# Define PMM0_LOCAL_ADRS PCI_MEMORY_START // start address of the PCI space defined # define PMM0_PCI_LOW_ADRS 0x80000000 // define low PCI address space # define PMM0_PCI_HIGH_ADRS 0x00000000 // define high PCI address space # define PMM0_PCI_MASK_ATTRIB (PMM_MASK_512MB | PMM_ENABLE)

# define pmm1_local_adrs pmm_unused # define pmm1_pci_low_adrs pmm_unused # define pmm_pci_high_adrs pmm_unused # define pmm1_pci_mask_attrib PMM_UNUSED

# define pmm2_local_adrs pmm_unused # define PMM2_PCI_LOW_ADRS PMM_UNUSED # Define PMM2_PCI_High_adrs PMM_UNUSED # define PMM2_PCI_Mask_attrib PMM_UNUSED

/ ** PCI memory address to processor local memory address mapping. If a region * is enabled, PTMx_LOCAL_ADRS must be within the two Local memory / peripheral * regions (0x00000000-0x7FFFFFFF, or 0F0000000-0xFFFFFFFF) * / # define PTM1_LOCAL_ADRS LOCAL_MEM_LOCAL_ADRS # define PTM1_SIZE_ATTRIB PTM_SIZE_2GB | PTM_ENABLE

# define ptm2_local_adrs PTM_UNUSED # define ptm2_size_attrib PTM_UNUSED # Endif / * Include_PCI * /

/ ** If you support the network, local EMAC and PCI network card, you must have a selected, both of them drive * / # deflude_network / * support network * / # deflude_emac_network / * 405GP local EMAC network * / # undef INCLUDE_PCI_Network / * PCI network * /

/ ** The board does NOT HAVE The Ethernet Mac Address of the Ethernet Mac Address of the Emac Stored * in Any Sort of nvram. Modify the 12 Digit String Below to match the decal * That is on your board. * /

#ifDef incrude_emac_network # define default_emac_hw_addr "xxxxxxxxxxxx" / * Network hardware address, MAC address * / # ENDIF

/ ** WDB loads the debugger via the Network ENHANCED NETWORK DRIVER. If the network is loaded debugging, this item must be defined * /

#define WDB_COMM_TYPE WDB_COMM_SERIAL / * First by default, serial communication * / #define wdb_tty_channel 0 / * use the first serial port

#ifdef INCLUDE_NETWORK # define INCLUDE_END # undef WDB_COMM_TYPE # define WDB_COMM_TYPE WDB_COMM_END / * define a communication network, driving the END * / # else # undef WDB_COMM_TYPE # define WDB_COMM_TYPE WDB_COMM_SERIAL / * define serial communication, and the PC serial port * / #undef WDB_TTY_CHANNEL # define WDB_TTTTY_CHANNEL 0 / * Serial 1 * / # Endif / * Include_Network * /

/ *************** Refine some miscellaneous * /

#ifdef num_tty # undef num_tty # Endif # define num_tty 2 / * Defines two serial terminals, * /

#ifdef wdb_tty_baud # undef wdb_tty_baud # endif # define WDB_TTY_BAUD 57600 / * baud rate set 9600, 19200, 38400, 57600, 115200 * /

#ifdef console_baud_rate # undef console_baud_rate # endif # Define console_baud_rate 57600

#undef INCLUDE_ENV_VARS / * unix compatable environment variables * / # undef INCLUDE_TIMEX / * timexLib for exec timing * / # undef INCLUDE_HW_FP # undef INCLUDE_TFTP_CLIENT / * used by autoboot from ftp server * /

#define INCLUDE_SW_FP # define INCLUDE_ELF # define INCLUDE_NET_SHOW # define INCLUDE_PING # undef INCLUDE_DEMO / * only for vxWorks bsp test * / # define ETHERNET_ADR_SET / * only for bootrom used * / # define INCLUDE_USER_APPL / * Startup the user's application in dos makefile project * / #undef pcidebug # ifdef incrude_user_Appl # define user_appl_init _appenTry () # Endif

#ENDIF / * Incconfigh * / # if defined (prj_build) #include "prjparams.h" #ENDIF

Makefile

# Makefile - Make Rules for Board ## * /

CPU = PPC40XTOOL = GNU

TGT_DIR = $ (Wind_Base) / TargetInClude $ (TGT_DIR) /H/make/defs.bspinclude $ (TGT_DIR) / H / Make / Make. $ (CPU) $ (TGT_DIR) / h / make / defs $ (Wind_host_type)

## Only Redefine make Definitions Below this point ## be overwritten by the makefile stubs.

Target_dir = xxxvendor = IBMBOARD = xxx

Release = vxworks vxworks.st bootrom_uncmp.hex

USR_ENTRY = USRINIT

# ROM_TEXT_ADRS, ROM_SIZE, RAM_HIGH_ADRS, and RAM_LOW_ADRS in config.h, makefile and makefile. * Document # # 文件 # # # #,

ROM_TEXT_ADRS = FFF80100 # ROM start address rom_size = 0007f000 # ROM space size

RAM_LOW_ADRS = 00010000 # RAM low address vxworks * / ram_high_adrs = 00C00000 # RAM High Address Storage Bootrom * /

HEX_FLAGS = -a 100

#Added_cflags = -gdwarf -O0 # for debug

Mach_extra = appentry.o # Note: User's program module is loaded here, program calls in usrroot ()

Bootconfig = bootconfig.c # BSP bootconfig.c for bootrom

## Only Redefine Make Definitions Above this Point, or the expansion of ## makefile target dependencies may be incorrect.

INCLUDE $ (TGT_DIR) /H/make/rules.bspinclude $ (TGT_DIR) / h / make / rules. $ (wind_host_type)

The generation of BSP, download and TARGET Server configuration instance, Pentium host, 3com network card, floppy disk boot, FTP, and FTP, FTP, FTP, FTP, FTP, FTP, FTP, FTP.

1. Modify the BSP file config.h in the C: / Tornado / Target / Config / PCPENTIUM directory. #elif (CPU_VARIANT == Pentium) #define default_boot_line "ELT (0, 0) Host: c: // tornado // target // config // pc PcPENTIUM / / VXWORKS H = 90.0.0.3 E = 90.0.0.50 u = target PW = target tn = target "

#DEFINE INCLUDE_ELT / / 3COM NT #DEfine include_end // END driver

2. Open Tornado Select New Bootable VxWorks Image, select Construction A BSP, select PCPENTIUM, and compile it to generate a vxworks image file in the appropriate directory.

3. Make bootrom; choose Build Boot ROM, select PCPENTIUM, select bootrom_uncmp, generate bootrom_uncmp. Copy BootRom_uncmp to Host / X86-Win32 / BIN, insert the blank disk to the soft area, enter the directory host / x86-win32 / bin in the DOS interface, use the command "mkboot a: bootrom_uncmp" to generate a boot disk

4. In Start> Programs> Tornado2> FTP Server, click the USER / RIGHTS menu under Security, create new users User name: target, password: target, Home Directory for the VxWorks image is located, such as C: / Tornado / Target / Config / PcPentium /. Note These configurations are consistent with config.h.

5. Insert the bootrom's boot disk into the target machine's floppy drive, start the target machine, start from the floppy drive, then log in to the FTP, download the vxworks file from the host, the target machine prompts in 7 seconds, press any key to select Boot mode (manual, automatic), Handmade modifications can be modified for FTP users, passwords, IPs. It is usually waiting for 7 seconds after system autoboot.

screen display:

Attached TCP / IP Interface To Elt0.attaching Network Interface LO0 ... DONE. // TCP / IP network connection success

Loading ... 602128 // Download the vxWorks image through the FTP STARTING AT 0x01080000 // Download Successfully, start the VxWorks system from RAM_LOW_ADRS 0x01080000

Attached TCP / IP Interface To Elt Unit 0attaching Interface LO0 ... DONE / / TCP / IP network connection success (note that the network is initialized in success and the upper side, the upper side is the BootROM image network initialization to download VxWorks, here the VxWorks system initializes the network. )

Vxworks

Copyright 1984-1998 Wind River Systems, Inc.

CPU: XXXX --- Intel X82 VXWORKS: 5.4Bsp Version: 1.2 / 4Creation Date: Jan XX 2001wDB: Ready.

The target machine system is started.

6. Configure Target Server to download the application.

转载请注明原文地址:https://www.9cbs.com/read-121830.html

New Post(0)