S3C2440—1. Familiarity with bare metal development board

Publisher:以泉换泉Latest update time:2021-10-14 Source: eefocusKeywords:S3C2440 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction to onboard resources

The development board uses Samsung's JZ2440V3 (an improved version based on S3C2440). There are abundant resources on the Internet, which is helpful for learning. The onboard resources are shown in the figure:

insert image description here
insert image description here

The following points require special attention:


Generally, the JTAG programming port is used to program the program, and eop can be used.

There are two USB interfaces, of which USB-SERIAL can connect the development board to the host computer and debug through the serial port

Another USB port can be used to download programs

Onboard 2M Nor FLASH, the program can be directly burned into it

The onboard 256M Nand FLASH is the main data storage center, where you can write programs.

The startup mode can be selected: Nor or Nand startup, Nand is generally used


2. Install the driver and host computer

To get started, you need to install the following:

1. Install the USB serial port driver and host computer

2. Install the eop driver to connect the board to the host computer

3. Install OFLASH software to burn the bin file into the board


1.USB driver and host computer

USB Driver Installation

Teacher Wei Dongshan's materials contain all the required software, and the USB driver used is as shown, just install it directly:

insert image description here

Check in the device manager, as shown in the figure, the installation is successful:

insert image description here

USB host computer installation

After the upper computer software in the compressed data is compressed successfully, you can open the upper computer by running it as an administrator.


The host computer software is as follows:

insert image description here

The upper computer software interface is as follows: (I like this interface very much)

insert image description here

After the USB driver is successfully installed, configure the serial port information in the Session interface:

(Note: Select the corresponding USB serial port, bps: 115200, Flow control: None)

insert image description here

Then you can enter the serial port interface.


2.eop driver installation

The premise is to plug in eop

First, compress the driver file and copy the file path:

insert image description here

Then, open the device manager, check, update the driver on the exclamation point device, install it in the computer, and then enter the copied eop driver file path to install it:

insert image description here

Generally, there will be a prompt in win10: Hash table not found. This is because of the forced signature problem, which Google solves by itself.

You need to perform this operation on all devices with three exclamation marks until all are normal:

Can identify eop's USB to serial port function (COM8), JTAG function, Serial Port function

(Only JTAG function is needed for burning program at the beginning)

insert image description here

In this way, the USB and eop drivers are installed.


3. Install the burning software oflash

Install the burning software and burn the bin file into the board through the JTAG interface of eop.

Find the software in the information and install it directly:

insert image description here

You can enter oflash in the win10 command line to check whether the installation is successful:

As shown in the picture, oflash has been installed successfully.

insert image description here

At this point, the drivers and host computer software required by beginners have been installed successfully. The next step is to burn the program.


3. Burn the development board

The next step is to burn the program into the development board.


1. Preliminary knowledge

In the development of STM32, you only need to cpoy a project template, then write the driver in MDK, click compile and burn to burn the program into the development board. MDK does not open the details of compilation and burning to users. In the development of Linux embedded, we need to operate each step to burn it ourselves. Let's take a brief look at the general process of program burning:


First, write the driver code, usually through an editor, the written driver code is a .c file

Then, compile the .c file through the compiler to generate assembly code

Then, the assembly code is converted into target code by an assembler

Then, the linker converts the target code into executable code, which is the binary file .bin

Finally, burn the .bin file into the development board connected to eop through the oflash host computer

Among them, the work of editing C code is generally carried out under Windows. After writing, it is transferred to Linux, which completes the compilation, assembly, and linking of the C file. The generated binary file .bin is then transferred back to Windows and burned into the development board by oflash. The flow chart is as follows:

insert image description here

2. Burn the bare board

There are ready-made .bin files in the materials of Professor Wei Dongshan. Here we use the software oflah in conjunction with the Windows command line to burn the bare board program, which is equivalent to not involving Linux.

When introducing the onboard resources above, it was mentioned that there are Nor FALSH and Nand FLASH. So when burning the program, which FLASH is it burned into?

This depends on the burned bin file:


u-boot.bin can be used in both Nor and Nand

General bare board drivers such as lcd.bin and led.bin are burned into Nand

Please note that once the location for burning is determined, you need to choose how to boot the computer. You can choose to boot from the Nor or Nand storage area. This must be consistent with the location where the program is burned, because different storage locations may store different programs.


Burn all bin files: uboot.bin, lcd.bin... (bare board program)

Where to burn the program: uboot can be Nor, Nand, bare board program can only be nanf (all 0 address)

But when starting the bare board program, both flash can


The steps for burning the bare board program are generally as follows:


1. Find the .bin file

2. Open the win command line window and use cd to switch to the directory where the bin file is located

3. Use: oflash lcd.bin to burn

4. Configure the burning options: mainly the burning location (Nor, Nand), and the burning interface

5. Unplug the ecp (including reset), then select the corresponding boot mode (Nor or Nand), and power on again

6. You can also use the serial port host computer to debug the control development board

Note: Every time after re-burning the program, you must unplug the JTAG pin of eop, because there is a reset interface in the pin header to put the board in reset state. Also remember to select the corresponding startup method!

The programming speed of Nor FLASH is faster than that of Nand FLASH.


3. Use u-boot to burn the program

There is only one word to describe the u-boot burning program: fast!


For bare board development, we generally use JTAG tools, such as OpenJTAG, EasyOpenJTAG to program bare boards.

JTAG tools are slow, but bare metal programs are generally small, so this method is very convenient.

When I started playing with Linux, a kernel was more than 2MB, and it took several hours to burn it using the JTAG tool.

So we developed UBOOT with USB download function. When running UBOOT on the board, we can

Transfer huge files such as kernel and file system to the development board via USB cable on the computer: it's very fast!

