Comments (3)
Add #define USE_ARDUINO_DEFINES
before #include "arduino_freertos.h"
to provide the global Arduino defines needed by the library.
I've never used the CAN library, so this is just a guess, but avoid doing the CAN driver initialization before calling vTaskStartScheduler()
, this may cause the other error.
from freertos-teensy.
I tried adding a -DUSE_ARDUINO_DEFINES to my build flags, however that just gave me a bunch of weird syntax errors, however,
I found that including <Arduino.h>
and <FlexCAN_T4.h>
before #include "arduino_freertos.h"
and #include "avr/pgmspace.h"
fixes the name space issue, then -DUSE_ARDUINO_DEFINES
let me go back to using the arduino defines without arduino::
everywhere in the program.
The second program worked for that reason, and the issue with the serial monitor seems to have something to do with how this FreeRTOS port handles Serial.print()
, as it deadlocks the program if it's put inside an ISR. I just added #define Serial if(Serial)Serial
to the top of my program to get around this for now since I'm just using serial print for debug statements for now. Is there a better thread-safe way to print using this library?
Thanks
from freertos-teensy.
I think you must not use Teensy's Serial
in an ISR.
This library doesn't come with any peripheral drivers for FreeRTOS, so you need to add a mutex or semaphore to make Serial
or any other global instance from Arduino thread-safe.
from freertos-teensy.
Related Issues (20)
- Support for teensy 3.1 and 3.2 HOT 1
- analogWriteResolution(12), freezes the task and stop the PWM HOT 4
- Unaligned access UsageFault HOT 2
- Issue with using PlatformIO HOT 2
- Failure to run __libc_init_array when using GCC 11.3.1 on Teensy 4.1 HOT 6
- Compile error on timeval freertos::clock::offset_ in teensy.h HOT 1
- PlatformIO: Can't find 'arduino_freertos.h' when using strict library compatibility mode HOT 1
- Can't use std::mutex in PlatformIO library. HOT 2
- Latest PULL example stdThread Hangs at runtime HOT 4
- Volatile Error On Compilation Fix HOT 1
- Linker error: can't find reference to serialEvent_default HOT 1
- teensy-FreeRTOS event group handler Issue when trying to use C++ Exceptions HOT 2
- A thank you and a question. HOT 6
- Add option to sponsor the project HOT 1
- reent.h missing HOT 1
- Platform IO SD Card Example HOT 4
- Compiler error when using LTO HOT 1
- Teensy 4 compile error due to missing symbol HOT 6
- Serial UART and SPI don't work together HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freertos-teensy.