STM settings running in RAM

Publisher:数据探险家Latest update time:2016-10-18 Source: eefocusKeywords:STM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Download and debug in RAM in the MDK environment and respond to interrupts.

The following settings are required:

1. Writing RAM.INI file

FUNC void Setup (void) {

  SP = _RDWORD(0x20000000);          // Setup Stack Pointer

  PC = _RDWORD(0x20000004);          // Setup Program Counter

  _WDWORD(0xE000ED08, 0x20000000);   // Setup Vector Table Offset Register  
 
 

}


LOAD .\output\release.axf INCREMENTAL      // Download,.axf 

Setup();                             // Setup for Running


g, main

2. Reset NVIC in the main function as follows:

#ifdef  VECT_TAB_RAM
  /* Set the Vector Table base location at 0x20000000 */
  NVIC_SetVectorTable(NVIC_VectTab_RAM+0x2000, 0x0);
#else  /* VECT_TAB_FLASH  */
  /* Set the Vector Table base location at 0x08000000 */
  NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);  // NVIC_VectTab_FLASH
#endif

3. Click OPTION->DEBUG option SETTING -> FLASH DOWNLOAD and then REMOVE FLASH.

4. Define RAM_MODE, REMAP in OPTION-》ASM in the startup file

5. Select ULINK1 Cortex Debugger in the Debug tab (the software uses the crack method of brother yjgyiysbcc). Unselect Load Application at Start and add the startup script RAM.ini in Initialization.

6. Set the program download address in the TARGET option. As shown in the figure below, the address of IROM1 points to the RAM space of STM32. How to allocate the space depends on your needs. The internal RAM size of this processor is 20K, 16K is allocated to the read-only area, and 4K is allocated to the readable and writable area. In this way, the size of IROM is set to 0x4000, the start of IRAM1 becomes 0X20004000, and the size is only 0X1000.

7. Uncheck UPDATE TARGET BEFORE DEBUGING in the UTILITES option

STM settings in RAM - lizf1019 - Dreams start from here
Keywords:STM Reference address:STM settings running in RAM

Previous article:STM32 external crystal oscillator provides common system clock settings after frequency multiplication
Next article:stm32f1 clock analysis

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号