Skip to content
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

RPC on the M4 core needs -fexceptions in cflags.txt and cxxflags.txt files #55

Closed
hpssjellis opened this issue Sep 13, 2020 · 9 comments

Comments

@hpssjellis
Copy link
Contributor

As far as I know for the M4 core to run RPC commands it needs cflags.tx and cxxflags.txt to have -fexceptions inserted at the bottom of the file.

Is this something that should be inserted by default for everyone? Would you like a PR for it?

@sebromero
Copy link
Collaborator

@hpssjellis How do you compile your sketches? I didn't have to change any flags.

@hpssjellis
Copy link
Contributor Author

hpssjellis commented Sep 16, 2020

Things may have changed. I did it a while ago. Nothing worked on the M4 core, made the changes and things worked. I will remove them and test it. It was mentioned on the arduino forum.

Here is the link https://forum.arduino.cc/index.php?topic=693851.msg4665427#msg4665427

perhaps it was for an earlier version and I just continued to use it with the new version.

@hpssjellis
Copy link
Contributor Author

@sbhklr I first made sure this program compiled to the M4 core, I then deleted -fexceptions from the 2 files (cflags.txt and cxxflags.txt) and re compiled without even rebooting the Arduino IDE and got this error. Replaced -fexceptions and no error. I hope that is helpful.

arduino-beta\hardware\mbed\1.2.2\libraries\rpclib\src/rpc/msgpack/v1/detail/cpp11_zone.hpp:75:38: error: exception handling disabled, use -fexceptions to enable

                 throw std::bad_alloc();

@sebromero
Copy link
Collaborator

@hpssjellis it is, thank you! We'll look into it.

@sebromero
Copy link
Collaborator

@hpssjellis It will be solved with the the core update.

@hpssjellis
Copy link
Contributor Author

@sbhklr Thank you. Looking forward to the next update as I have a lot of examples to re-test. Any idea if we are talking days or month until the next release?

@sebromero
Copy link
Collaborator

@hpssjellis We're talking days :-)

@hpssjellis
Copy link
Contributor Author

@sbhklr Things are working great with the new mbed Version 1.2.3

One minor thing. RPC1.begin() would be more fault tolerant if it could have a serial speed that it then ignores. Presently I am converting Serial.begin(115200); using

#define Serial RPC1 // So the M4 regular serial prints to RPC

but then the 115200 halts the compile.

Probably not needed for this version of mbed, but something to think about for the future.

@sebromero
Copy link
Collaborator

@hpssjellis Thanks for the input! We'll consider this for the "virtual serial" implementation for M4.
/cc @facchinm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants