-
Notifications
You must be signed in to change notification settings - Fork 0
Home
A Modest Stupid Embedded Operating System Basics
COPYRIGHT (C) LEAFGRASS
- Ousia is picked from ancient Greek.
- Mainly intend to describe the basics of an operating system core.
- Developed following KISS principle.
- Completely open and free, use it anywhere you wish!
-
core/
Ousia core routines. -
doc/
Complete documentation of Ousia. -
driver/
Different kinds of device drivers based on Ousia. They are all configurable. -
framework/
Framework based on Ousia. Such as shell, vfs, etc. They are scalable and configurable, either. -
include/
Header files of main routines of Ousia. -
platform/
Chip and board specific code, e.g. low-level library. Ousia porting code are also placed here. -
project/
Project source code. Include several sample project instances. -
script/
Useful scripts used while Ousia developing. -
support/
Basic supporting stuffs for Ousia developing and building. Useful template files are placed here, such as porting code template.
-
Install toolchain
-
Make
For a general purpose, these steps are enough, but there are some more steps needs to do for a specific platform.e.g. For stm32 on linux host, we use
dfu,serialorjtagto upload firmware:
- Install Codesourcery toolchain. (e.g.
arm-2011.03-42-arm-none-eabi) - Install
dfu-util/pyserial/openocd(all up to your preference).
Ps: In fedora or ubuntu,yumorapt-getinstall them shall be fine. - Resolve usb or serial access problems.
(e.g. copyousia/support/dfu/45-maple.rulesto/etc/udev/rules.d/) - Install minicom for uart print if you want to debug with console enabled.
Ps: Default port is/dev/ttyACMx - Do
makeandmake install.
- Create a directory named
PROJECT_NAMEin folderproject. - Add user source code.
- Create a file
rules.mkto specify source code related rules for makefile. - Update
TARGET_PLATFORMandPROJECT_NAMEin mainMakefile, then domake.
Ps: Refer to existing projects for further detailed information.
- Choose or create a branch of yourself to work on.
- Update source code, include those version related strings.
- Modify related Makefiles and configuration files.
- Build then do some testing on this branch.
- Commit it.
- Tag a new one if a new version is commited.
- Push this branch to remote repo.
- If this is a release version, update Ousia Release Notes.
- Create a directory named
PLATFORM_NAMEin folderplatform/, then nav to it. - Create three files:
rules.mk,config.mkandtarget.mk.
rules.mk: makefile source code related rules
config.mk: parameters or flags for toolchains and environment
target.mk: rules for building target - Create a directory named
portthere then create three files in it.
ousia_cfg.h: os scalability related configurations
ousia_port.h: header of porting code
ousia_port.c: implentation of porting - Create other porting related stuffs, such as linker scripts, if necessary.
- Update
TARGET_PLATFORMandPROJECT_NAMEin mainMakefile, then domake.
Only modify the header TODO in root Makefile
- Assign specific
TARGET_PLATFORMandPROJECT_NAME
- Modify related user customization items in
Makefilein source tree. - Do proper operation on hardware. (i.e. change boot jumper or reset or sth.)
- Then type
make installand it will do everything for you.
Ps: For stm32, there may be a bootloader, make bootloader will download
bootloader code to chip via serial. And for simulation on x86, no code
downloading procedure is needed. See Makefile for detailed information.
Parts of make system and libmaple stm32 low-level code are borrowed from libmaple.
Thanks to their excellent works! - leaflabs.com
Also great appreciations to the contributors! - nuttx.org
Many code are originally come or inspired from NuttX, a perfect and stable operating system.