Skip to content

checko/F4OS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A small, real time OS for ARM Cortex-M4F microcontrollers.

Originally developed for the STM32F4DISCOVERY, but should work
just fine on any STM32F40x microcontroller.  Other STM32F4s should
be very easy to port to.

Initial support has also been added for TI LM4F120H5 microcontrollers
(TI Stellaris Launchpad).  Fewer peripherals have been developed, but
the core OS works well.

Requirements and building:

Building requires an arm-none-eabi- toolchain with Cortex-M4 hardfloat
support.  For known working toolchains, see
https://github.com/prattmic/arm-cortex-m4-hardfloat-toolchain or
https://launchpad.net/gcc-arm-embedded.

F4OS uses a Kconfig build configuration system.  Select the configuration
with "make menuconfig" or select a defconfig with "make example_defconfig".
See "make help" for a list of available defconfigs.  Kconfig is provided
by the kconfig-frontends project
(http://ymorin.is-a-geek.org/projects/kconfig-frontends).  This project
is included in tools/ directory and should be built automatically before
the first OS build.  It requires automake, libtoolize, gperf, flex, bison,
and libncurses-dev to build.  See the README in tools/kconfig-frontends/
for more details.

Flashing:

For flashing and debugging on the STM32F40x, texane's stlink is
recommended: https://github.com/texane/stlink

With stlink in your path, "make burn" will flash your device.

For the LM4F120H5, I have used the JLink JTAG debugger, which
'make burn' will attempt to use.  The Stellaris Launchpad also has an
integrated debugger, which you should be able to use with lm4tools:
https://github.com/utzig/lm4tools

'make burn' calls flash.sh in the chip folder, so modify it to
your heart's content.

User programs:

By default, the shell program in usr/shell/ is built and run at
boot.  The main() function in main.c is called by the scheduler
before task switching begins and should be used to create tasks
that run at boot.  The USR environmental variable selects the
userspace program to build.  The Makefile in usr/$USR/ will be
called at build time to create usr_$USR.o.

I/O:

On the STM32F40x, resource 0 (stdin/out) is the USB device, which
should appear as a USB CDC ACM (Virtual Terminal) device on the host.
Resource 1 (stderr) is the UART on PB6 (TX) and PB7 (RX).  The default
resources can be changed in the chip.c file for each chip.

On the LM4F120H5, resources 0 and 1 default to UART0 on PA0 and PA1.

Porting:

It should be possible to port to additional Cortex M4F cores simply
by using the two chip/ folders as an example.  The core of what is
needed is a clock initialization function, and drivers for desired
peripherals.

Michael Pratt

About

A small RTOS for ARM Cortex-M4F microcontrollers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published