Miosix  2.0alpha1
Settings

Macros

#define WITH_RTC
 
#define SCHED_TYPE_PRIORITY
 
#define WITH_FILESYSTEM
 
#define WITH_DEVFS
 
#define SYNC_AFTER_WRITE
 
#define WITH_BOOTLOG
 
#define WITH_ERRLOG
 

Variables

const unsigned int miosix::SERIAL_PORT_SPEED =115200
 Serial port baudrate.
 
const unsigned int miosix::AUX_SERIAL_SPEED =9600
 Aux serial port baudrate. More...
 
const unsigned int miosix::MAIN_STACK_SIZE =4*1024
 
const unsigned int miosix::TICK_FREQ =200
 
const unsigned int miosix::defaultSerial =1
 Serial port.
 
const unsigned char miosix::MAX_OPEN_FILES =8
 
const unsigned int miosix::STACK_MIN =256
 Minimum stack size (MUST be divisible by 4)
 
const unsigned int miosix::STACK_DEFAULT_FOR_PTHREAD =2048
 
const unsigned int miosix::MAX_PROCESS_IMAGE_SIZE =64*1024
 
const unsigned int miosix::MIN_PROCESS_STACK_SIZE =STACK_MIN
 
const unsigned int miosix::SYSTEM_MODE_PROCESS_STACK_SIZE =2*1024
 
const short int miosix::PRIORITY_MAX =4
 
const unsigned char miosix::MAIN_PRIORITY =1
 

Detailed Description

Macro Definition Documentation

#define SCHED_TYPE_PRIORITY

If uncommented selects the priority scheduler

#define SYNC_AFTER_WRITE

Increases filesystem write robustness. After each write operation the filesystem is synced so that a power failure happens data is not lost (unless power failure happens exactly between the write and the sync) Unfortunately write latency and throughput becomes twice as worse By default it is defined (slow but safe)

#define WITH_BOOTLOG

Uncomment to print bootlogs on stdout. By default it is defined (bootlogs are printed)

#define WITH_DEVFS

Allows to enable/disable DevFs support to save code size By default it is defined (DevFs is enabled)

#define WITH_ERRLOG

Uncomment for debug information on stdout. By default it is defined (error information is printed)

#define WITH_FILESYSTEM

Allows to enable/disable filesystem support to save code size By default it is defined (filesystem support is enabled)

#define WITH_RTC

Uncomment to enable support for RTC. Time-related functions depend on it. By default it is defined (RTC is active)

Variable Documentation

const unsigned int miosix::AUX_SERIAL_SPEED =9600

Aux serial port baudrate.

Uncomment to enable USART1 as well. This is only possible if WITH_DEVFS is defined in miosix_settings.h The device will appear as /dev/auxtty.

const unsigned char miosix::MAIN_PRIORITY =1

Priority of main() The meaning of a thread's priority depends on the chosen scheduler.

const unsigned int miosix::MAIN_STACK_SIZE =4*1024

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1.5KB) and the LPC2138 has 32KB of RAM so there is room for a big 4K stack.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1KB) but the STM32F100CB only has 8KB of RAM so the stack is only 1.5KB.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1KB) but the STM32F100RB only has 8KB of RAM so the stack is only 1.5KB.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1.5KB) and the STM32F103CB has 20KB of RAM so use a small 1.5K stack.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1.5KB) and the STM32F103VE has 64KB of RAM so there is room for a big 4K stack.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1.5KB) and the STM32F103ZE has 64KB of RAM so there is room for a big 4K stack.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1.5KB) and the STM32F207ZG has 128KB of RAM so there is room for a big 4K stack.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1.5KB) and the STM32F207IG has 128KB of RAM so there is room for a big 4K stack.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1.5KB) and the STM32F151C8 has 10KB of RAM so use a small 1.5K stack.

Size of stack for main(). The C standard library is stack-heavy (iprintf requires 1KB) but the STM32F407VG only has 192KB of RAM so there is room for a big 4K stack.

const unsigned char miosix::MAX_OPEN_FILES =8

Maximum number of open files. Trying to open more will fail. Cannot be lower than 3, as the first three are stdin, stdout, stderr

const unsigned int miosix::MAX_PROCESS_IMAGE_SIZE =64*1024

Maximum size of the RAM image of a process. If a program requires more the kernel will not run it (MUST be divisible by 4)

const unsigned int miosix::MIN_PROCESS_STACK_SIZE =STACK_MIN

Minimum size of the stack for a process. If a program specifies a lower size the kernel will not run it (MUST be divisible by 4)

const short int miosix::PRIORITY_MAX =4

Number of priorities (MUST be >1) PRIORITY_MAX-1 is the highest priority, 0 is the lowest. -1 is reserved as the priority of the idle thread. The meaning of a thread's priority depends on the chosen scheduler.

const unsigned int miosix::STACK_DEFAULT_FOR_PTHREAD =2048

Default stack size for pthread_create. The chosen value is enough to call C standard library functions such as printf/fopen which are stack-heavy

const unsigned int miosix::SYSTEM_MODE_PROCESS_STACK_SIZE =2*1024

Every userspace thread has two stacks, one for when it is running in userspace and one for when it is running in kernelspace (that is, while it is executing system calls). This is the size of the stack for when the thread is running in kernelspace (MUST be divisible by 4)

const unsigned int miosix::TICK_FREQ =200

Frequency of tick (in Hz). The LPC2138 timer in the Miosix board is clocked at 14745600Hz which cannot be divided by 1000. So we're using a 200Hz tick rate. This implies the minimun Thread::sleep value is 5ms For the priority scheduler this is also the context switch frequency

Frequency of tick (in Hz). The frequency of the STM32F100CB timer in the stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz tick and the minimun Thread::sleep value is 1ms For the priority scheduler this is also the context switch frequency

Frequency of tick (in Hz). The frequency of the STM32F100RB timer in the stm32vldiscovery board can be divided by 1000. This allows to use a 1KHz tick and the minimun Thread::sleep value is 1ms For the priority scheduler this is also the context switch frequency

Frequency of tick (in Hz). The frequency of the STM32F103CB timer in the Miosix board can be divided by 1000. This allows to use a 1KHz tick and the minimun Thread::sleep value is 1ms For the priority scheduler this is also the context switch frequency

Frequency of tick (in Hz). The frequency of the STM32F103VE timer in the mp3v2 board can be divided by 1000. This allows to use a 1KHz tick and the minimun Thread::sleep value is 1ms For the priority scheduler this is also the context switch frequency

Frequency of tick (in Hz). The frequency of the STM32F103ZE timer in the Miosix board can be divided by 1000. This allows to use a 1KHz tick and the minimun Thread::sleep value is 1ms For the priority scheduler this is also the context switch frequency

Frequency of tick (in Hz). The frequency of the STM32F207ZG timer in the Miosix board can be divided by 1000. This allows to use a 1KHz tick and the minimun Thread::sleep value is 1ms For the priority scheduler this is also the context switch frequency

Frequency of tick (in Hz). The frequency of the STM32F207IG timer in the Miosix board can be divided by 1000. This allows to use a 1KHz tick and the minimun Thread::sleep value is 1ms For the priority scheduler this is also the context switch frequency

Frequency of tick (in Hz). The frequency of the STM32F151C8 timer in the Miosix board can be divided by 1000. This allows to use a 1KHz tick and the minimun Thread::sleep value is 1ms For the priority scheduler this is also the context switch frequency