This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS 编译后 代码的RAM空间与实际有出入

Other Parts Discussed in Thread: MSP430F5659

您好,我在ccs5.4里建了一个msp430F5659的工程,其中做了一个构造体用来存储数据,构造体有24kByte。

但是编译生成后的.map查看RAM的使用量,发现并没有24kBytes。麻烦您能帮我看看这个问题吗,谢谢。。

构造体声明的位置

/sys/Bluetooth/BtDrvM_Spp.c

T_DBTC_SPP_MNGTBL g_taBTCSsp_Mng;

附件是我的工程

HBM2TestProject_140228.zip
  • 楼主你好!

    g_taBTCSsp_Mng 在程序中有使用到吗?使用了g_taBTCSsp_Mng的函数是否有调用?

  • 谢谢您的提示,确实还没有用到,我修改了一下程序,在别处调用。

    会出现下面的warning

    #17003-D</a> relocation from function "BtDrvD_Com_Commsend" to symbol "g_taBTC_Mng" overflowed; the 20-bit relocated address 0xf65da is too large to encode in the 16-bit field (type = 'R_MSP430_ABS16_MSPX' (15), file = "./Sys/Bluetooth/BtDrvD.obj", offset = 0x00000010, section = ".text:BtDrvD_Com_Commsend") BtDrvD.c /HBM2TestProject_last/Sys/Bluetooth line 151 C/C++ Problem

    于是我把Compiler里的 [Indicates what data must be near]属性改成了none,warning消除了。

    请问这样改对吗,还有其他方法吗,改完后是否会影响程序的执行速度和ROMl量,谢谢。。

  • 补充一下,[Specify the data memory model] 设置为restricted