Problem is that the pthread_cancel and the dlclose seemed to occasionally crash the program when occurring to closely in time. Ok, but what is the problem? ….get on with it you stupid bastard!! So we have written some code to make sure the latest code is actually loaded. Uh oh – so the user thinks (I would at least) think that the new code is run but it isn’t. Why? – dlopen keeps a reference count and if the ref count is not zero it does not load the file but reuse the previously loaded file. Since the user (rightfully) expects the simulator to execute freshly built code rather than the code before the build the same amount of call to dlclose as to dlopen must be made. When the user requests the thread to stop calls to pthread_cancel and to dlclose are made (looks a bit different in git right now, so this refers to my (Henrik’s) local git repo. Jearduino loads a dynamic library (dlopen), finds a symbol (dlsym) and then starts a new thread (pthread_create) using the symbol found. Dynamic loading (using dlopen/dlsym/dlclose). When doing this two techniques are in use: Jearduino (the Java GUI frontend to Searduino) is using JNI to load the Searduino (in practice the Arduino Simulator Engine). No crash when halting and reloading dyn files.Įarlier versions sometimes crashed when halting and reloading a file containing Arduino code.Įarlier versions had the previous LCD data incorrectly stored and displayed when rotating left/right. Previously the Arduino code didn’t get reloaded if loading the same file name as currently loaded. Loading a file again will actually reload it. Makes it easy to test in simulator and with two clicks upload it to a physical board. It is now possible to use Jearduino to verify(build) and upload code for physical Arduino boards. Searduino is an Arduino simulator and a C/C++ development environment for Arduino boards.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |