Giter VIP home page Giter VIP logo

rki's Introduction

Rtems Kernel Image Project (RKI)

This project provides a starting point or example of how to configure an RTEMS application for your project. There are many ways to configure an RTEMS application, this project is just something I have done to help me run on various targets. It is put together from different examples I have found, most of which have been contributed by RTEMS developers.

Note
I have tested this on the Raspberry Pi and the SPARC/sis simulator with RTEMS 4.11. I have not tested this project with RTEMS 4.10. I am not sure the RAM disk code will compile and run on RTEMS 4.10.

This project configuration provides:

  • RAM Disk setup

  • NVRAM Disk setup

  • Network setup ( if the target supports it )

  • Shell setup and shell startup script

  • Example shell commands including whetstone and dhrystone benchmarks

  • Common Makefile for a couple of targets ( ARM/Raspberry Pi and SPARC/sis simulator )

Each target can be configured and compiled separately.

You can configure many of the options in the RKI. Take a close look at the following files:

Config Files
  • rtems_config.h

  • rki_config.h

  • rtems_net_config.h

How to build

Make sure you have the following set up correctly
  • arm-rtems4.11 and/or sparc-rtems4.11 tools installed

  • arm/raspberrypi and or sparc/sis BSP compiled and installed

You then need to type, replacing the paths and ARCH/BSP appropriately

$ make ARCH=sparc-rtems4.11 BSP=sis RTEMS_TOOL_BASE=/home/cdesai/rtems/tools RTEMS_BSP_BASE=/home/cdesai/rtems/4.11

to build the executable.

How to run the RKI image

Here is how to run the rki program on the SPARC/sis simulator:

SPARC/sis
$ make ARCH=sparc-rtems4.11 BSP=sis RTEMS_TOOL_BASE=/home/cdesai/rtems/tools RTEMS_BSP_BASE=/home/cdesai/rtems/4.11    # build the image
$ sparc-rtems4.11-gdb legacy-build/sparc-rtems4.11-sis/rki.elf
(gdb) target sim
(gdb) load
(gdb) run

And the Raspberry Pi:

Raspberry Pi
$ make ARCH=arm-rtems4.11 BSP=raspberrypi RTEMS_TOOL_BASE=/home/cdesai/rtems/tools RTEMS_BSP_BASE=/home/cdesai/rtems/4.11    # build the image
$ cp legacy-build/arm-rtems4.11-raspberrypi/rki.bin legacy-build/arm-rtems4.11-raspberrypi/kernel.img

( Now copy the kernel.img to your Raspberry Pi SD card. Be sure to back up the old kernel.img! )

Commands to try

When you run the application on a target, you should get the shell prompt. Try some of these commands:

List all tasks
# task
List all semaphores
# sema
Run the Dhrystone benchmark
# dhrystone
Run the Whetstone benchmark
# whetstone
Create 5 tasks that run for 10 seconds
# taskdemo

There are quite a few more commands to run, just type

# help

You can also add your own commands, and include a startup script

Check out what the startup script is doing by typing:

# cat shell-init

In the case of the Raspberry Pi BSP, it formats a 64 Megabyte RAM disk with the RTEMS file system, then mounts the disk on /ram.

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.