问题标签 [riot-os]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
697 浏览

gcc - 在 QEMU 仿真 ARM 板上构建 RIOT-OS hello-world 示例失败

我正在尝试在由 QEMU(Linux 主机)模拟的仿真 msba2 板上构建一个简单的 RIOT-OS 内置 hello-world 示例。 https://github.com/RIOT-OS/RIOT https://github.com/RIOT-OS/RIOT/wiki/Board%3A-MSBA2

我已经使用 buildroot 为 qemu 创建了一个 linux 内核映像和根文件系统,这里是 .config 文件: http: //pastebin.com/t0aJK0n2

这是我使用的 QEMU 代码:

我从 git 下载了 RIOT-OS,还在这里下载了建议用于 ARM 架构的工具链: https ://github.com/RIOT-OS/RIOT/wiki/Family:-ARM

在这里我下载了适用于 Linux 的 CodeBench 工具链:arm-2014.05-28-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 我知道我在 qemu 上模拟 arm926t 架构,它是 ARM9 架构,我知道 ARM7 != ARM9,但我希望我能很好地理解这篇文章,我认为 ARM7 应该与 ARM9 兼容

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dvi0027b/ar01s02s01.html

我这样做是因为 buildroot 无法构建 ARM7 架构,只能构建 ARM9 和 Cortex-M3,并且出于某种原因我需要 ARM 架构来完成这个项目。现在,RIOT 只支持 ARM7,但它也支持 buildroot 可以做的 Cortex-M3,但是当我尝试构建它时,我收到错误消息“目标 CPU 不支持 ARM 模式”,我无法通过,所以我仍然使用 ARM9 架构。(对此有帮助)但我在这里离开了话题。

在仿真板上运行 uname -a 我得到了这个: 在此处输入图像描述

因此,我使用 tftp 将 RIOT 和 arm-none-eabi-gcc 从主机下载到仿真 msba2 板,使用以下命令将 arm-none-eabi-gcc 添加到路径:export PATH=${PATH}:/home/arm-2014.05/bin/ 然后我进入 RIOT/examples/ hello world 并运行以下构建命令:

我得到以下信息: 在此处输入图像描述

此外,如果我尝试简单地运行 arm-none-eabi-gcc 我会得到同样的结果。

正如您可能猜到的那样,事实上我对嵌入式系统、仿真、RIOT-OS、stackoverflow 或 Linux 非常陌生,所以如果这是一个菜鸟问题或者我没有提供足够的信息,我很抱歉。

0 投票
1 回答
506 浏览

gcc - 警告:在 RIOT OS 上将指针从/转换为不同大小的整数

我尝试用 gcc 4.8.4 编译这个程序,然后这个程序将被上传到板 MSP430。我得到了警告

以下代码出现此错误:

中的问题

我该如何解决这个警告?

0 投票
1 回答
156 浏览

c++ - 有没有办法为 RIOT OS 添加新的语言支持(例如 D)?

D 可以访问目标环境中的 C/C++ 运行时库,它还允许 C 程序以类似的方式访问其函数。

[1] 有没有办法集成在 RIOT 上使用 D 程序的能力,就像在 D 编译器编译的二进制文件中一样?

0 投票
0 回答
955 浏览

c - RIOT OS Gpio 示例

我必须使用 RIOT OS,目前我正在测试一切如何工作(或不工作)。

信息:RIOT OS 是一个在微控制器和手臂上运行的物联网操作系统。

我在 Debian 下使用 Eclispe 进行开发,开发环境是在 RIOT 的 GitHub 指南之后设置的。导游

hello world 示例对我有用,没有问题。现在我想加载一些 RIOT 模块,然后我得到错误。

这就是我到目前为止所做的。

  1. 我为我的项目创建了一个新文件夹,复制 hello-world 示例并调整 makefile。
  2. 然后我像在指南中一样调整 riot 项目属性,仅用于我的示例。
  3. 创建新符号并包含 xml 并导入它们。
  4. 重新索引防暴项目
  5. 用我的示例代码更改了基本的 hello world 代码。
  6. 尝试构建它....

这是我的主要示例,它并没有做太多,只是初始化一个 gpio 引脚。

这是它的makefile

通过构建项目,我得到以下错误:

在此处输入图像描述

在英语中,它类似于:
- 目标“路径”的规则失败。
- 目标“链接”的规则失败。
- make: [link] 错误 2
- make(1): ["path/main.o"] 错误 1

这是 riot makefile 中发生错误的部分。它在两个文件(Makefile.include 和 Makefile.base)中完全相同。

在此处输入图像描述

我希望任何人都可以解释我做错了什么或我的错误在哪里。

编辑:

问题是 GPIO() 错误……它称为 GPIO_PIN() 导致错误。

0 投票
4 回答
1198 浏览

c - RIOT OS - 嵌入式平台的“标准输出”

我是第一次尝试 RIOT OS。下载源代码后,我可以非常轻松地构建应用程序,包括需要 ARM 工具链的目标。

