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.

[参考译文] TMS320F28388D:如何将一组变量放置在特定的存储器区域中并获取其起始地址(在 CM 中)

Guru**** 2611705 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1159149/tms320f28388d-how-to-place-a-set-of-variable-in-a-specific-memory-region-and-get-its-starting-address-in-cm

器件型号:TMS320F28388D

尊敬的所有人:

我在这里停留了很长时间、尝试了很多、但没有任何效果。 问题是,正在尝试将一组变量存储在闪存中的所需位置。 在运行程序时、我需要这些变量地址。 我知道我们需要配置链接器文件来完成此操作。 但我也不知道如何执行该操作。我看到了一个链接器文件、我认为它会对我有所帮助、但在我缺少的某个文件中、请为我提供指导。


组:> CMBANK0_SECTOR7开始(TEXT_START),大小(TEXT_SIZE)

ABCD
XYZ

然后将变量"test"存储为

int test __attribute__((section("abcd")));

然后、当我在运行时运行代码时、我只需要来自 text_start 变量的起始地址值。 就像我们在 RAM 中运行代码所做的那样(将代码的某些部分从闪存复制到 RAM)

谢谢、  

步进