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.

[参考译文] RTOS/CC2640R2F:如何创建定制存储器部分?

Guru**** 2589035 points


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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/599927/rtos-cc2640r2f-how-to-create-custom-memory-section

器件型号:CC2640R2F

工具/软件:TI-RTOS

您好!

使用 simple_peripheral_oad_offchip 或这个 SDK 1.35。

此时、尝试创建如下所示的自定义存储器部分:

   Group (组)> SRAM
   {
             .data
#ifndef cache_as RAM
              .bss
#endif /* cache_as RAM *
             .vtable
             .vtable_ram
              VTABLE RAM
             sysmem
             .nonretenvar
   } load_end (heapStart)

我想在 SRAM 中将.taskStack 添加到此列表中、尝试以下操作:

Task.common$.instanceSection =".taskStatic";          
Program.sectMap[".taskStatic"]= new Program.SectionSpec ();         
Program.sectMap[".taskStatic"].loadSegment ="SRAM";             
Program.sectMap[".taskStatic"].runSegment ="SRAM";              

已尝试删除 Task.common$.instanceSection =".taskStatic";  

代码编译正常、但当我尝试使用 LAUNCHXL-CC2640R2F 进行调试时、我会收到以下警告:


Cortex_M3_0:JTAG 通信错误:(错误-1170 @ 0x0)无法访问 DAP。 重置设备、然后重试此操作。 如果错误仍然存在、请确认配置、对电路板进行下电上电和/或尝试更可靠的 JTAG 设置(例如、较低的 TCLK)。 (仿真包6.0.576.0)
Cortex_M3_0:在断开连接之前无法从目标中删除调试状态。  程序存储器中仍可能嵌入了断点运算代码。  建议您在连接之前重置仿真器、并在继续调试之前重新加载程序

我是否需要在链接器命令文件中添加任何内容? 或者我是否缺少其他东西?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    让它正常工作、必须移动
    Task.common$.instanceSection =".taskStatic";
    Program.sectMap[".taskStatic"]= new Program.SectionSpec ();
    Program.sectMap[".taskStatic"].loadSegment ="SRAM";
    Program.sectMap[".taskStatic"].runSegment ="SRAM";

    一直到 app_ble.cfg 文件的末尾。 但不确定它现在的工作原理。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我认为您需要将其列在"var task"定义下。

    祝你一切顺利