The prerequisite for using USB download is that UBOOT is currently running on JZ2440.

Other bare board programs, or if the board has already booted into Linux, USB download cannot be used.


The above also introduces the mainstream way of burning files: burning programs to Nor or Nand through eop (bare board drivers can only be written to Nor through eop)

In fact, you can also burn programs through USB-Device. Here we will briefly introduce how to use u-boot in Nor to burn programs to Nand through USB-Decive.


First, you need to install the USB-Decive driver. This USB driver is different from the above driver. The above one is the USB serial port driver, and this one is the USB-Decive driver, which is the USB burning program, which is the following driver:

insert image description here

After installation, the device manager displays the following figure (the prerequisite is that u-boot is installed in Nor and Nor is started):

insert image description here

The following is the general process:


First, follow the previous method to burn the u-boot.bin program in Nor and connect the two USB ports.

Open the USB serial port host computer, select Nor boot, and restart the power

In the USB serial port host computer, when there is a display, quickly press the space bar to directly enter the u-boot menu. This operation will not start the file system, kernel, etc. on the board.

Operate u-boot in the host computer, as shown in the figure, by sending n instructions, use u-boot to burn the program into Nand FLASH

insert image description here

Select the bin file to be burned in the dnw software, double-click it, and it will be burned quickly.

insert image description hereinsert image description here

At this point, the bin file is burned from USB-Decive to Nand

Power off, select Nand to start, power on again, and you can execute the program in Nand


4. Restore factory settings

When you want to restore the board to factory settings, you can first understand the board's startup process.

Teacher Wei Dongshan uses the PC startup process as an example:

insert image description here

The PC boot process is as follows:


Execute BIOS first when booting

Start Windows operating system from BIOS

The operating system identifies and mounts the C drive (including various APPs)

This is the PC boot process. The BIOS and operating system are all stored in the hard disk, so once the hard disk is initialized, it is equivalent to deleting the system. Because of this, the system cannot start the BIOS and operating system, let alone other things.


In embedded Linux, the boot process is similar to that of a PC:

insert image description here

The boot process of embedded Linux is:


Execute the boot-loader first after power on (u-boot is a common boot-loader)

Start the Linux kernel from u-boot

Linux kernel mounts the file system (it can run)

However, in embedded Linux, these u-boot, Linux kernel, and file system are all stored in FLASH, so if you want to restore the factory settings, you only need to reinstall u-boot, Linux kernel, and file system.

It is said above that u-boot can be in Nor or Nand, but the size of Nand FLASH is 256M, and Nor FLASH is only 2M, so the Linux kernel and file system are stored in Nand FLASH, as shown in the figure:

insert image description here

So we can restore the factory by re-burning the Linux kernel and file system. The process can be:

[1] [2]
Keywords:S3C2440 Reference address:S3C2440—1. Familiarity with bare metal development board

Previous article:S3C2440—6. Implementation of printf for serial port
Next article:S3C2440—2. Bare metal development steps and tool usage

Recommended ReadingLatest update time:2024-11-15 07:46

S3C2440 uses bin file machine code to light up
S3C2440 Chip Manual Introduction https://blog.csdn.net/qq_28258885/article/details/111461640 This time we will light up another LED, so read the chip manual first. This time configure LED2, Then we set GPFCON to 01, which is 0x400 programming /* * Light up LED: GPF4 */ .text //Indicates that it is a code segment
[Microcontroller]
S3C2440 uses bin file machine code to light up
S3C2440 bare metal --- Nor Flash principle and hardware operation
1. The difference between nandflash and norflash Our nandflash has only 8 data lines, which transmit both commands and data. However, our norflash has the same interface as memory, with address lines and data lines. Norflash can be read like memory, but cannot be written like memory. If norflash can also be written li
[Microcontroller]
S3C2440 bare metal --- Nor Flash principle and hardware operation
Memory Management Unit MMU
The Memory Management Unit (MMU) is responsible for mapping virtual addresses to physical addresses and provides hardware-based memory access permission checks. Modern multi-user, multi-process operating systems use MMU to allow each user process to have its own independent address space: the address mapping function
[Microcontroller]
Memory Management Unit MMU
S3C2440-IIC
[Microcontroller]
Porting s3c2440 ads program to keil (Part 2) Preliminary completion
What if I change the parameter configuration? Then compile again to package errors As follows The error is as follows This error cannot be solved Finally, I checked the method of netizens on the Internet and it can be modified, but the nand file is introduced Finally, I know that the 2440init.s file needs to be m
[Microcontroller]
Porting s3c2440 ads program to keil (Part 2) Preliminary completion
s3c2440 bare metal-resistive touch screen programming (7. Touch screen calibration test and optimization)
1. Prevent clicking one point from displaying 5 points   In the same way, data may need to be reported in Isr_Adc. Here, the reported pressure value is also added in touchscreen.c. When isr_adc reports data, the pressure value is also reported, so that the pressure value information can be read during ts_read_raw.
[Microcontroller]
s3c2440 bare metal-resistive touch screen programming (7. Touch screen calibration test and optimization)
s3c2440 bare board_interrupt architecture
S3C2440 has a total of 60 interrupt sources, of which 15 are sub-interrupt sources, which correspond to each bit in the SUBSRCPND register, and the other 45 interrupt sources correspond to each bit in SRCPND. It should be noted that EINT4~7 correspond to the same bit SRCPND , and EINT8~23 also correspond to SRCPND
[Microcontroller]
s3c2440 bare board_interrupt architecture
A comprehensive comparison between s3c2410 and s3c2440
1. The maximum main frequency is different: 2410 is 200M, 2440 is 400M.       When we use these two processors, we usually use different main frequencies. This difference not only affects the running speed, but also affects the clocks of some peripherals (such as serial ports). If the clocks of these peripherals are
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号