-
Notifications
You must be signed in to change notification settings - Fork 64
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
Arduino MBED RTOS Support #1581
Conversation
@@ -52,7 +52,7 @@ private String generateMainFunction() { | |||
"// Arduino setup() and loop() functions", | |||
"void setup() {", | |||
"\tSerial.begin(" + targetConfig.platformOptions.baudRate + ");", | |||
"\tlf_register_print_function(&_lf_arduino_print_message_function, LOG_LEVEL);", | |||
"\tlf_register_print_function(&_lf_arduino_print_message_function, 0);", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments/questions.
@@ -394,20 +394,22 @@ private static boolean copyDirectoryFromJar(JarURLConnection connection, final P | |||
* @param dir The folder to search for folders and files to delete. | |||
* @throws IOException If the given folder and unneeded files cannot be deleted. | |||
*/ | |||
public static void arduinoDeleteHelper(Path dir) throws IOException { | |||
public static void arduinoDeleteHelper(Path dir, Boolean isThreading) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static void arduinoDeleteHelper(Path dir, Boolean isThreading) throws IOException { | |
public static void arduinoDeleteHelper(Path dir, boolean isThreading) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a better name of the variable would be threadingOn
?
@@ -611,7 +611,7 @@ private String generateCodeToInitializeFederate(FederateInstance federate, Linke | |||
code.pr(String.join("\n", | |||
"// Initialize the socket mutex", | |||
"lf_mutex_init(&outbound_socket_mutex);", | |||
"lf_cond_init(&port_status_changed);" | |||
"lf_cond_init(&port_status_changed, &outbound_socket_mutex);" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what's going on here, but that's probably because I haven't yet checked out your reactor-c PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
MBED RTOS requires the use of threading as a means of supporting physical actions on Arduino. This pull request adds full support for MBED boards using C-Style APIs to interface our reactor-c library to MBED RTOS's C++ infrastructure (Threads, ConditionVariables, and Mutexes)