5-7 Chapters Experience

Source: Internet
Author: User

Fifth Chapter Configuration Development Board test environment

Development Board is the development and learning of embedded technology, the main hardware equipment, development Board with a serial port. Can be connected to the PC via serial cable. The Linux driver sends debug information to the PC via a serial cable while outputting debugging information, so the Linux driver can view debug information directly on the PC.

Note: Since many new PCs and laptops do not have a serial port, it is recommended that readers buy root USB to serial cable (be sure to buy good quality, otherwise you may receive data garbled or simply unable to receive data). Many USB-to-serial lines in Ubuntu Linux 10.04 and later do not need to be installed to drive to be recognized.

1th Step: Detect whether the current system supports USB to serial port

# Lsmod|grep Usbserial

2nd Step: Install Minicom

# Apt-get Install minicom

3rd Step: Configure Minicom

# Minicom–s

4th Step: Test minicom

# minicom

After executing the above command, the minicom will enter the waiting to receive the data status. If the serial cable or USB to serial cable is connected correctly, and the OK6410 board power is switched on, and the switch is turned on, if OK6410 has installed the system, Minicom will accept the information from OK6410.

To erase the Nandflash method using Eboot:

1, the preparation work, uses the serial line or the USB to the serial cable to connect the development Board and the PC, and starts the minicom.

2, enter the Eboot state, open the Development Board power switch, a prompt appears, press the PC keyboard spacebar to make the development Board stay in the Eboot state.

3, Erase Nandflash, enter the Eboot status will appear the menu, enter "A" can erase.

Burning and writing Android systems:

1, the preparation of a 4GB SD card, requires FAT32 partition of things. Insert the card reader and connect the PC.

2. Write Mmc.bin and Zimage-sd.bin to SD card.

3. Copy to SD card.

4, from the SD card burning to write Android.

5, calibrate the screen.

The first Linux program in the sixth chapter: count the number of words

1 , build Linux driver skeleton (load and unload Linux drivers)

2 , registering and unregistering device files

3 , specifying driver-related information

4 , specifying a callback function

5. Write Business logic

6. Writing Makefile Files

7. Compiling Linux Drivers

8. Install and uninstall Linux drivers

Test method:

1. Use Ubuntu Linux test Drive.

2, on the Android simulator through the native C program test drive.

3, using the Android NDK test Drive.

4. Use Java code to directly manipulate the device files to test the driver.

5, using the s3c6410 Development Board test Drive.

6, the driver compiled into the kernel test.

Seventh chapter LED lights will blink for me: control Light Emitting diodes

1. Although Linux drives deal directly with hardware, it is not the Linux driver that writes data directly to the memory in the hardware, but rather the native I/O memory.

2. The memory management module of the Linux kernel is responsible for synchronizing the data in I/O memory and hardware. Each Linux-connected hardware has a map header address in Linux memory, which is specified when reading and writing I/O memory using functions such as Ioread, Iowrite, and so on.

3, LED driver provides two ways of interaction: command and read and write device files.

4, multiple Linux device files can have the same main device number, but two devices of the main device number and the secondary device number can not be set, using the Alloc_chrder_region function to automatically assign the device, the Baseminor and count parameters do not set too large, Otherwise the device number will overflow, and the main device number will be rounded up to become the next main device number. int register_chrdev_regionl (dev_t from, unsigned count, const char *name) where from represents the device number, count represents the secondary device number range, and the name parameter represents the device file name.

5, when migrating Linux drivers, modify the Linux driver source code should try not to modify the Linux driver interface.

6, uninstall the Linux drive device files need to call Device_destroy,class _destroy and unregister_chrdev_region in turn;

5-7 Chapters Experience

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.