Comments (6)
Compiled binaries are standard Linux executables, so you can use basically anything that is available on linux (given that you have the required libs and headers on the build machine)
from raspiarduino.
ok, but IIUYC, I am crosscompiling from a Windows-PC-based Arduino IDE to the Pi code,
so does the Arduino IDE know what do if I
#include <pthread.h>
at the top and then start the threads
void* thread0 (void* ) { //
while(1) {
//
}
return NULL;
}
void* thread1 (void* ) { //
while(1) {
//
}
return NULL;
}
void* thread2 (void* ) { //
while(1) {
//
}
return NULL;
}
void setup(){
pthread_t tid0, tid1, tid2;
struct sched_param param;
pthread_create(&tid0, NULL, thread0, NULL); //
param.sched_priority = 20;
pthread_setschedparam(tid0, SCHED_RR, ¶m);
pthread_create(&tid1, NULL, thread1, NULL); //
param.sched_priority = 30;
pthread_setschedparam(tid1, SCHED_FIFO, ¶m);
pthread_create(&tid2, NULL, thread2, NULL); //
param.sched_priority = 30;
pthread_setschedparam(tid2, SCHED_RR, ¶m);
// *snip*
}
void loop() {
//
}
AFAIK, Arduino #includes only lib files located in \program files (x86) \Arduino\libraries\ in a proprietary folder of the same name as the lib header.
But there is no pthread folder containing pthread.h and pthread.c and all that - how does one get it there?
For the Scheduler libs (Arduino Due) that works, also for Babix and RTOS48 on ARMs and AVRs -
but are you sure that POSIX pthread will work that way,compiled on a PC,and then uploaded?
from raspiarduino.
yes :) As a matter of fact, RaspiArduino has threads already running underneath ;) Serial events, monitor socket and some other things have their own threads. And there already is some api added for pthreads in Arduino.h
from raspiarduino.
that's awesome.
Currently I am still a little scared about the monster installation guide (a install.exe which does all what's needed would be very much appreciated though ;) ) - but perhaps I can persuade myself and give it a try then, hopefully soon. ;)
from raspiarduino.
There are some things that can not (should not) be done in an installer, because they are external dependencies that have their own licenses and all (it's actually one thing and that is the toolchain for windows). On the PI itself, many things are optional and depend on each user's preferences. I will at some point make some sort of script to automate the things on the PI at least for the bare minimum.
from raspiarduino.
thanks, that's highly appreciated! 8)
from raspiarduino.
Related Issues (20)
- Serial Communication
- Compile errors with ArduinoJson HOT 5
- Segmentation fault HOT 1
- Compile for QEMU
- (not an issue) standard prepared (dietpi) image?
- (minor issue)
- Serial Monitor issue
- Questions regarding this project!
- Not compatible with CM4 / Ubuntu 20.04
- Joystick in Raspberry
- Just a samll question:
- Raspiduino have some bug with Radiolib HOT 1
- Error compiling for board RaspberryPI B+/2. HOT 1
- No compatible with Raspberry pi Zero W 2 HOT 1
- IP problem
- How to install under macOS? Neither Arduino IDE 1.18.19 nor 2.0.4 show board "RaspberryPI"
- error. compiling
- also possible to operate Raspberry Pi 3B (not 3b+ !) with Stretch?
- git clone installation fails: "The command "https:" is either misspelled or could not be found."
- Usage of WiFi/WebServer libs by piduino via Arduino IDE/API?
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 raspiarduino.