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.

[参考译文] CC2652R7:如何定义 noinit ram

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1475285/cc2652r7-how-to-define-noinit-ram

器件型号:CC2652R7

工具与软件:

您好!

我想知道如何定义 RAM 的 noinit 段、该段通过软重启保持不变。 到目前为止、我已经在链接器文件中将 ram 的一段定义为 noinit、然后使用属性 将对象放置在 ram 的该段中。 我在映射文件中看到它被放置在那里、然而、当我执行 sysreset 时、该值看起来像是复位回0、即使我在每次启动时都会递增。 下面我将编辑内容附加到了项目使用 project_zero 作为基础的.cmd 文件。

 * Memory Sizes
 */
 
 #define NOINIT_SIZE  0x00001000
 
 
 
 
 
 /*******************************************************************************
 * Memory Definitions
 ******************************************************************************/

/*******************************************************************************
 * RAM
 */
 #define NOINIT_START      (RAM_END - NOINIT_SIZE)





 /*******************************************************************************
 * System Memory Map
 ******************************************************************************/
MEMORY
{
 
   SRAM (RWX) : origin = RAM_START, length = (RAM_END - NOINIT_SIZE - RAM_START + 1)
  NOINIT (RWX) : origin = RAM_END - NOINIT_SIZE + 1, length = NOINIT_SIZE
  
  
/*******************************************************************************
 * Section Allocation in Memory
 ******************************************************************************/
SECTIONS
{
  
  .noinit (NOLOAD):
  {
    *(.noinit)
  } > NOINIT
  

谢谢