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/MSP430F6779:CAN#39;t 使用"#pragma LOCATION 和 quot;

Guru**** 2522770 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/870928/ccs-msp430f6779-can-t-using-pragma-location

器件型号:MSP430F6779

工具/软件:Code Composer Studio

通常情况下、当通过"#define 定义"来定义"#pragma LOCATE" 时、可以使用"#pragma LOCATE"、但此代码是哪个端口来自 IAR 5.6

#pragma LOCATION ="RAMCODE"
void FlashBlkWriteData (const uint32_t * ptr_src、uint8_t NUMBER_OD_LWS) 

必须将"RAMCODE"用于设置的位置、因为 此函数位于要复制到 RAM 的闪存中。 这是从.xcl 文件中定义的

//代码

-QRAMCODE=FLASHcode//需要告知编译器用户将闪存代码复制到 RAM 代码
-Z (data) RAMCODE=4C00-6BFF//将其放置在 RAM 位置(4KB)

是否有任何方法或文档? 这可以使"#pragma LOCATION ="RAMCODE"起作用