3

I am trying to build a the simple built in hello-world example of the RIOT-OS on an emulated msba2 board, emulated by QEMU (Linux host). https://github.com/RIOT-OS/RIOT https://github.com/RIOT-OS/RIOT/wiki/Board%3A-MSBA2

I've created a linux kernel image and root file system for the qemu using buildroot, here is the .config file: http://pastebin.com/t0aJK0n2

Here is the QEMU code I use:

sudo qemu-system-arm -M versatilepb -m 256M -kernel /mnt/zImage -initrd
 /mnt/rootfs.ext2.gz -hda /mnt/arm926t_snapshot.img  -no-reboot -append 
"root=/dev/ram mem=256M ramdisk_size=700000 rdinit=/sbin/init panic=1 
rootfstype=ext2 rw" -serial stdio -net nic,macaddr=00:16:3e:00:00:01 -net 
tap,ifname=tap0,script=no,downscript=no -tftp 192.168.40.174

I downloaded the RIOT-OS from git and I also downloaded the toolchain suggested for ARM architecture here: https://github.com/RIOT-OS/RIOT/wiki/Family:-ARM

Here I downloaded the CodeBench toolchain for Linux: arm-2014.05-28-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 I know that I am emulating an arm926t architecture on the qemu which is ARM9 architecture and I know that ARM7 != ARM9, but I am hoping that I understood this article well, which I think says that ARM7 should be compatible with ARM9

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

I am doing this becouse buildroot can not build ARM7 architecture, only ARM9 and Cortex-M3, and I need ARM architecture for this project for reasons. Now, RIOT only support ARM7, but it also supports Cortex-M3 which buildroot can do, but when I tried to build it I got the error message "target CPU does not support ARM mode" which I couldn't get past, so I remained with the ARM9 architecture.(help with this is appriciated) But I am getting off topic here.

running uname -a on the emulated board I get this: enter image description here

So using tftp I downloaded the RIOT and the arm-none-eabi-gcc from the host to the emulated msba2 board, added the arm-none-eabi-gcc to path using the following command:export PATH=${PATH}:/home/arm-2014.05/bin/ and I went into the RIOT/examples/hello world and ran the following build command:

make BOARD=msba2

To which I get the following: enter image description here

Also if I try to just simply run arm-none-eabi-gcc I get the same thing.

As you might guess I am very new to embedded systems,emulations , RIOT-OS, stackoverflow, or Linux as a matter of fact so I am sorry if this is a noob question or if I didnt give enough information about the matter.

Citrullin
  • 2,269
  • 14
  • 29
Lexandro
  • 57
  • 6
  • 1
    So, you want to build RIOT-OS for this microcontroller board, therefore for some reason are building an entirely different OS (Linux) for an emulation of an entirely different board ([Versatile PB](http://infocenter.arm.com/help/topic/com.arm.doc.dui0224i/I1007079.html)), on the basis that the architecture of the respective CPUs is the only vaguely similar thing, and the issue is that doing that generates a picture of some text in an unreadable font. Is that the gist of it? I'm trying to get my head round things here, but I'm lost... – Notlikethat Aug 03 '15 at 20:39
  • Okay here is the gist of it Notlikethat:I am an intern at this company and I have never worked with embeded systems before. My boss gave me this project and said he wants to see qemu emulated arm boards running Riot os. The end goal is that these boards will have some kind of 6lowpan coap network and can communicate with each other. That is all the info I have been given and I got this far. Now I want to buil a hello-world example just to see if I need anything before I try creating a whole coap server. – Lexandro Aug 04 '15 at 07:47
  • Well, I guess you'll want an emulator/simulator for one of the actually supported boards/microcontrollers - qemu probably isn't the best choice in that regard (although I wouldn't be surprised if there's a version out there which can do a generic Cortex-M3). Cross-compile the RIOT code, run it in the simulated device on your PC - I still don't see where buildroot and Linux come in, much less an irrelevant emulated target on which you're apparently trying to run _an x86 cross-compiler_. – Notlikethat Aug 06 '15 at 21:51
  • Realistically though, I would suggest pushing back on your boss for a real dev board to save a whole load of unnecessary hassle, and help you build relevant hardware experience - something like [an ST Nucleo](https://github.com/RIOT-OS/RIOT/wiki/Board%3A-Nucleo-F091), with a built-in debugger and everything, can be had for [all of _£8!_](http://uk.farnell.com/stmicroelectronics/nucleo-f091rc/dev-board-stm32f091rc-stm32-nucleo/dp/2456785?MER=i-9b10-00002068). Maybe remind him how much a few hours of engineering time wasted on unsatisfactory solutions costs in comparison ;) – Notlikethat Aug 06 '15 at 22:02
  • 2
    Have you seen [#3377: "boards/qemu-arm: Add support for lm3s6965evb board for testing in qemu-system-arm"](https://github.com/RIOT-OS/RIOT/issues/3377)? Your input would be very welcome! We have a very active mailing list, too, and our IRC channel is well frequented by the most active contributors. Please see http://riot-os.org/. (Unrelated: *never*, **never**, ***never*** run QEMU with sudo! Also mind Notlikethat's comment: real hardware is more fun. :) ) – Kijewski Aug 07 '15 at 22:11
  • Thank you guys for all the anwsers. I don't think I'll get to work with real hw, my boss doesn't want to buy any hardware until the he saw the program run in an emulated environment. So judging by this post (#3377) currently there is no way of running RIOT-OS in an emulated arm environment? If so I might just be able to convince my boss to finally buy a real piece of metal, or get assigned to another project. – Lexandro Aug 11 '15 at 08:16

0 Answers0