Use

Learn how to use BeRTOS in your own application

Tutorials
Have a look at the Tutorial section in order to discover how to create your first application, learn to use the basic modules, and much more!
Case Studies
BeRTOS is used in many industrial and commercial applications. Look at real applications developed by companies and discover what they think about BeRTOS in the Case Studies section.
Example Projects
Following some examples, you can learn something new very quickly. As such, we have supplied a list of complete projects in order to show how to use the modules and drivers available in BeRTOS. You can find them in the Example projects section.

BeRTOS Features Index

BeRTOS was born as a extremely modular, highly optimized and fine-tuned operating system for embedded programming. As a result, each module has its own scope and can be used alone or in cooperation with other modules.

Kernel

BeRTOS currently supports a number of CPU families:

CPU Family Porting Status
ARM7TDMI Atmel AT91SAM7, NXP LPC2XXX
Cortex-M3 Luminary Stellaris LM3S, ST Microelectronics STM32, Atmel SAM3
Atmel AVR Most cpu supported (including Arduino)
PowerPC emulator
Intel/AMD x86 emulator
Intel/AMD x86-64 emulator

Have a look at the tutorial section for real world examples for some widespread development boards.

Kernel

BeRTOS features both a preemptive and a cooperative kernel with synchronization primitives.

Embedded systems are mostly I/O bound systems. In these systems the microprocessor/microcontroller spends the most part of its computing power doing... absolutely nothing!

Since the system simply waits for external events to happen we decided to implement a strong and robust kernel with very low memory footprint and high modularity. This allows the kernel to be used on a variety of different CPUs, even the smaller ones.

Currently the kernel code is very stable.

Kernel features

The kernel has a port layer (a single assembly function) that needs to be reimplemented each time a new CPU is added.

Core Drivers

BeRTOS is not only a kernel, it aims to supply full operating system services. To achieve this we need at least some core drivers for every CPU port.

These drivers are: system timer, debug system and serial comm driver.

Adding CPU support for an already present CPU family is quite simple since hardware manufacturers share peripherals design between the same CPU cores.

Core drivers are completely supported on all platforms.

MCU Internal Peripherals Drivers

Since BeRTOS aims to supply full operating system services, for every CPU port we try to implement as much drivers as possible. This section covers the current development status for MCU Internal peripheral drivers.

Driver /
MCU family
ADC UART FLASH I2C PWM SPI EMAC
Atmel AVR Yes Yes Yes Yes Yes Yes  
Atmel AT91SAM7 ARM Yes Yes Yes Yes Yes Yes Yes
Atmel SAM3N ARM No No No No No Yes  
Atmel SAM3X ARM No Yes No No No No Yes
STmicro STM32F103xx ARM Yes Yes Yes Yes No No  
Philips LPC23XX ARM No Yes Yes Yes No No No
Stellaris LM3S ARM Yes Yes Yes Yes No Yes  

Generic Indipendent Drivers

BeRTOS supplies a full set of CPU independent generic hardware drivers. To achieve this all drivers are structured to have a hardware abstraction layer (HAL) that isolates CPU specific code and makes porting to new CPU easy.

Current driver list:

Driver Status
ADC APIstable
Buzzerstable
Atmel Dataflashstable
I2C EEPROMstable
AT25Fxxx Atmel flash memoriesbeta
FT245RL USB to parallel converterbeta
Keyboardstable
I2C with bitbang supportstable
Displaytech 32122A Graphic LCDstable
Himax HX8347 LCD controllerstable
DC Motor with PIDstable
Alphanumeric LCDstable
MPC41 digital potentiometerstable
LM75 temperature sensor stable
MPxx6115A pressure sensor stable
NTCstable
TRIAC phase partializationstable
PWM APIstable
PCF85974 I2C port expanderbeta
RIT P14201 oled displaystable
Secure Digital card APIstable
Serial APIstable
Seven segment LCD display driverstable
Bitbanged SPIstable
Stepper motor with rampsstable
TAS5706A digital audio DSPstable
TC520 ADCobsolete
Thermostatstable
TI TMP123 temperature sensorstable
System timer APIstable
USB device APIbeta
Watchdogbeta

File system

BeRTOS supports two file systems. The first one is the mainstream FAT filesystem, using the FatFs library; the second is BattFs, a file system specifically planned for embedded platforms.

File system development takes place in the fs directory.

File System: FAT

The FAT file system is the de-facto standard for removable devices such as SD cards or Memory cards. BeRTOS supports read and write operations on all existing FAT file systems, ranging from FAT12 to FAT32, with support to long file names. This file system is light and fast and allows to easily exchange data through external memory devices.

FAT module is highly configurable, for example it can be compiled in read-only mode for some space saving.

File System: BattFS

BattFS (Batt File System), has been developed to solve problems specific to embedded systems; BattFS is a file system that can be used on any physical media and it's optimized to reduce RAM and ROM usage to meet the strict design guidelines we have used with all the others BeRTOS components.

The goal is to have a filesystem suitable for little flash and eeprom memories (like dataflash), reliable, robust and capable of wear-levelling the memory pages to increase its life.

The code is in beta stage. Currently you can create files, append data to them but file deletion is still not supported. Wear-levelling is achieved by rotating a page every time it is written. Plans are to add even transactions (a whole write can be performed atomically).

Highlights:

  • Scalability. The definitive file system for your embedded projects. Size doesn't matter.
  • Data integrity. All data are protected with checksums and consistency is maintained in every operation.
  • Written in ANSI C... so it can be used on any CPU.

BeRTOS Graphics and display management is very advanced. The system includes a complete graphic subsystem that can manage displays with support for fonts, bitmaps, clipping, text formatting and interactive menus, suitable for generating compact yet powerful GUI.

gps information sreen bertos color screen gps compass screen

 

This system is composed of several modules ranging from simple graphic primitives to complex menu management functions.

Module Status
Bitmaps manipulationstable
Lines drawingstable
Rectangles drawingstable
Simple windowing systemstable
Proportional and fixed size fontsstable
Text renderingstable
Simple Chartsstable
Menusstable

It's also available a console with command parser and command line history support similar to readline.

Focus on:

Algorithms

In embedded programming sometimes you have to cope with protocols, security systems and things like that. BeRTOS comes in help with a set of optimized portable algorithms:

Algorithm Status
CRC16stable
MD2beta
Cryptographically secure Random Poolbeta
Rotating hash checksumstable
TEA (Tiny Encryption Algorithm)stable
Stepper motor ramp generatorstable
PID Controllerstable
RLE (Run lenght en/decondig)stable

To get up to date informations look at the algorithms source code.

Network protocols

Since BeRTOS can also be used in very tiny systems, some simple communication protocols has been developed.

This is the current status:

Protocol Status
PocketBusstable
Keytag (for 125KHz transponders)stable
XModem protocolstable
NMEA GPS protocol parser stable
AFSK1200 modem stable
AX25 data link layer protocol beta
TCP/IP stack implementation (based on lwIP) stable
TFTP server module stable

For more information take a look at network directory.

Data Structures

BeRTOS supplies common data structures, implemented and optimized for low memory footprint and speed.

Module Status
FIFOstable
Hash tablestable
Embedded-optimized dynamic memory allocatorstable
Listsstable
Unlimited length bit arrays beta

Middleware

This section covers all BeRTOS modules that provide general purpose utility functions:

Module Status
Integers to/from host byte-order conversion stable
Eventsstable
C++ like exception handling in Cstable
Embedded-optimized printfstable
Command shell with historystable
Ini file readerstable

As usual, check source code for detailed reference.