-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
freertos-teensy porting for Teensyduino #3
Comments
Hi Guglielmo, yes, I will have a look at it. Regards, |
There is a first test version available which can be used with Teensyduino. If you want to try it out:
However, there are currently the following limitations:
I haven't done much testing so far as I don't use Teensyduino for my projects. |
Hi Timo, |
Hi Timo, ∙ freertos-teensy-10.4.1-6/src/portable/teensy_4.cpp:143:11: error: '__isb' was not declared in this scope Is it anything related to the compiler version present in IDE 1.8.13? is it possible to find a detour? TIA Guglielmo |
... so, I have included these #define in portable/teensy.h: #define __isb() __asm volatile("isb" ::: "memory") and there are no more errors. Is this a correct "detour" or can it cause problems? TIA, Guglielmo |
You're right, that's a bug with Teensyduino. |
Hi Timo, |
Does it explain the problem I encounter in this issue ? |
With the latest version available (v10.5.1_v5), there is now basic support for Teensyduino 1.58. Please note, until this Pull request is merged, the |
On Platform IO how do I add TeensyDuino to the freeRTOS build, so i can get libraries for Ethernet and SD card libraries |
You can add FreeRTOS as a library to TeensyDuino (see README.md) if you want to use it with TeensyDuino. |
this is the issue, I need to be able to run the devices under the port of freeRTOS for teensy 4.1, Your current port will compile nicely with platformIO and i can add my own project to the port from the folder etc, and it works ok, until I start wanting devices. So its really the other way round I want the freeRTOs port , with access to the hardware devices, otherwise there is no point in using the freeRTOS port. I need to use Ethernet on one task , serial devices on another task and business logic in between, using thrreads. as freeRTOS supports all the nice features you would expect, such as queusu and semaphores, it seems natural that tis is a basic requirement to also access the internal devices, whioch are linked to you locked source for Arduino, unless you know of another way? |
further info today.,. I have got freeRTOS for teensy working, using version 10.5.1_v6 with QNEthernet on one thread and LED on another. We need serial and sdcard threads. Do you think if these are isolated on there own threads and messages sent across to those threads to action device functions this would be OK. I had to use the URL method of adding in the libraries by hand as required. The issue i guess is going to be IF the libraries calls something that upsets the RTOS. |
additional information today ongoing work trying to get device to work on your freeRTOS port. Although the Ethernet server works in its own thread, adding the SDFat library is now an issue. In that If I try and initialise SDFat with sd.begin(SdioConfig(FIFO_SDIO), where it is a global, it will not initialise, If i place the "SdFat32 sd;" object inside the start of a task i.e. beginning of a task thread, it will initialise, but fail to work, i.e. any file control fails. I would be happy to share my entire project if that would help, as it really is simple test code , the same code in the thread, i have created a std arduino sketch under the Arduino IDE , and it works fine. So it MUST be something about you port of freeRTOS, and interaction with your devices. What or how can i do to help with getting the device to work under freeRTOS? |
I did test the SDFat library as shown in the sdfat example, but not beyond that. So yes, there may be issues with other libraries, especially if they are not written for FreeRTOS. Do Ethernet and SDCard on Teensy use the same hardware controller or something? Maybe there is an interference or a hardware access is preempted when it shouldn't be. |
tonights findings. Finally got SDFAT working.. this may help other people.. make sure SDFat32 is initialied at the start of a thread. and to make the file read and writes work, use the defines as follows, not FILE_READ and FILE_WRITE file = psd->open("hi.txt", O_WRITE | O_CREAT | O_TRUNC); file = psd->open("hi.txt", O_READ); as the defines FILE_READ and FILE_WRITE clash with another library "FD.h" ? |
Hi Timo,
following my issue on Phillip library, I move here to ask you if you think to make a version of your library that can be used in the Teensyduino environment. :-)
Thanks a lot in advance,
Guglielmo
The text was updated successfully, but these errors were encountered: