主题中讨论的其他器件:CC2650、 CC2650STK、 UNIFLASH
工具/软件:Code Composer Studio
大家好、
是否有人在将 R防暴 OS 嵌入 CC2650_LAUNCHXL 方面有经验?
我无法理解 github.com/.../Board:-CC2650STK 中的指令
谢谢、此致、
Khoa
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.
工具/软件:Code Composer Studio
大家好、
是否有人在将 R防暴 OS 嵌入 CC2650_LAUNCHXL 方面有经验?
我无法理解 github.com/.../Board:-CC2650STK 中的指令
谢谢、此致、
Khoa
我已经更改了
#define Button1_DIO GPIO_PIN (0、13) #define BUTTON2_DIO GPIO_PIN (0、14) #define LED0_PIN GPIO_PIN (0、6) #define LED1_PIN GPIO_PIN (0、7)
然后
Board=cc2650stk make
然后由 Uniflash 将十六进制文件引导到 cc2650 Launchpad 中。
对吗?
谢谢、此致、
Khoa
我真的不知道。 我刚才 配置了、就像 我在 GitHub 上说的 那样。然后我在终端上收到了消息。
我仍然无法将数据发送到 cc2650 launchpad。 我不知道防暴 OS 初始板自动运行,或者我必须在 main()中添加初始功能。
gihub 上的代码不是完整的项目。
您应该克隆默认示例:
CD rio/examples CP -R default my_project cd my_project
然后将 gihub 上的这些行添加到 main.c 中。 如果使用 cc2650 Launchpad、则必须配置 board.h 和 periph_conf.h
很抱歉,我忘记了。 您必须在 rio/boards/native/include/board.h 中添加一些行:
// #define LED_GREEN_ON LED1_ON #define LED_GREEN_OFF LED1_OFF #define LED_GREEN_TOGGLE LED1_TOGGLE #define LED_RED_ON LED0_ON #define LED_RED_OFF LED0_OFF #define LED_RED_TOGGLE LED0_TOGGLE /**@}*/
我想您还没有阅读 过 riot OS 教程 。
您应该更改 make 文件中的行:
应用= my_project
并添加:
USEMODULE += auto_init
除了 Main.c 部分错误外、教程是正确的。
我不知道为什么暴动还没有修复它。
正确的 main.c:
#include
#include
#include "thread.h"
#include "shell.h"
#include "shell_commands.h"
#include "board.h"
#if feature_Periph_RTC
#include "periph/rtc.h"
#endif
#ifdef module_netif
#include "net/ntrc/pktdump.h"
#include "net/nv_argh
(int)、#int argh (int)#int argc、#int argh)
/*禁止编译器错误*/
(void) argc;//参数数。
(void) argv;//每个参数的值。 示例:argv[0] argv[1]
// printf ("hello world!\n");
PUs ("hello world!\n");
返回0;
}
int text (int argc、char ** argv){
/*禁止编译器错误*/
(无效) argc;
(无效) argv;
// printf ("hello world!\n");
PUT ("text_here\n");
返回0;
}
int led_0_on (int argc、char ** argv){//red
(无效) argc;
(无效) argv;
LED0_ON;
printf ("LED_RED_ON\n");
返回0;
}
int led_0_off (int argc、char ** argv){//red
(无效) argc;
(无效) argv;
LED0_OFF;
printf ("LED_RED_OFF\n");
返回0;
}
int led_1_on (int argc、char **argv){//green
(无效) argc;
(无效) argv;
LED1_ON;
printf ("LED_GREEN_ON\n");
返回0;
}
int led_1_off (int argc、char **argv){//green
(无效) argc;
(无效) argv;
LED1_OFF;
printf ("LED_GREEN_OFF\n");
返回0;
}
const shell_command_t shell_commands[]={
{"hello"、"prints hello world"、hello_world}、
{"CNN"、"在此处打印文本"、"文本"}、
//{"l1"、"控制 LED 1开/关"、LED_1}、
//{"L0"、"控制 LED 0开/关"、LED_0}、
{"L0_ON"、"打开 LED 0"、LED_0_ON}、
{"L0_OFF"、"关闭 LED 0"、LED_0_OFF}、
{"L1_ON"、"打开 LED 1 "、LED_1_ON}、
{"L1_OFF"、"关闭 LED 1 "、LED_1_OFF}、
{ NULL、NULL、NULL }
};
int main (void)
{
printf ("test UART 1\n");
#ifdef feature_Periph_RTC
RTC_init();
#endif
#ifdef MODULE_NETIF
GNRC_netreg_entry_t dump = GNRC_NETREG_entry_init_PID (GNRC_NETREG_DEMUX_CTX_ALL、
nFRC_pktdump_pid);
GNRC_netreg_register (GNRC_NETTYPE_UNDEF、转储);
#endif
LED_RED_ON;
LED_GREEN_ON;
(void) PUT ("欢迎参加暴乱!");
printf ("test UART 2\n");
char line_buf[shell_default_BUFSIZE];
// shell_run (NULL、line_buf、shell_default_BUFSIZE);
shell_run (shell_commands、line_buf、shell_default_BUFSIZE);
// shell_init (&shell、shell_commands、UART0_BUFSIZE、uart0_readc、uart0_putc); //这是错误的。 不奏效
// shell_run (&shell);//错误。 可能是旧版本
返回0;
}
这很奇怪。 我将映像加载到我的 cc2650 Launchpad 中、效果良好。 这些是来自 UART 的消息
main():这是一场暴乱! (版本:2017.04-devel-360-g408d1 )测试 UART 1 欢迎参加 R防暴! 测试 UART 2.
您的操作系统是什么? 我使用的是 Linux。
Linux 中的文件可能与窗口有问题?
e2e.ti.com/.../my_5F00_project.zip
好的。 我认为您应该打开我的代码并将其复制到您的 make 和 main.c
然后运行 make 文件以生成 hex 文件。
配置 cc2650 launchpad (board.h & periph_conf.h)
您应该尝试以下操作: https://github.com/aabadie/riot-apps/tree/master/hello-world
BOARD=cc2650stk全部制作
我的 cc2650 Launchpad 正常工作