Comments (3)
On AVR space is added to your size for interrupt context and other structures.
I have also found that ChibiOS often appears to work OK when the stack overflows into other areas. Eventually you will either have a crash or corrupt other global memory.
I fill the allocated stack space with a 0x55 pattern at startup and check how much of the pattern remains when you call chUnusedThreadStack() You must have some unused stack.
from chrt.
Would that mean that the space added for interrupt context and other structures is more than needed?
from chrt.
Would that mean that the space added for interrupt context and other structures is more than needed?
The examples allocate generous stack space since they run on various CPUs.
You must decide how much unused stack to allocate. You must never allow stack overflow.
The purpose of chUnusedThreadStack() is to check if the work-space size is appropriate.
Using an RTOS take experience beyond simple C/C++ programming. An RTOS is a complex tool. Here is a quote from the author of ChibiOS.
What an RTOS is
An RTOS is an operating system whose internal processes are guaranteed to be compliant with (hard or soft) realtime requirements. The fundamental qualities of an RTOS are:
Predictability. It is the quality of being predictable in the scheduling behavior.
Deterministic. It is the quality of being able to consistently produce the same results under the same conditions.
RTOS are often confused with “fast” operating systems. While efficiency is a positive attribute of an RTOS, efficiency alone does not qualifies an OS as RTOS but it could separate a good RTOS from a not so good one.
What an RTOS is not
An RTOS is not a magic wand, your system will not be “realtime” just because you are using an RTOS, what matters is your system design. The RTOS itself is just a toolbox that offers you the required tools for creating a realtime system, you can use the tools correctly or in the wrong way.
from chrt.
Related Issues (16)
- SAMD21 tickless HOT 3
- license HOT 1
- Porting VESC to Teensy 4 HOT 5
- Upgrade to the new ChibiOS version HOT 1
- Question regarding characteristics of ChRt's main thread ("loop()") HOT 2
- Teensy 4 - not working with latest teensyloader and/or arduino ide HOT 1
- Initialization code overwrites fault handler vectors HOT 1
- ICUDriver on Arduino HOT 1
- Teensy LC support? HOT 1
- Support for STM32? HOT 5
- Both ChRt.c and ChRt.cpp in src ? (makes Atmel Studio failing) HOT 1
- CAN support HOT 1
- heap support HOT 1
- hard fault on Serial.print HOT 1
- Teensy 4.0 support? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrt.