rtos

Atomic operation in multithreaded embedded software

穿精又带淫゛_ 提交于 2019-12-02 02:35:01
问题 I have been developing an RTOS based embedded software in C and I have encountered a problem regarding shared resource access from several threads. I have two problems. The first one is seting and getting a value of state variable in state machine. Below is the header file for StateMachine "object": typedef enum{ STATE_01, STATE_02, STATE_03, STATE_04 }state_e; // state machine instance typedef struct{ state_e currState; }StateMachine; extern state_e GetState(StateMachine*); extern void

FreeRTOS configTICK_RATE_HZ

跟風遠走 提交于 2019-12-02 00:38:54
I am using an MSP430f5438 with version 5.4 of FreeRTOS. I am having a funny problem that I can't figure out. Basically, when I set configTICK_RATE_HZ to different values, the LED blinks faster or slower; it should stay the same rate. It blinks slower the higher i set configTICK_RATE_HZ, and faster when I set TICK_RATE lower. vTaskDelayUntil( &xLastFlashTime, xFlashRate ); is such that the LED should only blink once a second no matter what the configTICK_RATE_HZ is. I stepped through and checked the xFlashRate to make sure. Its always = to the configTICK_RATE_HZ. Code: xFlashRate = ledFLASH

Install RT Linux patch for Ubuntu

你离开我真会死。 提交于 2019-11-30 16:13:36
Trying to make my generic Ubuntu to real time Ubuntu by modifying the kernel by patching / installing RT Linux but couldn't find a straight setup. Can someone help with the steps? Step 0 - Make a working directory Make a working directory #Move to working directory mkdir ~/kernel && cd ~/kernel Step 1 - Download kernel and patch Go to https://www.kernel.org/pub/linux/kernel/ and download a desired version of kernel to ~/kernel. Similarly, go to https://www.kernel.org/pub/linux/kernel/projects/rt/ and download the RT patch with same version as the downloaded kernel version. The kernel and patch

What is the difference between RTOS and Embedded Linux? [closed]

℡╲_俬逩灬. 提交于 2019-11-30 10:21:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . RTOS and Embedded Linux are used for embedded systems programming. Is Embedded Linux itself an RTOS ? Can anyone list the comparison or difference please? 回答1: Linux is a general-purpose OS (GPOS); its application to embedded systems is usually motivated by the availability of device support, file-systems,

Who schedules the scheduler in OS - Isn't it a chicken and egg scenario?

。_饼干妹妹 提交于 2019-11-30 07:05:53
Who schedules the scheduler? Which is the first task created and how is this first task created? Isn't any resource or memory required for it? isn't like a chicken and egg scenario? Isn't scheduler a task? Does it get the CPU at the end of each time slice to check which task needs to be given CPU? Are there any good links which makes a person think and understand deeply all these concepts rather than spilling out some theory which needs to be byhearted? The scheduler is scheduled by an (external) event such as an interrupt, (disk done, mouse click, timer tick) or an internal event (such as the

What makes a kernel/OS real-time?

南笙酒味 提交于 2019-11-28 23:46:08
I was reading this article, but my question is on a generic level, I was thinking along the following lines: Can a kernel be called real time just because it has a real time scheduler? Or in other words, say I have a linux kernel, and if I change the default scheduler from O(1) or CFS to a real time scheduler , will it become an RTOS? Does it require any support from the hardware? Generally I have seen embedded devices having an RTOS (eg VxWorks, QNX), do these have any special provisions/hw to support them? I know RTOS process's running time is deterministic, but then one can use longjump

Polling or Interrupt based method

拥有回忆 提交于 2019-11-28 15:59:11
When should one use polling method and when should one use interrupt based method ? Are there scenarios in which both can be used ? If the event of interest is: Asynchronous Urgent Infrequent then an interrupt based handler would make sense. If the event of interest is: Synchronous (i.e. you know when to expect it within a small window) Not Urgent (i.e. a slow polling interval has no ill effects) Frequent (i.e. majority of your polling cycles create a 'hit') then polling might be a better fit. Other considerations include whether you are writing a device driver for an OS or just writing bare

Install RT Linux patch for Ubuntu

依然范特西╮ 提交于 2019-11-27 16:56:09
问题 Trying to make my generic Ubuntu to real time Ubuntu by modifying the kernel by patching / installing RT Linux but couldn't find a straight setup. Can someone help with the steps? 回答1: Step 0 - Make a working directory Make a working directory #Move to working directory mkdir ~/kernel && cd ~/kernel Step 1 - Download kernel and patch Go to https://www.kernel.org/pub/linux/kernel/ and download a desired version of kernel to ~/kernel. Similarly, go to https://www.kernel.org/pub/linux/kernel

What makes a kernel/OS real-time?

只谈情不闲聊 提交于 2019-11-27 15:17:22
问题 I was reading this article, but my question is on a generic level, I was thinking along the following lines: Can a kernel be called real time just because it has a real time scheduler? Or in other words, say I have a linux kernel, and if I change the default scheduler from O(1) or CFS to a real time scheduler , will it become an RTOS? Does it require any support from the hardware? Generally I have seen embedded devices having an RTOS (eg VxWorks, QNX), do these have any special provisions/hw

Python on an Real-Time Operation System (RTOS)

心不动则不痛 提交于 2019-11-27 13:13:10
问题 I am planning to implement a small-scale data acquisition system on an RTOS platform. (Either on a QNX or an RT-Linux system.) As far as I know, these jobs are performed using C / C++ to get the most out of the system. However I am curious to know and want to learn some experienced people's opinions before I blindly jump into the coding action whether it would be feasible and wiser to write everything in Python (from low-level instrument interfacing through a shiny graphical user interface).