1. Does the version of the compiler correspond to the glibc library? How can I view the glibc version (
GlibcIs the most underlying API in Linux, and almost any other Runtime Library will depend on
Glibc), Does the compiler only generate images with glibc compiled. so file. If you call a self-made system, do you need to download glibc and re-compile it? A: Generally, glibc is selected when the compiler is created. Therefore, the library containing glibc is obtained in the compiler, there are both so files and. file. Both the compiler and glibc are updated. The old glibc cannot be used in the new compiler. But I do not know the version relationship between them. When using a self-made system, you can directly copy the lib that comes with the compiler. For details, refer to the root file system section of the 1st video.
2. What are the main functions of the interrupt processing function? Which of the following statements are not suitable for processing in interrupt processing functions? I hope you can give an example. A: The interrupt processing function is "handling interrupt events as soon as possible ". It is too time-consuming and not urgent. Do not place it in the interrupt function. For example, the NIC interrupt program only reads data from the NIC into the memory as soon as possible without further distribution. This subsequent processing is done by triggering a working queue or waking up the kernel thread.
3. How can the instructor communicate with the USB-HID device to achieve any bytes length of the read/write device? Can the kernel hiddev and hidraw be used to read and write arbitrary bytes? Or is it easier to write it by yourself? What is the idea? A: The hardware certainly does not support read/write of any length. Generally, the driver initiates multiple transmission requests based on hardware requirements. For hiddev, it does not support write operations at all. For hidraw, its write operations depend on other drivers. Therefore, you can easily write your own data. The main difficulty lies in the concept of a USB device: Address, endpoint, and length of one transmission. You can use libusb to write the app without writing the driver. If you have to write the driver, and only start data transmission in the drive's read and write, the framework is a simple character device driver, for details about data transmission, refer to the operations on the mouse in the input sub-system in section 2nd.
4. For debugging, Which tool is the most suitable currently is too troublesome for uboot to use print and too troublesome for program burning. Teacher, I watched the second video and found that the input subsystem and the driver model of the bus device were messy. Can the teacher tell me the connection and difference between them? A: I use print, which is convenient. You analyzed the program in advance and there is not much to print. Openjtag is used only when problems cannot be analyzed. There is no relationship between the input subsystem and the driver model of the bus device. The "Driver Model of the bus device" can be considered as a trick: You define a device and a driver, whose names are the same, the probe function of drvier is called. It is used to divide the driver into two files, one for storing hardware-related code, and the other for storing code that has little to do with hardware.
5. Are all ARM chips automatically copy the first 4 K of NAND to the memory of the chip after power-on? A: Only a few Samsung chips are like this. The chip that supports NAND boot also has this process: the chip-solidified program reads the NAND to the memory and then starts it.
6. how do I establish a relationship between a physical address and a virtual address in the Linux Startup code? A: For principles, refer to the MMU experiment in Issue 1. It is a bare board. How do I establish a ing in Linux, I have never gone into depth.
7. Sorry, I still don't know the link address. A: I started practicing the 1st video program from the LED and soon understood it.
8. How to use the camera to collect data to achieve the video function answer: Generally, compression is performed first, and then files are written.
9. Do you want to watch the second video of the graduating class? A: You can watch the bootloader section in the video of the graduating class after watching the video of the second phase. Watch the other section after watching the video of the second phase. The video of the graduating class is used to test the learning results of the first and second phases.
10. How to improve your project experience in a university? Because it is not related to a major, it is just because of your own interests and no related projects. A: You can create a product and implement it yourself. For example, you can use a Development Board to implement a function.
11. Why does the disassembly show that 0x56000000 is an immediate number and is directly stored in the register? A: Look at this article: http://bbs.chinaunix.net/thread-2317716-1-1.html
12. Mr. Wei, why does the SP pointer start to press the stack from 4092 instead of from 0 + 4 addresses? A: There is code at the beginning of 0. If you press the stack at the zero address, the program will be destroyed. Whether the SP grows down or up, you can specify it through the compilation option. But we often use downward growth.
13. difference between the PC pointer and the SP pointer A: The CPU reads data from the memory pointed to by the PC, and the data is executed as commands. The SP points to an idle memory, which is used to temporarily store data, the data is generated during program execution, such as local variables.
14. Can the teacher tell me the specific implementation of uart_stdio? A: Basically, it is a variable parameter function. I don't know much about it, but I just transplanted the kernel's printk source code.
15. Some arm9-cpus not only have internal RAM and Rom. How can uboot be rewritten? A: This is too difficult to answer. Simply put, uboot aims to read and start the kernel. In the process of achieving this goal, the hardware involved will be operated on. The general framework is learned in the graduation class video "Write bootloader yourself.
16. Teacher, kernel Jingjing analysis is a relatively early book. Is there any need to study it now? To what extent does the write driver need to know about the kernel? A: It is relatively early, but the principle has never changed. It can be used as a tool book on the side of the desk hand. If you want to understand a piece of content in depth, you can flip it over. The contents of this book are detailed and profound.
17. What do teachers think about embedded training? In particular, which of the following institutions have offered 10000 courses for the last 3 or 4 months? A: I personally think there are only two advantages when I go to a training class: people with poor self-control ability can have a learning atmosphere and have an interview opportunity. In terms of learning knowledge, the effect of the training course is not as good as watching videos.
18. video monitoring projects enable simultaneous transmission of video information through mobile phones and PCs. Can I publish the QT Lite version in the forum? A: What does "band recording" mean?
19. openjtag + ok6410: An error occurred while erasing the NAND command.
After all connections are connected, connect to open OCD and then Telnet. Red indicates the typed command! But the display is unsuccessful! ()
File: // C: \ Users \ admini ~ 1 \ appdata \ Local \ temp \ ksohtml \ wps3ce0.tmp.png A: The openocd command line does not fully support MLC. In other words, openocd does not support mlc nand.
20. What should I do if 0th nandflash blocks are damaged? A: The manufacturer ensures that they will not be broken. If they are broken, ① it cannot be used as a boot chip, that is, the Board can only be started with nor. ② Change to a NAND chip.
21. the new guy reported that he was studying the ok6410 bare board program of Dongshan brother and the 20th IRQ bare board program, and directly copied Dongshan brother's. binfile. I found that the characters on the serial port were garbled. I don't know which prawns had encountered this problem. I didn't understand it in the previous figure and the whole night.
File: // C: \ Users \ admini ~ 1 \ appdata \ Local \ temp \ ksohtml \ wps3ce1.tmp.png A: I have never encountered it, and I don't know why at the same time. You can streamline the program, reduce the code as much as possible, and then find the cause.
22. As shown in figure 1, the 2440 Storage Manager cannot be initialized normally. If the other method is not changed to figure 2, the 2440 Storage Manager is initialized successfully. Where is the problem? Thank you in advance for not initializing properly:
File: // C: \ Users \ admini ~ 1 \ appdata \ Local \ temp \ ksohtml \ wps3ce2.tmp.png
Initialize normally: file: // C: \ Users \ admini ~ 1 \ appdata \ Local \ temp \ ksohtml \ wps3cf2.tmp.png
A: The location-independent code is involved. In section 2nd of section 29th-JTAG Command Line Debugging for bare board debugging-This program is used as an example.
23. Instructor Wei wrote bootloade on his own in the graduating class and it seems that he is not in charge of nand ecc.
What should I do if I have an error in the NAND flash when I copy the Bootloader and kernel to the SDRAM? A: To streamline the program, I ignore ECC. ECC must be used in actual products.
The instructor helped to check the connection script problem and compiled the binfile more than 700 m: This is the link script sections {firtst 0x00000000: {head. O init. o nand. o} second 0x30000000: At (4096) {interrupt. O serial. o rtc. O main. O }. = 0x31000000 ;. text :{*(. text )}. rodata align (4 ):{*(. rodata )}. data align (4 ):{*(. data )}. BSS align (4 ):{*(. BSS) * (common)} answer :. text ,. rodata ,. data must be added with at (XXX), otherwise there will be more than MB. When at is not added, the default at value is the same as the link address. For example, if the first segment is set to 0 and the text segment is set to 0x31000000, isn't it more than 700 mb?
24. Refer to the sound card bare board program in instructor Wei's third video. I wrote a bare board program for the camera myself. If you have any questions, please answer it!
Instructor Wei's bare board program is downloaded to the nadn flash after it is started, and then relocated to the start, the start should be the 33f80000 specified in the LDs file, when the interruption occurs, the hardware will automatically jump to 33f80018 to execute handleirq. I don't know if I understand this, do I? A: No. When an interruption occurs, it must start at 0x18. When the NAND is started, the first 4 K code will be copied to the on-chip RAM. The block ram address 0x18 is the interrupt vector entry, where there will be a jump command to execute the interrupt processing function in the SDRAM.
Then, my own program is directly downloaded to SDRAM 32000000 (because another uboot command I use is to directly download and run the BIN file), and the address specified by LDs is 32000000, I removed Head. s the relocation part in the startup program. In this case, where will the hardware jump to be executed after an interruption? Is it the 32000018 address? A: The answer is the same as above. It must start from 0x18. During uboot download to 32000000 running, the program should copy part of the code starting with 32000000 to the 0 address for interruption.
If you have an ov7740 bare-board test program, can you send it to me? Thank you very much! [Email protected]
A: There is no ov7740 bare board test program.
25. board mini2440 screen x35, after the LCD driver is tied in, a line of "Please press enter to activate this console" is displayed at the beginning. "In a few seconds, it becomes a green screen. Has anyone ever encountered this phenomenon? A: green screen? I have never encountered it. You can delete the tty0 or tty1 line in the/etc/inittab and restart the system to see that there is no text display on the LCD. After startup, you can use echo Hello>/dev/tty1 to test the LCD.
26. I will use U-boot to burn a bare-board LCD program in section 0th. bin, burn write normal, but when dial to NAND run, the screen only shows some color bars, what is going on, burn led_on.bin is also light is not on, but burn LEDs. bin is normal again, and the lights are flashing in turn. What's going on?
File: // C: \ Users \ admini ~ 1 \ appdata \ Local \ temp \ ksohtml \ wps3cf3.tmp.png
A: For the led_on.bin issue, check the source code and check whether the LED pin corresponds to jz2440. LCD problem. Do you need to print it on the serial port after you restart it? If printing is available, I think you should burn it: LCD _3.5_4.3.bin. The original LCD. Bin only supports a 3.5-inch LCD.
27. What are the main tasks of Linux kernel security? What kind of companies need to know about the job? A: I don't know this.
28. after learning the three-phase video, how far is the level of Linux? Can I complete the Linux driver myself in the future? In addition, what should I know about the underlying drive inux? A: If you have learned well, you can say that you have 2 or 3 years of work experience. If you use another board to train your hands and write the example home in the three-phase video on the new board, then the general Linux work is basically not what you can do, you need to read the chip manual, understand the schematic, and then finish the course of issue 2nd and integrate it.
29. mini2440 supports USB cameras. Does it support all USB cameras? I want to learn about video monitoring now. I don't know how mini2440 supports any more, are all USB cameras with night vision supported? A: All cameras that comply with UVC specifications are supported. Whether to bring night vision is only the performance of the hardware, and it is irrelevant to whether it is UVC. Many UVC cameras also have night vision.
30. Some students still remember the section in which the teacher talked about the mkdosfs tool. Now they are working on a block device driver and are always prompted that this command cannot be found. A: Search for dosfstools_2.11.orig.tar.gz on the Internet.
31. my current confusion is: I am learning the driver of instructor Wei Phase II, but now the teacher wants me to collect GPS data. What I want is to finish learning the driver before finishing my teacher's work, however, my teacher did not understand that the data collection module had nothing to do with the driver, and told me to directly perform GPS data collection. I don't know how to do it now? A: I think the gps device you are using is a serial port interface? It does not have to do with the driver. You only need to search for how to write the serial port program on the Internet.
Wei Dongshan YY Open Course Notes (2)-various miscellaneous