<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 用IAR如何把程序下載到430單片機(jī)指定存儲單元中

          用IAR如何把程序下載到430單片機(jī)指定存儲單元中

          作者: 時間:2016-11-13 來源:網(wǎng)絡(luò) 收藏
          今天終于搞出來了,在網(wǎng)上查了半天也沒有查出來怎么搞,其實很簡單,只需修改一下工程中的lnk430G2553.xcl文件就ok了。

          具體的lnk430G2553.xcl文件內(nèi)容見下面,里面定義了430單片機(jī)Flash中不同區(qū)域物理地址范圍。

          本文引用地址:http://www.ex-cimer.com/article/201611/316263.htm

          // ************************************************
          //
          // 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

          //比如現(xiàn)在想把程序下載到0xd000開始的位置處,只需把上面兩條語句替換為

          //-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



          評論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();