This repository was archived by the owner on Nov 12, 2025. It is now read-only.
Freertos port#4817
Open
mokshasoft wants to merge 9 commits into
Open
Conversation
Contributor
Author
|
I moved the ftoa implementation under the BARE_METAL flag since it performed rounding differently compared to snprintf. When I ran the test cases on my machine it reported 2 errors, but the CI reported 5. Testing the master branch on my machine resulted also in 2 errors, so I thought that my patches hadn't broken anything. I don't understand the difference though. |
Contributor
|
Thanks for the PR! I think that's the right decision, we should keep snprintf for the platforms that supports it. I'll get around to reviewing it soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here is a multi-threaded port of Idris C RTS to FreeRTOS. Here is an example of this port running on a versatilepb platform in QEMU, https://github.com/mokshasoft/FreeRTOS-community-ports/blob/master/Demo/ARM926ejs-GCC-Idris/README.md The demo starts three threads; on printer that only prints, and one sender that sends data via a queue to a receiver thread. Here is a log of the execution:
I have run 'make test' with and without the patches and in both cases two test-cases fail. The branch which I ran the tests on is master with patch:
1dd9316 Compatibility with GHC 8.8 and Cabal 3.0
reverted. Building a clean master on my Fedora 31 failed. I ran git bisect and it pointed to that commit.
In idris_rts.c I have removed the sprintf dependency in the last patch. I don't know what you think about that? sprintf handles very complicated format strings, but is only needed to cast integers to strings. I think the new implementation is way faster than the previous one. The build of Idris/FreeRTOS is not using libc, that's why I wanted to replace the calls to sprintf. I could put them under the BARE_METAL ifdef is you think that is better?
I will also contribute the Idris interface towards FreeRTOS to the contrib package, but first I want to get the RTS plumbing in.