First, the purpose
Learn how to debug bare metal programs on ARM. Currently, ARM supports three debugging methods: JTAG, Angel, and ARMulator (see below for details). Only JTAG is supported for bare metal program debugging. Since my laptop does not have a parallel port, I cannot use H-JTAG and can only use Jlink debugging.
1. Use JTAG to fully trust ARM internal resources
2. When using Angel, the target board must include a debugging monitor program
3. ARMulator does not require a target board, it is pure software simulation.
2. Hardware Environment
Development board: TX2440A
cpu:S3C2440
nand flash:K9F2G08U0B (256M+8M)x8bit
norflash:EN29LV160AB (2M) x8bit
SDRAM:K4S561632 x 2 (32M) x 2
Emulator: JLINK V7
Serial cable: USB-RS232 adapter, supports 5V and 3.3V power supply
3. Circuit connection
1. Power supply: switching power supply 5V/2A
2. Serial port: TX2440's com0 port is connected to the computer's serial port
3. JLINK connection: use PC---USB cable----jlinkV7-----10pin adapter cable----TX2440 jtag interface
4. Software Environment
1. SEGGER J-Link V4.08. This is the host computer (driver) of JLINK.
2. ADS1.2. Code writing and simulation software (with AXD debugging tool)
5. Debugging process
1. First, power on the development board, regardless of the boot mode, nandFLASH or NorFLASH (actually tested, because the bare metal program is downloaded to the memory to run, it has nothing to do with nand flash or norflash)
2. Connect JLINK and development board
3. Open the Tianxiang routine test for tianxiangLEDLED.mcp, compile it, and click debug to enter the AXD mode after it is correct.
Configure configure Target…
Configure Target Steps: 1. Click "add" 2. Select the installation directory of JLINK: 3. Select "JLinkRDI.dll", the following interface will appear
4. At this time, select "configure" on the right, jump to the "JTAG" item, and set it as follows (4000K speed is relatively fast and stable):
Use the default values for other items and select "OK". That's it! After completing the above steps, you will be redirected back to the AXD interface. Below the interface, the connection information will be displayed:
5. Load the image (LED.axf file generated previously): Now click the debug button on the AXD interface, and an exception will occur, as shown in the figure below:
From the above error message, we know that the program has run away. Because the program needs to be downloaded to the memory to run, the SDRAM needs to be correctly configured before running the program.
Solution: Before running AXD, run the SDRAM memory configuration script (i.e. 2440init.txt, which must be stored in an English path). Steps to add a configuration script:
1. Click options---configure Interface to enter the following interface.
2. Click Session File, select Run configuration script, and select the path of the configuration script 2440init.txt.
6. Successful operation
After the above settings are successful, click go, and the program pointer points to main(), indicating that Jlink can successfully debug the bare metal program. See the figure below for details.
Other usages are to be improved.
Previous article:Method for debugging u-boot under S3C2440 platform - code loading
Next article:JLINK+ADS+mini2440 configuration ///Configure J-Link to burn bootloader for mini2440
Recommended ReadingLatest update time:2024-11-15 14:08
- Popular Resources
- Popular amplifiers
- Network Operating System (Edited by Li Zhixi)
- Microgrid Stability Analysis and Control Microgrid Modeling Stability Analysis and Control to Improve Power Distribution and Power Flow Control (
- MATLAB and FPGA implementation of wireless communication
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- 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
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- HC05 Bluetooth module debugging documentation with buttons
- Water temperature sensor
- Infineon Position2Go Development Kit Review - skypinglee
- Schematic diagram of a quadrature oscillator
- Please tell me about the PB pin of GD32E230C
- Qorvo UWB Solution Receives Apple U1 Interoperability Certification
- Can't even see the taillights? LED makes car tail lighting safer
- EEWORLD University - How and why to replace discrete MOSFETs with load switches
- 【ESP32-C3-DevKitM-1】+ESP32 series universal Windows environment construction
- Digi-Key KOL video is here~ Senior algorithm engineer talks about the secrets of image processing