Fprime on FreeRTOS #3180
Replies: 46 comments 1 reply
-
@donwalkarsoham We haven't done a port yet to FreeRTOS. I think it would be great for more deeply embedded applications. It is in our plans to write a porting guide, but we haven't gotten there yet. If you want to fork the devel branch of the repo, I could help you walk through the process. It essentially consists of providing implementations for the classes defined in the Os directory. It would be for tasks, threads, mutexes, etc. |
Beta Was this translation helpful? Give feedback.
-
Sure, I have forked the repo to "donwalkarsoham / fprime". It would be really helpful if you could walk us through the process of porting fprime on FreeRTOS. |
Beta Was this translation helpful? Give feedback.
-
Can you give me a little background as to how you would like to use F'? |
Beta Was this translation helpful? Give feedback.
-
Note that F` requires running its own build system to generate the code, so you won't be able to build through Code Composer. We have done that here at JPL with another TI MCU. |
Beta Was this translation helpful? Give feedback.
-
This is the "Cube Rover" project for which we had an SDR presentation on 3rd August and you were a part of the reviewing committee. Thanks for the suggestion about building Fprime. Can you please put some more light on it and help us in taking it forward ? |
Beta Was this translation helpful? Give feedback.
-
There are a set of configuration files to navigate through. The can be a bit complicated, but they were set up that way to try and reuse settings across targets. It's actually helpful to see how the other ones in the repo were done to catch the pattern.
Add a name to the BUILDS := \
DARWIN \
LINUX \
CYGWIN \
RASPIAN \
RASPIAN-CROSS \
TIR4
COMPILER := compiler-name
TARGET := target-name These variables are used to define variables for the compiler and target respectively.
The target variable is used to include a file from the target configuration directory:
We're working on a project using the TMS570 MCU, which is very similar to the R4. It takes a bit to tease out the Code Composer link rules. I can fork your repo and give you them, but you will have to modify them for the R4. |
Beta Was this translation helpful? Give feedback.
-
The next step is to write implementation classes for the OS classes in the Specifically:
The new files can be added to the
For the name I suggested above, it would be:
|
Beta Was this translation helpful? Give feedback.
-
Hi Tim. I work with Soham at CMU on this. Would be able to give us the setup you have for the TMS570? We'd like to have an example of what we need to put together. Thank you so much for all your help on this! |
Beta Was this translation helpful? Give feedback.
-
@ichomas: If you can identify a fork I can do a pull request from, I can check it in. |
Beta Was this translation helpful? Give feedback.
-
Soham's (@donwalkarsoham ) fork would be great. https://github.com/donwalkarsoham/fprime |
Beta Was this translation helpful? Give feedback.
-
Why don't you make a branch for my PR? |
Beta Was this translation helpful? Give feedback.
-
I've forked this again and made a branch for the TMS57 https://github.com/PlanetaryRobotics/fprime/tree/TMS57 |
Beta Was this translation helpful? Give feedback.
-
PR is created. Note that there are references inside to HalCoGen created files. If you haven't used HalCoGen yet, I highly recommend it. |
Beta Was this translation helpful? Give feedback.
-
I created a new branch, |
Beta Was this translation helpful? Give feedback.
-
Is it proceed developing to bring the FreeRTOS port into Fprime? |
Beta Was this translation helpful? Give feedback.
-
Any update concerning this port? I would be very interested in using F' on FreeRTOS. Not sure how far the development went ? |
Beta Was this translation helpful? Give feedback.
-
Hi there, I was wondering if fprime is compatible with RTEMS real time operating system in addition to FreeRTOS. |
Beta Was this translation helpful? Give feedback.
-
Yes, it is, since RTEMs has a POSIX API. |
Beta Was this translation helpful? Give feedback.
-
Awesome! We were thinking this was the case, we just wanted to confirm it. Very keen to get your FSW up and running as its going to be used in our 2nd generation cubesat. |
Beta Was this translation helpful? Give feedback.
-
@yash-chaudhary Can you give some details on your Cubesat project? We are trying to keep a list of users. |
Beta Was this translation helpful? Give feedback.
-
Sure thing! Just a little bit about us. We are the Melbourne Space Program (MSP) based in Melbourne, Australia. We were established in 2016 as a non-for-profit and are entirely student-run and extremely motivated to inspire more students to explore space and technology. Our teams comprise of university students that dabble in many areas of study, although mainly engineering. In 2019, we launched a 1U cubesat called ACRUX-1 in June of 2019 on board Rocket Lab’s “Make it Rain” rocket. After a successful mission, MSP has spun-off many other STEM projects which are all developed by students which include:
You can see more details on our website: MSP With respect to our cubesat ACRUX-2, I am personally the on-board computer (OBC) subsystem co-lead. The goal of this mission is to use machine learning diagnostics algorithms, which aims to autonomously detect damage to the spacecraft and optimise on-board operations to increase cubesat survivability. For the OBC, we are currently exploring FreeRTOS and RTEMS for our OS and JPL’s F prime and NASA cFs for our FSW. However, I think it’s safe to say we have decided to use F prime and RTEMS. Here at MSP we are fabricating all our own parts from the chassis to PCBs as this provides a richer learning experience than just using COTS, so its pretty exciting. I am more happy to talk more about this in a more private setting as I am precluded from divulging specific mission details publicly. In addition, we are building our own ground station for communications with our cubesat which will eventually connect to a network of ground-stations and we’re looking for an external payload for our satellite that may come from a research team or commercial partner. Moreover, our internal payload will be used for educational purposes to give high-school students an opportunity to explore space tech. Here at MSP we are very keen to connect with more student space teams internationally to share our passion for space and innovation and companies such as JPL and NASA to guide us curious students to explore the beauty of space. If there is a forum such as a discord or slack we are very interested in working more closely with you guys. |
Beta Was this translation helpful? Give feedback.
-
If you would like to talk more offline, connect with me on LinkedIn. We could arrange a teleconference to hear more about your projects. |
Beta Was this translation helpful? Give feedback.
-
That sounds great! I'm looping in the project leads to let them know. We are also heading into end of semester exams soon, so we'll try to figure out a time that works for both of us. |
Beta Was this translation helpful? Give feedback.
-
Hi Tim. Just wondering if you've gotten around to that FreeRTOS port. If not, do we follow the steps you've laid out above? |
Beta Was this translation helpful? Give feedback.
-
Hi. Are there any updates/solution on this topic? |
Beta Was this translation helpful? Give feedback.
-
Hi @timcanham, Are there any updates on this development? |
Beta Was this translation helpful? Give feedback.
-
Hi all - we are planning to release F Prime v3.5.0 in a couple weeks (see milestone). This will come with a refactored OSAL with the goal that implementing new OSALs should be much easier (clean C++ interfaces to implement as well as clean a CMake setup to integrate into). This should help with implementing a FreeRTOS OSAL! |
Beta Was this translation helpful? Give feedback.
-
// Example of platform-specific code handling:
#if defined BUILD_TIR5
#define POINTER_CAST U32
#endif
#if defined BUILD_TIR5
NATIVE_INT_TYPE strnlen(const char *s, NATIVE_INT_TYPE maxlen);
#endif
|
Beta Was this translation helpful? Give feedback.
-
Thank you for sharing the preliminary version of OSAL documentation. I have been facing the following issue for the past 2 weeks regarding missing Os_File implementation when I am building a Ref project for FreeRTOS on STM32 uC. Can you provide insights about what are implementation, how they are configured and how can I deal with this error. Any help would be appreciated! |
Beta Was this translation helpful? Give feedback.
-
The Os_File interface is one of F Prime's key OS abstraction layers.
set(FPRIME_USE_STUBBED_DRIVERS ON)
Basic Implementation Structure Needed: namespace Os {
class File {
public:
static Status open(const char* path, Mode mode, File& file);
static Status read(File& file, U8* buffer, Size size, Size& size_read);
static Status write(File& file, const U8* buffer, Size size, Size& size_written);
static Status close(File& file);
// ... other required methods
};
} For STM32/FreeRTOS, you might want to:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to know whether fprime is compatible with FreeRTOS operating system.
If so, is there any tutorial or reference guide on how to integrate and use fprime with FreeRTOS ?
Beta Was this translation helpful? Give feedback.
All reactions