Several methods of programming the JZ2440 development board

I use Wei Dongshan's JZ2440 development board to learn embedded Linux, which provides rich uboot functions

Download the bare board program:

Without uboot, you can only use openJTAG or J-link to download bare metal programs

Use openJTAG: After programming, reset the development board automatically, no need to power on again
1. Install the openJTAG driver
2. Place the oflash and the corresponding dll file in C:\Windows\SysWOW64 so that any path can use the
3.cmd window to enter the bin file to be downloaded
4. Select the download mode 0 openJTAG 5.
Select the corresponding development board 1 JZ2440
6. Select nandFlash (bare metal) or norFlash
7. Confirm nandFlash (bare metal) or norFlash
8. Select the starting point to be programmed The address (bare metal is all 0) There are many ways to download and burn the program when there is uboot. When unplugging the openJTAG, the connection between the openJTAG and the development board should also be unplugged, otherwise the reset will be pulled down to use TFTP (the premise is to ensure the network environment. It has been built): 0. The development board and the router are connected with a crossover network cable 1. The development board selects norFlash to start (uboot is in norFlash) 2. Use the serial tool to connect the development board (secureCRT) 3. Before uboot finishes loading the kernel (5s) press Enter the uboot function menu #menu 4. Set IP, serverIP set ipaddr 192.168.x.xx , set serverip 192.168.x.xx save 5. Windows open tftp.exe server address select the address of the Windows host set the file path 6. Exit menu select tftp download










  ($mtd command to see the partition root kernel bootloader params)
  tftp 0x30000000 xxx.bin //Download to sdram 0x30008000
  nand erase bootloader //Erase the bootloader area bootloader: 0x00000000-0x00040000
  nand write 0x30000000 bootloader //Write the code downloaded to 0x30000000 Go to the bootloader
7. Re-select nandFlash to start using DNW to download 0. Connect the development board to the computer with a USB cable and install the DNW driver 1. Select norFlash to start the development board (uboot is in norFlash) 2. Use the serial port tool to connect to the development board (secureCRT) 3. In Before uboot loads the kernel (5s), press the space to enter the uboot function menu#menu 4.windows open dnw.exe 5.Enter n to select dnw to download
  








7. Reselect nandFlash to start


Download the entire system:

Programming uboot:
The same as the method of programming bare board, generally program uboot to norFlash to program the kernel: (under uboot) Method 1 Enter k in menu, use dnw to directly transfer uImage Method 2 #tftp 30000000 uImage   #nand erase kernel (address identifier of the kernel segment)   #nand write.jffs2 30000000 kernel (.jffs2 flash bit reversal check) to program the file system: Method 1 Enter y in the menu, use dnw to directly transfer yaffs2  or enter j in the menu, use dnw directly transmits jffs2 When using jffs2, you need to do some settings #set bootargs noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0 #rootfstype=jffs2 #save You can also enter the letter s in the menu to set. The reason for specifying "rootfstype=jffs2" is: if it is not specified, the kernel first mounts it as YAFFS, and if it is unsuccessful, then tries JFFS2. But for most JFFS2 filesystems, it can be "wrongly" mounted as YAFFS, but not used correctly after mounting. Method 2 #tftp 30000000 fs_qtopia.yaffs2   #nand erase root






  












  #nand write.yaffs2 30000000 root $(filesize) //filesize specifies how big the download is
  or:
  #tftp 30000000 fs_qtopia.jffs2
  #nand erase root
  #nand write.jffs2 30000000 root $(filesize)   #reset restart
  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324600640&siteId=291194637