STM32 RVMDK JLINK flash and RAM debugging method

Publisher:大头玩家Latest update time:2016-07-28 Source: eefocusKeywords:STM32  RVMDK  JLINK  flash  RAM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
stm32f107vc development board, uvision V4.00u, JLINK V8, J-Link ARM V4.08l.

Debugging method under flash:

1. Open the project to be debugged, right-click options for target on the left column. Enter debug and select jlink.

 

2. Select jlink in utility.

 

3. Use JLINK to connect the PC and the development board, and turn on the power of the development board. Enter the settings next to it and add the flash burning method.

 

4. Go back and rebuild, press ctrl+F5 to enter debugging, you can single-step and breakpoint. According to ST's reference manual 2.3.3 embedded flash, the address of flash starts from 0x0800 0000. In the debugging window, you can see that the address of the assembly starts with 0x0800, which means that the code segment is burned into the flash.

 

Debugging method under SRAM:

1. Copy the ram.ini file D:\Keil\ARM\Boards\Keil\MCBSTM32\STLIB_Blinky in the Keil installation directory to the project directory to be debugged, and change the file to be loaded to the location and name of the AXF file of the project to be debugged. Here, the project is GPIO.

 

2. According to reference manual 2.3.1, the starting address of SRAM is 0x2000 0000. To put the code segment into SRAM, you must set the program read-only segment to start from the beginning of SRAM, and after a certain length (here set to 0X4000), the data segment RAM starts. Note that the length at both ends cannot exceed the total size of SRAM.

 

3. Follow the same steps 1 and 2 as in flash debugging, but select jlink.

4. Add ram.ini under debug page.

 

5. Choose not to erase the flash and modify the location and size of the code and data segments.

 

6. OK all the way, rebuild, ctrl+F5 to enter debugging. You can single-step, step in and breakpoint. Look at the location of the assembly code, it starts with 0x2000, indicating that the program is running in SRAM.

 

In addition, check the .sct file in the project directory as follows.

LR_IROM1 0x20000000 0x00004000  {    ; load region size_region
  ER_IROM1 0x20000000 0x00004000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
  RW_IRAM1 0x20004000 0x00004000  {  ; RW data
   .ANY (+RW +ZI)
  }
}

This indicates that the program has indeed been configured into the SRAM space.

Keywords:STM32  RVMDK  JLINK  flash  RAM Reference address:STM32 RVMDK JLINK flash and RAM debugging method

Previous article:Why do we need to add PRESERVE8 before the ARM assembler?
Next article:STM32 RTC Summary

Recommended ReadingLatest update time:2024-11-16 21:27

The fusion of multi-level storage and analog in-memory computing solves AI edge problems
Machine learning and deep learning have become an integral part of our lives. Artificial intelligence (AI) applications using natural language processing (NLP), image classification, and object detection are deeply embedded in many of the devices we use. Most AI applications are well served by cloud engines, such as g
[Internet of Things]
The fusion of multi-level storage and analog in-memory computing solves AI edge problems
BUG in software simulation of stm32 IDR register
/*  * Function name: Key_GPIO_Config  * Description: Configure the I/O port used by the button  * Input: None  * Output: None */ void Key_GPIO_Config(void) {   GPIO_InitTypeDef GPIO_InitStructure; /*Turn on the clock of the button port (PB0)*/       RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);      GPIO_In
[Microcontroller]
BUG in software simulation of stm32 IDR register
Samsung Electronics sets up new laboratory in Silicon Valley to develop next-generation 3D DRAM memory
Samsung Electronics said it has opened a new R&D research laboratory in Silicon Valley, USA, to focus on the development of next-generation 3D DRAM chips. The laboratory, operated by Device Solutions America (DSA) in Silicon Valley, oversees Samsung's semiconductor production in the United States and is committed to
[Semiconductor design/manufacturing]
Design of automatic toll collection system for buses
introduction With the development of society, urban public transportation has become an indispensable part of our lives. At present, there are two main ways of bus fare collection: manual ticket sales and card coin collection. Although manual ticket sales have the advantages of strong supervision and can effectively p
[Microcontroller]
Design of automatic toll collection system for buses
STM32 SYSTICK
void  SysTick_Config(void); //SysTick timer configuration  void  Delay_Ms(u32);//timing time configuration  void  void  SysTickHandler(void);//interrupt timing time processing function  static  vu32  TimingDelay;//interrupt processing function    //SysTick settings  void  SysTick_Config(void)  {         
[Microcontroller]
stm32 software emulation I2C
I. Overview   Many people know that there are BUGs in the hardware I2C of stm32. Now we implement I2C by software simulation timing.   Using software to simulate I2C is mainly to facilitate program transplantation. You only need to change the corresponding IO port. 2. Software Simulation Implementation 1 Start sig
[Microcontroller]
STM32 ADC input channel configuration
There are up to 3 ADC modules in STM32, and the channels corresponding to each module do not completely overlap. The figure below is the lower left corner of the general block diagram in the STM32F103CDE data sheet. It can be seen from the figure that 8 external ADC pins are connected to 3 ADC modules, 8
[Analog Electronics]
STM32 ADC input channel configuration
Clock program designed based on STM32 and DS1302
#ifndef __DS1302_H #define __DS1302_H #include "stm32f10x.h" extern u8 d ; //Year, week, month, day, hour, minute, second extern u8 disp ; //Year 【1】;Week 【3】;Month 【5】 //***********************Date ;Hour ;Minute ;Second void ds1302d_convert(void); //If you use low disp , you must call
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号