Giter VIP home page Giter VIP logo

yasminos's Introduction

Yasmin OS

Yasmin OS is a lightweight Operative System for Cortex-M (M0/M0+/M3)

  1. Compact: only 2k for kernel
  2. Easy: no gigabyte of source code. Only few C module
  3. No priority: plain round robin scheduling

Included main.c show an example

Some note about build procedure. You need following tools

  1. Eclipse with CDT. We use Indingo SR2
  2. GNU/ARM C/C++ development support v0.5.5.201310221100
  3. GCC Compiler 4.7. We use Codebench Lite from Mentor Graphics

Configure

To configure YasminOS:
edit config.mk and read comment inside file

Building

To build YasminOS:
cd Build
make

NOTE
actually makefile is for ms-dos not for unix system.

Usage

Functions

void YOS_InitOs(void *taskMemory, void *taskTopMemory);
	Initialize OS
	taskMemory: start of memory reserved to task
	taskTopMemory: end of memory rserved to task

void YOS_DisableIrq(void);
	Disable Irqs

void YOS_EnableIrq(void);
	Enable Irqs

void YOS_Lock(void);
	Disable preemption

void YOS_Unlock(void);  
	Enable preemption

void YOS_Start(void);  
	Start operative system

YOS_Task_t *YOS_AddTask(YOS_Routine_t task, int taskSize);
	Add task
	task: pointer to function
	taskSize: stackSize
	NOTE: function allocate also the tcb

void YOS_MutexInit(YOS_Mutex_t *mutex);
	Initialize a mutex
	mutex: pointer to a mutex object
	
bool YOS_MutexTryAcquire(YOS_Mutex_t *mutex);
	Try to acquire mutex. Return immediately
	mutex: pointer to a mutex object
	return: true if mutex is acquired, false otherwise

void YOS_MutexAcquire(YOS_Mutex_t *mutex);
	Acquire a mutex 
	mutex: pointer to a mutex object

void YOS_MutexRelease(YOS_Mutex_t *mutex);
	Release a mutex 
	mutex: pointer to a mutex object

void YOS_EventInit(YOS_Event_t *event);
	Init a event object 

DWORD YOS_EventWait(YOS_Event_t *event);
	Wait for event object 
	event: pointer to an event object
	return: event flag mask 

void YOS_EventSignal(YOS_Event_t *event, int flag);
	Signal and event
	event: pointer to an event object 
	flag: number flag to set

void YOS_Yield(void);
	Yield control to next task

For any question [email protected]

yasminos's People

Contributors

geppo12 avatar koansoftware avatar

Stargazers

xunyugu avatar KUNAL ROY avatar  avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

kobrabyte idkunal

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.