hello-world 应用程序在我的 Linux 构建机器(使用 BOARD=native 构建)上运行良好,并在终端中打印。

当我切换到嵌入式平台(Nucleo F411,例如 ARM Cortex M4)时,我可以期望在哪里出现任何 puts() 或 printf() 调用?此外,如果它不是已经要去的地方,我该如何设置 printf() 去 UART1?

抱歉,如果这对 SO 来说太具体了。我不熟悉 RIOT OS 邮件列表,但我也会在那里尝试。

编辑: hello-world 示例真的很简单,如下所示:

在遵循此处的安装说明后,我正在使用 ARM GNU 工具链 gcc-arm-none-eabi-7-2017-q4 进行编译:链接。我想我需要一些额外的编译器标志,或者在上面的应用程序代码之外编辑板初始化函数。但是,在这个阶段,我不知道从哪里开始。我的最终目标是观察“Hello World!” 在我的开发套件的引脚 TX/D1 上配置它去那里后,“你正在运行......”。

0 投票
2 回答
581 浏览

makefile - cmake for embedded: remove Linux POSIX headers

So, I am developing an embedded library for RIOT OS. Since my library is using Cmake, but RIOT uses a simple Makefile, I just compile a static library and link this later to RIOT while compile time. So I compile the library: I pass all the include files to the CMAKE_C_FLAGS This is needed, since my library uses pthreads and RIOT has support for it.

So that works fine. But somehow cmake also tries to include linux header files for posix. Since this is embedded, it shouldn't do that.

So, my question: How can I tell cmake not to include the linux header files?

This is the current CMakeList.txt I use.

/e I tried the same with a Makefile. Same issue appears here.

There are more of these duplicate definition errors. Looks like they are all of the same nature.

Steps to reproduce:

  1. Clone this repository (branch: iota_new_implementation)

  2. cd into the folder examples/iota_transaction_node

  3. Execute make

Version with Makefile. Commit: 7e1d8884ab135ae64cee02c8c1a447015f4325bc

Version with CMake. Commit: dbf32e727889afa3efb466cfdc8561e697af48b0

in the Makefile of the example refers to this package. This Makefile is used to make the static library.

Cmake Log:

CmakeError.log

CMakeOutput.log

Console Output

Makefile:

Console Output

0 投票
1 回答
323 浏览

docker - 使用 Docker 构建 riot/helloworld

这是我的设置:

  1. docker pull riot/riotbuild
  2. wget https://github.com/RIOT-OS/RIOT/archive/2019.04.zip
  3. unzip 2019.04.zip
  4. cd RIOT-2019.04/examples/hello-world/
  5. make BUILD_IN_DOCKER=1 BOARD=stm32f4discovery all

    这一切都没问题。

  6. make BUILD_IN_DOCKER=1 BOARD=stm32f4discovery flash

    这一步失败了。错误是:

0 投票
2 回答
192 浏览

iot - RIOT 是否支持以太网物理层?

设置:

  1. 连接stm32f407vet6和LAN8720,连接以太网
  2. 代码在这里:https://github.com/RIOT-OS/RIOT/tree/master/examples/emcute_mqttsn

  3. cd RIOT/examples/emcute_mqttsn

  4. make BOARD=stm32f4discovery all flash term

  5. 使用ifconfig,未打印以太网接口信息。RIOT 是否支持以太网物理层?请看日志:

0 投票
1 回答
668 浏览

cmake - CMAKE Build 使用 arm-none-eabi-gcc 编译器失败...“netinet/in.h:没有这样的文件或目录”和“--检查编译器是否接受 -pthread - no”

我正在尝试将Zenoh 协议移植到 RIOT-OS。我使用 RIOT 的本机模拟器让它工作,但未能为 Board 编译代码。

问题出在我使用 CMAKE 构建 git repo 时。当我使用 linux 的 gcc 和 g++ 编译器编译它时,一切正常。

但是,当我使用arm-none-eabi-gcc 编译存储库时,构建失败。repo ZHe给出以下错误“致命错误:netinet/in.h:没有这样的文件或目录”....#include netinet/in.h>

回购Zenoh-C给出以下错误:

-- 正在寻找 pthread_create - 未找到“....”无法找到线程(缺少:Threads_FOUND)

Zenoh-C 回购错误

0 投票
1 回答
58 浏览

timer - 无法为 samr30-xplained 启用 GCLK 生成器(使用 RIOT OS)

简单来说:我正在尝试设置一个由外部源计时的定时器/计数器。该设备是 SAMR30-Xplained Pro,而 RIOT 是操作系统。

更详细一点:我正在尝试让 gclk 生成器(例如 6)连接到定时器/计数器(例如 TC4),并将生成器连接到 GCLK_IO(PA22)作为时钟源。只有生成器 0 处于活动状态并使计时器计数,但其他生成器甚至没有启动,即使我尝试启用它们。这是我的代码

有人知道这里发生了什么吗?RIOT 是否以某种方式禁用了它们?