FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2014 Threads] FreeRTOS without any interrupt source?Posted by michaelmoese on March 14, 2014 Hello Everybody.
I'm currently evaluating options for implementing some functionality for a custom FPGA-based CPU. I'd strongly prefer using FreeRTOS over some homegrown solution. However, my processor, while being perfectly suitable for my task, does not provide me any interrupt handling. For the target application, this would be fine. Also, pure Cooperative Multitasking would be fine (I know I can't preempt without timer interrupt).
Now to my question: Will I be able to successfully port FreeRTOS to my CPU, even if it does not support interrupts?
I got sources for my CPU, so I could add interrupts to the processor - however I'm a software developer who is happy when being able to connect two IP-cores inside an FPGA design.. I'm pretty sure I will have a hard time adding interrupts to the CPU.
FreeRTOS without any interrupt source?Posted by rtel on March 15, 2014 I have never tried it, but presumably you could use a pure cooperative scheme (with configUSE_PREEMPTION set to 0) provided you don't ever try to delay. For example, without modifying the code you would not be able to call things like vTaskDelay(), or specify a block time to a queue, semaphore or event group function.
If you had a free running time source that didn't generate interrupts you could potentially add some time management into a trace macro that gets called each time a yield was performed. That would be somewhat non-trivial as you would need to figure out how much time had passed between successive yields, then manually call the 'increment tick' function that many times in a loop.
Regards.
FreeRTOS without any interrupt source?Posted by michaelmoese on March 17, 2014 Thanks for your reply. I'm aware of not being able to block tasks when no timer interrupt is available. However, due to the lack of interrupts, I wouldn't even need real semaphores - I could just use variables for event notifications, and I would never need to protect any critical sections, as no preemption could happen.
I think I will just try this out, porting of FreeRTOS does not seem a too difficult task.
I'll keep you updated.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|