In the U-Boot-2009-03 porting notes (booting from Nandflash 1), we wrote the nandflash read driver and tried to read u-boot itself from nandflash to sdram, and finally light up led1 and led2 at the same time. Unfortunately, the result is not what we want. This article uses the openjtag debugging method to diagnose the problem (if you are not familiar with the debugging method, please refer to the U-Boot-2009-03 porting notes (debugging)).
Problem Discovery
We decompile the u-boot file and find that our program still calls the nand_init_ll function at 33f800090, so we set breakpoints at addresses 0x00000090 and 0x00000094, as shown in the figure:
What should I do if I find that the program runs away after 0x00000090? Let's take a look at the disassembly code of u-boot:
First look at 0x00000090 and find no problem, as shown in the figure:
Let's look at the nand_init_ll function itself and find that the function address is 0x33f8dcf0. If it is mapped to address 0, it should be 0x0000dcf0, which exceeds 4K and cannot be executed in sram. Knowing the cause of the problem, it is easy to solve.
Problem Solving
Open board/xinna2440/u-boot.lds and put the code of nand_op.c in the first 4k:
Recompile and burn, and find that both LED1 and LED2 are lit.
Previous article:U-Boot-2009-03 Porting Notes (Debugging)
Next article:U-Boot-2009-03 Porting Notes (Second Phase Porting Preparation)
Recommended ReadingLatest update time:2024-11-15 13:41
- 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
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- What are the units of divergence and curl used in electromagnetic fields?
- Questions about the CAN bus ID part
- [Classic C language knowledge] Summary of C/C++ programming difficulties
- Is this a series voltage regulator circuit?
- Shenzhen Yezhan Electronics is looking for talents||Looking forward to your joining
- 【Atria AT32WB415 Series Bluetooth BLE 5.0 MCU】Serial port test
- The development board mobile station helps netizens successfully participate in the electronic competition!
- TechTest Elite Development Program - Answer questions and win gifts!
- Big summary! All sensor types are here
- A Bluetooth brake pedal monitor designed for Tesla owners