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/CC2650:identifier "SUCC"未定义(在 cc2650闪存中保存变量)

Guru**** 2577385 points
Other Parts Discussed in Thread: CC2650, BLE-STACK

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/565523/ccs-cc2650-identifier-success-is-undefined-save-a-variable-in-cc2650-flash

器件型号:CC2650
Thread 中讨论的其他器件: SYSBIOSBLE-STACK

工具/软件:Code Composer Studio

大家好、我正在尝试在 cc2650 launchpad 上测试闪存示例(SWRU393d.pdf、第3.10节、第52页)。 但是、我收到以下错误。 感谢您的评论。

未定义标识符"成功"


我应该注意的是、我在 CCS 云中的 helloword 示例中添加了闪存代码。 遗憾的 是、系统也无法识别"uint8"、因此我手动将其定义添加到代码中(typedef unsigned char uint8)。

最后,我相信 Board_initGeneral()-->在 helloword 中与 simple_peripheral_init ()-->在闪存示例中会有冲突;!

我在此复制闪存示例(SWRU393d.pdf、第3.10节、第52页):

//客户 NV 项目-范围0x80 - 0x8F -这必须与绑定条目的数量相匹配
#define BLE_NVID_CUST_START 0x80 //!<客户 NV ID 的开头
#define BLE_NVID_CUST_END 0x80 //!<客户 NV ID 结束
以下示例显示了如何使用 SNV 闪存读取和写入一个字节阵列:
#define BUF_LEN 10.
#define SNV_ID_APP 0x80
uint8 buf[BUF_LEN]={0、};
//初始化应用程序
simple_peripheral_init();
uint8 status =成功;
//从 SNV 闪存读取
状态= osal_SNV_read (SNV_ID_APP、BUF_LEN、(uint8 *) buf);
if (status!=成功)

display_write_string_value ("SNV 读取失败:%d"、status、LCD_page5);
//首次写入以初始化 SNV ID
OSAL_SNV_WRITE (SNV_ID_APP、BUF_LEN、(uint8 *) buf);

//递增值并写入 SNV 闪存
uint8 x;
对于(x = 0;x < BUF_LEN;x++)
buf[x]= x + 1;
状态= osal_SNV_write (SNV_ID_APP、BUF_LEN、(uint8 *) buf);
if (status!=成功)
display_write_string_value ("SNV write fail:%d"、status、LCD_page6);
其他
display_write_string_value ("复位数:%d"、buf[0]、lcd_page6);

这里是 helloworld 示例(来自 CCS Cloud)

/* XDC 模块接头*/
#include
#include

/* BIOS 模块标题*/
#include

/*示例/板头文件*/
#include "Board.h"

/*
 * ==== main ====
 *
int main()

   /*呼叫板初始化函数*/
   Board_initGeneral();

   system_printf ("hello world\n");

   /*
    * 正常的 BIOS 程序将调用 BIOS_start()来启用中断
    * 并启动调度程序并使 BIOS 进入新状态。  但是、这个程序
    * 是一个简单的完整性测试,调用 BIOS_exit()。
    *
   BIOS_exit (0); //终止程序并转储 SysMin 输出*/
   返回(0);


谢谢

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

    Farshhad、

    您曾尝试过哪些示例? OSAL_svn_read()与 BLE-Stack 示例紧密耦合,在这些示例中,它与 iCall 集成,以便与 BLE 堆栈任务通信。 我将参考 simple_peripheral 示例以供参考。

    Tom