GithubHelp home page GithubHelp logo

Works on Arduino Mega 2560 about chrt HOT 3 OPEN

greiman avatar greiman commented on July 23, 2024
Works on Arduino Mega 2560

from chrt.

Comments (3)

greiman avatar greiman commented on July 23, 2024

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.

ladislas avatar ladislas commented on July 23, 2024

Would that mean that the space added for interrupt context and other structures is more than needed?

from chrt.

greiman avatar greiman commented on July 23, 2024

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)

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.