How to download the program to the specified storage unit of 430 microcontroller using IAR

Publisher:Blissful567Latest update time:2016-08-25 Source: eefocusKeywords:IAR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
I finally figured it out today. I searched online for a long time but couldn't find out how to do it. In fact, it is very simple. I just need to modify the lnk430G2553.xcl file in the project.

The specific contents of the lnk430G2553.xcl file are shown below, which defines the physical address ranges of different areas in the 430 MCU Flash.

// ************************************************
//
// XLINK configuration file for MSP430G2553
//
// Copyright 1996-2010 IAR Systems AB
//
// $Revision: $
//
// ************************************************

// ---------------------------------------------------------
// Description
//

//
// Usage:
//
//   xlink [file file ...] -f lnk430g2553.xcl
//
// -----------------------------------------------
// Device summary
//

//
// Core:                           MSP430
//
// Interrupt vectors:              16
//
// Peripheral units:                  0-01FF
//
// Information memory (FLASH):     1000-10FF
//
// Read/write memory (RAM):        0200-03FF
//
// Read-only memory (FLASH):       C000-FFFF
//


// -----------------------------------------------
// Segments
//

// -------------------------------------
// Data read/write segments (RAM)
//

//
// segment         Usage
// -------         --------------------------
// DATA16_Z        Data initialized to zero
// DATA16_I        Data initialized by copying from DATA16_ID
// DATA16_N        Data defined using __no_init
// DATA16_HEAP     The heap used by 'malloc' and 'free'
// CSTACK          Runtime stack
// TLS16_I         Thread-local storage for main thread
//                 (require custom runtime library)
//


// -------------------------------------
// Program and data read-only segments (FLASH)
//

//
// segment         Usage
// -------         --------------------------
// DATA16_C        Constant data, including string literals
// DATA16_ID       initializers for DATA_I
// INFO            Information memory
// INFOA           Information memory, bank A
// INFOB           Information memory, bank B
// INFOC           Information memory, bank C
// INFOD           Information memory, bank D
// CSTART          Program startup code
// CODE            Program code
// ISR_CODE        Program code for interrupt service routines
// DIFUNCT         Dynamic initialization vector used by C++
// CHECKSUM        Checksum byte(s) generated by the -J option
// INTVEC          Interrupt vectors
// RESET           The reset vector
// TLS16_ID        Thread-local initializers for main thread
//                 (require custom runtime library)
//
// Notes:
//
// * The INFOx and INFO segments overlap, this allows data either to be
//   placed in a specific bank or anywhere in the info memory.
//
// * The INTVEC and RESET segments overlap. This allows an application to
//   either use the reset vector provided by the runtime library, or
//   provide a reset function by defining an interrupt function associated
//   with the reset vector.
//


// ---------------------------------------------------------
// Configuation
//

// -----------------------------------------------
// Stack and heap sizes
//

// Uncomment for command line use
//-D_STACK_SIZE=80
//-D_DATA16_HEAP_SIZE=80


// -----------------------------------------------
// Define cpu
//

-cmsp430


// -----------------------------------------------
// Support for placing functions in read/write memory
//

-QCODE_I=CODE_ID


// ---------------------------------------------------------
// Placement directives
//

// -----------------------------------------------
// Read/write memory
//

-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,TLS16_I,DATA16_HEAP+_DATA16_HEAP_SIZE=0200-03FF
-Z(DATA)CODE_I
-Z(DATA)CSTACK+_STACK_SIZE#


// -----------------------------------------------
// Read-only memory
//

// -------------------------------------
// Information memory
//

-Z(CONST)INFO=1000-10FF
-Z(CONST)INFOA=10C0-10FF
-Z(CONST)INFOB=1080-10BF
-Z(CONST)INFOC=1040-107F
-Z(CONST)INFOD=1000-103F

 

// -------------------------------------
// Constant data
//

-Z(CONST)DATA16_C,DATA16_ID,TLS16_ID,DIFUNCT,CHECKSUM=C000-FFDF


// -------------------------------------
// Code
//

-Z(CODE)CSTART,ISR_CODE,CODE_ID=C000-FFDF
-P(CODE)CODE=C000-FFDF

//For example, if you want to download the program to the starting position of 0xd000, just replace the above two statements with

//-Z(CODE)CSTART,ISR_CODE,CODE_ID=D000-FFDF
//-P(CODE)CODE=D000-FFDF
// -------------------------------------
// Interrupt vectors
//

-Z(CODE)INTVEC=FFE0-FFFF
-Z(CODE)RESET=FFFE-FFFF

Keywords:IAR Reference address:How to download the program to the specified storage unit of 430 microcontroller using IAR

Previous article:Memory Type in 430 MCU
Next article:How to write interrupt functions for several microcontrollers

Recommended ReadingLatest update time:2024-11-17 08:46

Check the code size in IAR software
  When using IAR software, all debugging functions are very good. The only flaw is that you cannot view the code size. Unlike Keil, you can directly view the size after compiling the code. So is there a way to view the code size in IAR? Of course you can. The easiest way is to view it through the map file.   What is
[Microcontroller]
Check the code size in IAR software
IAR has reached a strategic cooperation with Xianji Semiconductor to fully support the development of Xianji Semiconductor’s high-performance RISC-V MCUs.
(China | Shanghai) June 14, 2023 - During the first exhibition of Embedded World China, IAR, a global leader in embedded development software and services, and HPMicro, a leading domestic high-performance MCU manufacturer, jointly announced a strategic cooperation Agreement: IAR’s latest Embedded Workbench for RISC
[Embedded]
IAR has reached a strategic cooperation with Xianji Semiconductor to fully support the development of Xianji Semiconductor’s high-performance RISC-V MCUs.
IAR FOR STM8 The same project chip selection 003F3 can compile 003K3 and prompt insufficient space
For the same project file, if you select 103F3, it can be compiled successfully, but if you select 103K3, it will prompt that there is insufficient space. I was puzzled and consulted a lot of information but to no avail. Finally I found the configuration file in the IAR project.   Open the configuration file of 0
[Microcontroller]
IAR FOR STM8 The same project chip selection 003F3 can compile 003K3 and prompt insufficient space
IAR launches new brand image and name
IAR launches new brand image and name New visual identity reflects company’s transformation journey and focus on strengthening embedded development capabilities Uppsala, Sweden – February 13, 2023 – IAR, a global leader in embedded development software and services, today
[Embedded]
IAR launches new brand image and name
STM8S development environment builds IAR For STM8
/* ********************************************************************************************************************************** * Name: STM8S development environment build IAR For STM8 * Author : MingMing * Release : 2013/12/29 * Update: 2013/12/29 * E-mail : clint.wang@foxmail.com ******************************
[Microcontroller]
STM8S development environment builds IAR For STM8
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号