Code Monkey home page Code Monkey logo

pandaboard-freertos's Introduction

-----------
DESCRIPTION
-----------

This demo builds an application and the FreeRTOS (http://www.freertos.org/) kernel for the Cortex-M3 processors
on the Pandaboard. The demo application will simply flash led D2.

The demo can either be run directly by u-boot or loaded using the Linux remoteproc framework found at
git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc.git.  The demo was tested against the rpmsg_3.2_rc4
branch of remoteproc.

------------
HOW IT WORKS
------------

The application and kernel are linked into a single file - Demo.bin. This file is loaded by U-Boot into
memory and a loader application is run on the MPU (Cortex-A9). The loader application sets up the L2 MMU
for the Cortex-M3 to map the load address of Demo.bin to the Cortex-M3 virtual address 0x0. The GPIO1 addresses
are also mapped into the Cortex-M3 virtual address space to allow the demo to flash the led. The loader then
releases the Cortex-M3 from reset at which point it should boot the application.

--------
BUILDING
--------

Simply run make - everything should build assuming mkimage and an appropriate cross-compiler are installed.

If using the Linux remoteproc framework to load the firmware you will also need to build the kernel module located
under the KernelModule directory.  This module simply powers up the processor once the firmware is loaded (as
there does not appear to be a userspace interface to do this yet).

-------
RUNNING
-------

* If running directly from u-boot:

Copy boot.scr, loader.img and Demo.bin to an SD card with U-boot and X-loader already installed.  Insert the
SD card into the Pandaboard and reboot - U-boot should run the boot.scr automatically and boot the FreeRTOS
kernel on the first Cortex-M3 processor which will continuously flash led D2.

* If using the Linux remoteproc framework:

Make sure the kernel you're using uses the same remoteproc version as in the branch listed above.  Otherwise
you may have to update the resources table structure (found in Application/startup.c) to match the version
you are using.  To run the demo:

Copy Demo.out to /lib/firmware/ducati-m3-core0.xem3 on the root filesystem and reboot.
Load the kernel module (insmod rproc.ko) to start the Cortex-M3 processor - you should get output similar to
the following and the light should be flashing:

[   41.406219] rproc: module license 'Dual DSD/GPL' taints kernel.
[   41.412750] Booting processor
[   41.415893] omap-rproc omap-rproc.1: powering up ipu_c0
[   41.426269] omap-rproc omap-rproc.1: Booting fw image ducati-m3-core0.xem3, size 76605
[   41.434692] omap-iommu omap-iommu.0: ducati: version 2.1
[   41.443786] omap-rproc omap-rproc.1: remote processor ipu_c0 is now up

pandaboard-freertos's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pandaboard-freertos's Issues

Build Recommendations

Is there a particular linux build that you can recommend that this works on? I was able to run demo.bin via U-boot from the linaro 12.06 release but not using rproc.ko. I get the following error:

root@android:/system # insmod rproc.ko
[ 81.906555] Booting processor
[ 81.910491] rproc remoteproc1: powering up ipu_c0
[ 81.929229] rproc remoteproc1: Booting fw image ducati-m3-core0.xem3, size 77021
[ 81.937744] omap-iommu omap-iommu.1: ipu: version 2.1
[ 81.943145] rproc remoteproc1: unsupported fw ver: 0
[ 81.969787] omap_hwmod: ipu: failed to hardreset

Any thoughts?

-Joshua Zarr

unsupported fw ver: -1048576

Hi,

I try to get your FreeRTOS port for the Pandaboard up and running via remoteproc. Sofar I'm able to start the remote processor. But unfortunately it won't run the Firmware. I get the error 'unsupported fw ver: -1048576'.

I found this issue you had 7 month ago #1 . So I tried to update the startup.c according to my remoteproc.h but I wasn't able to determine what I have to change.

I'm using ubuntu linaro build 13.01 with the kernel version 3.4.0-2-linaro-llt-omap.

Any help would be appreciated.

Sincerely,
Thomas

Loader.img make fails

I'm trying to build this demo and the build fails when making the loader.img.
$ make Demo.bin succeeds, but
$ make loader.img always fails with

arm-none-eabi-gcc -Tcortex-a9.lds -mcpu=cortex-a9 -o loader.out loader.c
/usr/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/crt0.o: In function `start':
(.text+0x64): undefined reference to `__bss_start__'
/usr/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/crt0.o: In function `start':
(.text+0x68): undefined reference to `__bss_end__'
/usr/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x16): undefined reference to `_exit'
/usr/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/libc.a(lib_a-fini.o): In function `__libc_fini_array':
fini.c:(.text.__libc_fini_array+0x20): undefined reference to `_fini'
/usr/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/libc.a(lib_a-init.o): In function `__libc_init_array':
init.c:(.text.__libc_init_array+0x1e): undefined reference to `_init'
collect2: error: ld returned 1 exit status

I'm compiling on the Pandaboard with Ubuntu 12.04LTS server:

$ uname -a
Linux pandaes1-bf 3.2.0-1412-omap4 #16-Ubuntu SMP PREEMPT Tue Apr 17 19:38:42 UTC 2012 armv7l armv7l armv7l GNU/Linux
$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/bin/../lib/gcc/arm-none-eabi/4.7.3/lto-wrapper
Target: arm-none-eabi
Configured with: /build/buildd/gcc-arm-none-eabi-4-7-2013q1/src/gcc/configure --target=arm-none-eabi --prefix=/build/buildd/gcc-arm-none-eabi-4-7-2013q1/install-native --libexecdir=/build/buildd/gcc-arm-none-eabi-4-7-2013q1/install-native/lib --infodir=/build/buildd/gcc-arm-none-eabi-4-7-2013q1/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/build/buildd/gcc-arm-none-eabi-4-7-2013q1/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/build/buildd/gcc-arm-none-eabi-4-7-2013q1/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/build/buildd/gcc-arm-none-eabi-4-7-2013q1/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/build/buildd/gcc-arm-none-eabi-4-7-2013q1/install-native/arm-none-eabi --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.7.3 20130312 (release) [ARM/embedded-4_7-branch revision 196615] (GNU Tools for ARM Embedded Processors)
$ mkimage -V
mkimage version 2011.09

What am I missing here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.