Some basic concepts of VxWorks

Source: Internet
Author: User
This article is taken from the network and the source is unknown.

1. Difference Between bootrom and boot image, and the connection and difference between Boot Image and VxWorks Image
Bootrom refers to on-chip bootrom, which is embedded with a small bootProgram(Bootloader), similar to the BIOS storage area on the PC motherboard. It is not the same as boot image. The bootrom area in the VxWorks document refers to the location where the boot image is stored.
Boot Image is used to load the VxWorks image to the motherboard. Boot Image only initializes a few hardware systems, such as serial ports and Network Ports. Prepare for loading the VxWorks image. After the Vxworks system is downloaded, the function of the boot image will be completed.
VxWorks image contains the complete Vxworks OS. Is the operating system that truly runs on the target board. The application runs on the Vxworks system.
The difference between Boot Image and VxWorks Image Generation in the use of BSP files is that bootrom calls bootconfig. c In the startup sequence, while VxWorks calls usrconfig. C.

2. How to Run VxWorks in ROM (Compiled together with bootrom or solidified separately into ROM) and allocate memory in Rom?
Load VxWorks to the main board and run it in different cases. If VxWorks is compressed, decompress it to ram_high_adrs of RAM.
If it is Rom based VxWorks, the data segment of the VxWorks image is copied to the local_low_adrs of RAM, and the text part is left in the ROM and executed in the Rom.
Choose not to compress or ROM-based VxWorks and copy it directly to ram_low_adrs for running.

3. If you modify system settings in config. H, such as adding a nic, do you need to re-set bootrom? What if other OEM products are added?
If a boot image exists on the motherboard, you do not need to re-burn it. You can use download, such as FTP, to load VxWorks.

4. How to Implement Task-level and interrupt-level communication in VxWorks System Programming?
Interruption is triggered by hardware. The software only connects the interrupt service routine (ISP) to the interrupt event.
1. Enable interruption, function intenable ().
2. Use intconnect () to register the interrupt number and the corresponding Interrupt Routine ISR.
In this way, once an interruption occurs, the system automatically jumps to the corresponding location to execute ISR.

5. How can I get the bootloader? Can I still use the bootloader of the Development Board if I have made some changes to the Development Board? What is the role of bootloader?
Bootloader is equivalent to the BIOS on the PC motherboard and is the underlying boot software. It initializes the Basic settings of the motherboard and prepares hardware for receiving external programs.
Some bootloaders are already embedded in the CPU. If no bootloader is available, the CPU can do bootloader in the off-chip EEPROM, or do not use bootloader to directly input the program through the JTAG port, the bootloader is basically not affected when the Development Board is modified.

6. Errors generated during compilation in tornado: Standard C functions or their own functions, undefined symbol variables, compilation failed.
Tornado supports C and C ++. When the file suffix is. CPP, the compiler considers it as a C ++ file. In this way, some functions defining the type C are not recognized during compilation or download.
Solution: 1. in the C ++ file (. (CPP) to call C functions, we should describe these C-type functions with the statement extern "C" as C functions. In addition, if you mistakenly write the. c file with the lowercase Suffix of the C file to the uppercase. c file, the same error will occur and the file will not be compiled during compilation.

7. An error occurred when downloading the tornado environment application: the function is undefined symbol and the download fails.
Although the compilation is successful, this problem still persists during the download, but the function or variable is not defined. The system does not understand this. This is the cause of the error, which is basically not defined. Check whether the header file containing the function or variable is added. If the definition cannot be found, the simple method is to remove them first (of course, there is no other place to use, then add and continue searching.

8. Run the VxWorks image directly without using the Boot Image in arm.
Some arm CPUs generally run in two modes: Boot Mode and normal mode.
In Boot Mode, run the VxWorks image directly to flash. This VxWorks image contains the boot function (similar to VxWorks. rom format), the middle part of the program to burn to flash is necessary, the first download through the serial port VxWorks image to DRAM is a simple transition, there is a boot loader control.
After writing, switch the CPU to the normal mode, start the system, and start reading the commands in Flash line by line. The command is controlled by the VxWorks BSP and is defined according to different VxWorks images, perform different operations. For example, if VxWorks is compressed, extract and copy it to the dram high-level address ,....

9. Differences between hardware initialization in VxWorks image and Boot Image
Both Boot Image and VxWorks image initialize the hardware. The two hardware initialization operations are different.
The bootrom image is mainly used to download the Vxworks system through the network port or serial port. Therefore, it only initializes a few hardware systems, such as the serial port or network port, to meet the need to download the VxWorks. These initialized hardware functions are complete.
After VxWorks is started, almost all hardware devices are fully initialized to meet the running needs of the VxWorks operating system.

10. use of assembly language .
the assembly language mainly appears in the BSP file roinit. s, sysalib. s, etc. These assembly commands are used to initialize the hardware of the system. When the hardware system powers up, the hardware, especially the memory, is not initialized, and the c function library is not loaded into the memory. The system does not support the C language program at this time, only 32-bit Assembly commands are supported. Therefore, only Assembly commands can be used to initialize hardware and prepare for subsequent operating systems including C language support. after the operating system runs normally, you can use C.

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.