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.

[参考译文] C2000WARE:CPU1 链接器是否会查看之前构建的 CPU2 映射?

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1584878/c2000ware-does-the-cpu1-linker-look-at-a-previously-built-cpu2-map

器件型号: C2000WARE

下面似乎总是有效的:.map 文件显示指针是在两个 CPU 之间正确共享的,但我完全困惑你怎么做?  CPU1 链接器如何知道将这些外部指针放入.sharedPtrs 段中。  

CPU1 的链接器是否会查看 CPU2 中定义的符号并尝试匹配它们?  我的构建命令中没有任何指向 CPU 的命令。

非常棒!!

cpu1 main.c
extern Uint16 *CBdataProcess;
extern int16 *MB1dataProcess;
extern int16 *MB2dataProcess;

cpu1 link.cmd
.sharedPtrs : > RAMGS12, PAGE = 1

cpu2 main.c
#pragma DATA_SECTION(CBdataProcess,  ".sharedPtrs");
#pragma DATA_SECTION(MB1dataProcess, ".sharedPtrs");
#pragma DATA_SECTION(MB2dataProcess, ".sharedPtrs");
Uint16 *CBdataProcess = 0;
int16 *MB1dataProcess = 0;
int16 *MB2dataProcess = 0;

cpu2 link.cmd
.sharedPtrs : > RAMGS12, PAGE = 1

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

    您好、  

    请提供更多详细信息 — 这是否是您为每个 CPU 拥有项目的系统项目?  

    或  
    您是否为每个 CPU 都有单独的项目。  

    另外,请告诉我您正在使用哪个工具链 —  CCS 版本/编译器反转以及您正在使用的 C2000 器件

    此致

    Siddharth  

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

    尊敬的 Siddharth:您好、每个 CPU 都有单独的项目。 CCS 版本  20.3.1.5___1.9.1、TMS320F2837xD。

    我开始 认为这是巧合。 我目前的计划是从 CPU_x 映射中读取地址、并在 cpu_y cmd 链接器中读取硬代码(除非您有更好的建议?)

    此致、John

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

    John

    由于在两个链接器命令文件中、 共享 Ptrs 都已分配给 RAMGS12、因此您可能会看到这种行为。  

    但我认为最好在 CPU 链接器命令文件中对地址进行硬编码。

    此致

    Siddharth