烧写程序部分组成
如下图 http://cache.amobbs.com/bbs_upload782111/files_39/ourdev_633727LQ121D.jpg1。code memory 2。data memory3。memory分别代表什么啊 (原文件名:memory.jpg) 小弟在写程序的时候 已经重新擦写了很多flash块那程序又是下载到哪里呢 code memory 就是你的程序烧进430以后要占用的FLASH字节数,
data memory 就是你的程序运行过程中要使用的RAM字节数,CONST memory我也不太清楚 http://cache.amobbs.com/bbs_upload782111/files_39/ourdev_633729TN2JG4.jpg
我找到这个 (原文件名:2.jpg) //
// This file should be used with the MSP430F149 microprocessor.
//
// Copyright 1996-2007 IAR Systems. All rights reserved.
//
// Usage:xlink your_file(s) -f lnk430f149 library
//
// $Revision: 5305 $
//
//*****************************************************************
//*****************************************************************
//
// The memory areas of the MSP430F149 microprocessor:
//
// Peripheral units: 0 - 01FF
//
// Information memory (FLASH): 1000 - 10FF
//
// Read-write memory (RAM): 0200 - 09FF
//
// Read-only memory (FLASH): 1100 - FFDF
//
//
//*****************************************************************
//*****************************************************************
//
// The following segments are defined in this linker command file:
//
// Data read/write segments (RAM)
// ==============================
//
// segment Restrictions Usage
// ------- ------------ --------------------------
// DATA16_I < 10000 Data16 initialized variables
// DATA16_Z < 10000 Data16 zero initialized variables
// DATA16_N < 10000 Data16 uninitialized variables
// DATA16_HEAP < 10000 Data16 heap used by malloc and free
// DATA20_I Data20 initialized variables
// DATA20_Z Data20 zero initialized variables
// DATA20_N Data20 uninitialized variables
// DATA20_HEAP Data20 heap used by malloc and free
// CSTACK < 10000 Runtime stack
//
//
// Program and data read-only segments (FLASH)
// ===========================================
//
// segment Restrictions Usage
// ------- ------------ --------------------------
// INFO Information memory
// CSTART < 10000 Program startup code
// CODE Program code
// ISR_CODE < 10000 Program code for interrupt service routines
// DATA16_C < 10000 Data16 constant data and string literals
// DATA16_ID < 10000 Data16 initializers for DATA16_I
// DATA20_C Data20 constant data and string literals
// DATA20_ID Data20 initializers for DATA20_I
// DIFUNCT < 10000 Dynamic initialization vector used by C++
// CHECKSUM Checksum byte(s) generated by the -J option
// INTVEC FFE0-FFFF Interrupt vectors
// RESET FFFE-FFFF The reset vector
//
//*****************************************************************
// ---------------------------------------------------------
// Stack and heap sizes.
// ---------------------------------------------------------
// Uncomment for command line use
//-D_STACK_SIZE=80
//-D_DATA16_HEAP_SIZE=80
// ---------------------------------------------------------
// Define cpu.
// ---------------------------------------------------------
-cmsp430
// ---------------------------------------------------------
// Read-write memory.
// ---------------------------------------------------------
-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA16_HEAP+_DATA16_HEAP_SIZE=0200-09FF
-Z(DATA)CSTACK+_STACK_SIZE#
// ---------------------------------------------------------
// Read only memory
// ---------------------------------------------------------
// Information memory
// ---------------------------------------------------------
-Z(CODE)INFO=1000-10FF
-Z(CODE)INFOA=1080-10FF
-Z(CODE)INFOB=1000-107F
// ---------------------------------------------------------
// Constant data
// ---------------------------------------------------------
-Z(CONST)DATA16_C,DATA16_ID,DIFUNCT,CHECKSUM=1100-FFDF
// ---------------------------------------------------------
// Code
// ---------------------------------------------------------
-Z(CODE)CSTART,ISR_CODE=1100-FFDF
-P(CODE)CODE=1100-FFDF
// ---------------------------------------------------------
// Interrupt vectors
// ---------------------------------------------------------
-Z(CODE)INTVEC=FFE0-FFFF
-Z(CODE)RESET=FFFE-FFFF
// ---------------------------------------------------------
// The end
// --------------------------------------------------------- 上面是149的数据地址定义。
路径为
C:\Program Files\IAR Systems\Embedded Workbench 5.4 Evaluation\430\config
data memory Read-write memory (RAM): 0200 - 09FF
code memory Read-only memory (FLASH): 1100 - FFDF
const memoryRead-only memory (FLASH): 1100 - FFDF
也就是说:
1、RAM字节数为data memory
2、FLASH字节数(所谓的程序量)为code memory+
const memory 回复【6楼】liuzq1981
-----------------------------------------------------------------------
哦 谢谢 但是我现在想把flash当做EEPROM用 是不是只有Information的512字节能用啊? 不是, information 和 code 都可以用来保存数据, 只不过是用code部分的时候实现要确定你要保存数据的段没有被程序代码使用,
在information 和code中保存数据我都测试过没问题的
页:
[1]