At first, I wanted to use the "Download & Run function" of supervivi+DNW in Nor Flash to download uboot.bin to SDRAM for debugging. However, since the laptop has been installed as ubuntu + Virtualbox (Windows XP), after allocating the USB download device in the supervivi stage to Virtualbox (Windows XP), it prompts "Cannot allocate USB device System MCU SEC S3C2410X Test B/D [0100] to the virtual computer Windows XP Workstation. Failed to create a proxy device for the USB device. (Error: VERR_READ_ERROR).", while other USB devices such as USB flash drives can be allocated to the virtual machine normally. Due to limited ability, I googled for a long time but still couldn't find a solution. According to experts on the Internet, it is because Virtualbox does not support USB devices very well. The problem also exists when allocating USB devices such as online banking U shields. I don't know if VMware has this problem. Therefore, I can only use other debugging methods. When I bought the development board, I also bought a copycat version of OpenJTAG and used it. During the uboot porting process, you can use JLink with the "code lighting method" to debug before the serial port initialization is completed and the log can be printed normally. You can also use the uboot write NAND FLASH function to write the adjusted firmware into NAND FLASH.
1. Use JLink+mini2440 to debug uboot
1.1. Install the JLink driver. I installed JLinkARM_V402
1.2. Connect the hardware
1.3. Run Start->All Programs->SEGGER->J-Link Commander
1.4. Set TCK to 12kHz to increase download speed
J-Link>speed 12000
1.5. Download and run init.bin to initialize mini2440SDRAM (this is the SDRAM of S3C2410 and S3C2440 that comes with the CD when you buy OpenJTAG. If you don’t have this init.bin, you can use the following JLink+AXD method to debug uboot). Here, put init.bin in the C drive and use NAND FLASH to start. If you use NOR FLASH to start, download it to 0x40000000 and run it.
J-Link>loadbin C:init.bin 0
J-Link>setpc 0
J-Link>g
1.6. After stopping init.bin, you can download uboot.bin to SDRAM for debugging (Note: uboot that runs directly on SDRAM for debugging needs to define CONFIG_SKIP_LOWLEVEL_INIT in the corresponding board-level configuration file to skip some of the underlying initialization codes. Here I set the loading and running address of uboot to 0x30000000)
J-Link>h
J-Link>loadbin F:ubootuboot-git-denxu-boot.bin 0x30000000
J-Link>setpc 0x30000000
J-Link>g
2. Use JLink+ADS1.2+mini2440 to debug uboot
2.1. Install ADS1.2 and JLink drivers
2.3. Open ADS1.2 and add Jlink.
Select Options->Configure Target
ei
Click “Add”
Select the JLINK installation directory and select JLinkRDI.dll
2.4.Configure Jlink
Select the JLinkRDI.dll added in the previous step, select Configure on the right, and configure JLink
Jump to JTAG options and set the frequency to 12000kHz
Jump to Flash option and uncheck it as shown below.
Jump to Breakpoints, as configured below
Jump to CPU options and set as shown below
The configuration is now complete. Select "OK" to return to the AXD interface. If the PC and target board have been connected via JTAG, the following connection information will be displayed.
2.5. Set the MINI2440 SDRAM memory registers.
Select MINI2440, nand boot mode, you need to set the SDRAM controller first. The setting method under AXD is to select systems views->command lines interface and enter the following command to set the registers
setmem 0x53000000 0x00000000 32
setmem 0x4A000008 0xFFFFFFFF 32
setmem 0x4A00001C 0x000007FF 32
setmem 0x53000000 0x00000000 32
setmem 0x56000050 0x000055AA 32
setmem 0x4C000014 0x00000007 32
setmem 0x4C000000 0x00FFFFFF 32
setmem 0x4C000004 0x00061012 32
setmem 0x4C000008 0x00040042 32
setmem 0x48000000 0x22111120 32
setmem 0x48000004 0x00002F50 32
setmem 0x48000008 0x00000700 32
setmem 0x4800000C 0x00000700 32
setmem 0x48000010 0x00000700 32
setmem 0x48000014 0x00000700 32
setmem 0x48000018 0x0007FFFC 32
setmem 0x4800001C 0x00018005 32
setmem 0x48000020 0x00018005 32
setmem 0x48000024 0x008E0459 32
setmem 0x48000028 0x00000032 32
setmem 0x4800002C 0x00000030 32
setmem 0x48000030 0x00000030 32
To avoid entering the above long string of commands every time, you can write the register commands to be set above into a file (config_mini2440.txt), and use ob config_mini2440.txt in the command line to batch execute the settings, or make the following settings in AXD's options->Configure Interface, so that when you start AXD, you can automatically run the above script to complete the register initialization.
2.6. Load uboot.bin and run
Input in ConfigureInterface
Debug>loadbinary F:ubootuboot-git-denxu-boot.bin 0x30000000
Debug>setpc 0x30000000
Debug>run
Previous article:SmartARM3250 user file system burning method
Next article:Mini2440 is used to migrate the ADS project to Keil MDK step by step
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Divide an assembly file into several assembly files. Compile prompt variable is not defined
- RF amplifier performance test
- What is the significance of connecting two capacitors in series?
- Storage time of different surface treatment processes for circuit boards
- Upgraded AMG8833 PyGamer thermal imager
- LED Dress
- Future unemployment issues facing electronic engineers
- The relationship between pulse+, pulse- and U2B output is logical AND.
- Need to burn multiple firmwares for mass production? Just rely on this tool!
- SinlinxA33 development board wireless wifi settings