[Bonus] Mini2440 bare metal development - program download SRAM, NorFlash method

Publisher:MysticalGardenLatest update time:2022-05-09 Source: eefocusKeywords:mini2440 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Development Preparation


Development board: mini2440, NorFlash: SST39VF1601 2MByte size, CPU: S3C2440A.


Development environment: MDK5.13


Emulator: Jlink v8


2. Development Process


First, let me introduce how to download the program to Nor Flash:


Write the scatter loading file RuninFlash.sct


    ;****************************************************************

    ; *** Scatter-Loading Description File generated by uVision 

    ; ************************************************************

    ;Run in Flash

LR_ROM1 0x00000000 { ; load region

  ER_ROM1 0x00000000 0x0200000 { ; load address = execution address

   *.o (RESET, +First)

   *(InRoot$$Sections)

   .ANY (+RO)

  }

  RW_RAM1 0x30000000 0x4000000 { ; RW data

   .ANY (+RW +ZI)

  }

   RW_IRAM1 0x40000000 0x00001000 {

   .ANY (+RW +ZI)

  }

}


Configure the file in MDK, add RuninFlash.sct in linker, and configure as follows:

Next, you need to add the Nor Flash model on your development board in Utilities->Settings->Programming Algorithm.

Use Jlink for debugging, select j-Link in Debug, and set the following in settings.

After the settings are completed, you can use the Download button in the MDK toolbar to directly download the program to Nor Flash.


The program still runs.

Next, we will introduce how to download the program to SRAM and run it. If the program is burned into SRAM, it will be lost after power failure.


Also configure and add the corresponding loading files in MDK, and add the Ext_RAM.ini file in Debug.

Configure the Scatter File file in Linker and add the written RuninRAM.sct here.

Download the program and run it. There is a difference between downloading it to SRAM and Nor Flash. When downloading it to SRAM, you can only use the debug button to test it.

After entering the debugging interface, click Run at full speed and the program will start running.

To download the project code, click this link: http://download.csdn.net/download/guohengsheng3882/10247050


The project contains the above loading files. According to the above configuration, the program can be run directly on mini2440.

Keywords:mini2440 Reference address:[Bonus] Mini2440 bare metal development - program download SRAM, NorFlash method

Previous article:TQ2440 Study Notes - 16. Volatile Keyword
Next article:[Bonus] Mini2440 bare metal development - scatter loading file scatter

Latest Microcontroller Articles
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号