FreeRTOS | git-svn clone of the FreeRTOS project | Runtime Evironment library
kandi X-RAY | FreeRTOS Summary
kandi X-RAY | FreeRTOS Summary
This is an unofficial clone of the FreeRTOS project's Subversion repository hosted on SourceForge. You probably shouldn't depend on this repository being available for you to use.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FreeRTOS
FreeRTOS Key Features
FreeRTOS Examples and Code Snippets
Community Discussions
Trending Discussions on FreeRTOS
QUESTION
Currently I'm working on a Demo program to better understand working with FreeRTOS. Therefore I would like to try to initialize a Queue on my second core(core1). After initializing i would like to add something to it in a 1 second interval and whenever nothing happens I would like to check my queue and work its content off. Everything related to that queue should work on the second core. The reason being that I previously worked on a Webserver which operates on the main core. My future Queue is supposed to work in parallel on the second core.
This is my current demoprogram:
...ANSWER
Answered 2022-Jan-14 at 16:52You don't need to assume where the problem is; the answer is in the backtrace that you posted. The exception happened during a particular function call in your code:
QUESTION
I have imx7d-pico with Carrier board. This tiny computer was used a lot for Android Things. PDF (datasheet) easily found.
I stay (during the last two weeks) trying this tutorial: https://github.com/TechNexion/freertos-tn/tree/freertos_1.0.1_imx7d
...ANSWER
Answered 2022-Apr-01 at 19:14I solved with two changes in device-tree files:
in imx7d.dtsi
I put status = "okay";
in rpmsg: rpmsg{
in imx7d-pico-pi-qca-m4.dts
I put:
reserved-memory {
rpmsg_vrings: vrings0@0x8ff00000 {
reg = <0x8fff0000 0x10000>;
no-map;
};
};
&
&rpmsg{
memory-region = <&rpmsg_vrings>;
vdev-nums = <1>;
reg = <0x9fff0000 0x10000>;
status = "okay";
};
QUESTION
I would like to create objects having a variable-length array of elements, and have them be compatible in a base/derived-class sense. In C, one could put an indeterminate array at the end of a struct
and then just malloc the object to contain the full array:
ANSWER
Answered 2022-Mar-11 at 02:09As a low-level C++ developer, I understand exactly what you need, and sadly, there is no replacement for flexible array members in standard C++, with or without templates. You have to keep using flexible array members via compiler extensions.
They are not included in the language since in their current form, they are essentially a hack. They don't do well with inheritance or composition.
The problem with templates is that, the flexible array version has a common type of arrays of all sizes. That means you can place them in arrays, have non-template functions take them as parameters etc:
QUESTION
I am trying to work with flash memory on MPC5748G - a microcontroller from NXP running FreeRTOS 10.0.1, and I get some behaviour that I can't understand.
I am allocating memory manually, and the assignment seems not to work. However, I can reach the value at the address when using 'printf' - but only from the same function. (I'm using the copy of a pointer, to make sure that some sore of compiler optimisation doesn't take place)
...ANSWER
Answered 2022-Feb-16 at 16:50The problem was writing to FLASH memory - it hasn't been correctly initialized.
The proper way to write to flash on MPC5748g using the SDK 3.0.3 is following:
- save flash controller cache
- initialise flash
- check and protect UT block
- unblock an address space
- erase a block in this space
- check if the space block is blank
- program the block
- verify if the block is programmed correctly
- check sum of the programmed data
- restore flash controller cache
The strange behaviour of printf and pointer was due to compiler optimization. After changing the compiler flags to -O0 (no optimization), the error was consistent.
The same consistent error can be achieved when marking the pointers as 'volatile'.
QUESTION
I'm correctly generating my image Yocto-hardknott-technexion with this:
...ANSWER
Answered 2022-Feb-16 at 16:34The solution was to change imx7d-pico-pi-m4.dtb to imx7d-pico-pi-qca-m4.dtb in the Yocto/Hardknott/technexion configuration file called pico-imx7.conf(described in the post)
QUESTION
I am studying FreeRTOS, and in their tutorial book they talk about using "a pool of pre-allocated buffers" for holding pointers to char[]
arrays (to pass between tasks via a queue).
In the example found in Chapter 4.5 Working with Large or Variable Sized Data, they reference this sudo function called prvGetBuffer()
and state "The implementation of prvGetBuffer() is not shown – it might obtain the buffer from a pool of pre-allocated buffers, or just allocate the buffer dynamically.". This seems like a funciton I would like to take a look at, but its nowhere to be found in their docs / examples.
What exactly is "a pool of pre-allocated buffers", and what does an implementation look like in C/C++
? I can't find much on the internets about this.
I want to assume it is perhaps a 2-dimensional array that is "statically" allocated prior to run-time. Maybe it gets declared like char strBuffer[5][50];
or something - idk.
ANSWER
Answered 2022-Jan-25 at 14:24What exactly is "a pool of pre-allocated buffers",
A memory buffer is region of memory where objects can potentially be created. Allocation is the act of acquiring a resource and in this case the resource is a memory buffer.
"Pre" prefix implies that the allocation will have happened before prvGetBuffer
is called. A "pool" is an abstract description of a collection of things, such as a data structure.
QUESTION
I am writing an embedded application using freeRTOS and I'm trying to do it in a neat, object-oriented fashion.
To start a FreeRTOS task from within an object, you need to give it a static function. In order to make it possible to use non-static variables inside that function, I've been implementing it in the following way:
...ANSWER
Answered 2022-Jan-18 at 08:51Declaring a virtual loop function in BaseMode worked. Forgot these even existed.
QUESTION
I have a repository based on "https://github.com/MicrochipTech/amazon-freertos.git", I have pushed this to my own repository, which is not in Github so I believe fork is not possible. In my newly created copy I have added my application files as well as some changes to the amazon source files. This is committed and pushed to my private repository.
When the amazon repository eventually changes, is there some way that I can merge those changes into my repository, yet keeping the changes i have made to the previous version of that repository? Note that I will have modified some of the files that are part of the amazon repository so I cannot simply have it as a submodule.
Edit: As suggested I have:
...ANSWER
Answered 2022-Jan-04 at 11:44You can have multiple git remotes and pull in changes from either of them.
You can clone the original repository with a custom remote name, e.g.:
QUESTION
I am working on an STM32F401 MC for audio acquisition and I am trying to send the audio data(384 bytes exactly) from ISR to a task using queues. The frequency of the ISR is too high and hence I believe some data is dropped due to the queue being full. The audio recorded from running the code is noisy. Is there any easier way to send large amounts of data from an ISR to a task?
The RTOS used is FreeRTOS and the ISR is the DMA callback from the I2S mic peripheral.
...ANSWER
Answered 2021-Dec-14 at 12:44The general approach in these cases is:
- Down-sample the raw data received in the ISR (e.g., save only 1 out of 4 samples)
- Accumulate a certain number of samples before sending them in a message to the task
QUESTION
I have three tasks, which shares a binary semaphore myBinarySemaphore
. I'd like to know which task is currently having the binary semaphore. I could use a global variable to do this but does freeRTOS provide a method for this ?
Here's the code, I'm looking for a freeRTOS method to check which task has the binarySemaphore, in taskC
for example. xTaskOwner
is pure invention for example purpose. Thanks.
ANSWER
Answered 2021-Nov-16 at 21:39I would add a Queue with a simple message in it that says which task currently has the semaphore. Every time you take the semaphore, you overwrite the queue. In taskC you can do a xQueuePeek and see which task did the overwrite.
OR
You can use event flags to signal which task has the semaphore. Each task has its own flag on a share event group.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FreeRTOS
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page