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

Compiling on Artemis #2

Closed
eried opened this issue Oct 1, 2020 · 3 comments
Closed

Compiling on Artemis #2

eried opened this issue Oct 1, 2020 · 3 comments

Comments

@eried
Copy link

eried commented Oct 1, 2020

Hi, I am testing few libraries to find one that works on Sparkfun Artemis modules. I am getting an error on wait:


In file included from d:\Documents\Arduino\libraries\CopyThreads\examples\CTBlink\CTBlink.ino:26:
d:\Documents\Arduino\libraries\CopyThreads\src/Cth.h:146:7: error: 'static void CthClass::wait(int (*)(long unsigned int), long unsigned int)' cannot be overloaded with 'static void CthClass::wait(int (*)(long unsigned int), long unsigned int)'
  void wait(int (*condition)(unsigned long), unsigned long arg) {
       ^~~~
d:\Documents\Arduino\libraries\CopyThreads\src/Cth.h:113:7: note: previous declaration 'static void CthClass::wait(int (*)(long unsigned int), long unsigned int)'
  void wait(int (*condition)(unsigned long priv), unsigned long priv) {
       ^~~~
exit status 1
Error compiling for board SparkFun Artemis Module.

Is this because something is missing on the artemis boards implementation?

@jensh
Copy link
Owner

jensh commented Oct 1, 2020

The code was not tested with an Artemis module. You can try removing the complete block between line 137 and 149: https://github.com/jensh/CopyThreads/blob/master/src/Cth.h#L137-L149
Probably the test #if __SIZEOF_POINTER__ >= __SIZEOF_LONG__ does not work as i want it to work in the Artemis Module case.
I don't expect there is something missing.

@eried
Copy link
Author

eried commented Oct 1, 2020

Hi, thanks. Without that line:

d:\Documents\Arduino\libraries\CopyThreads\src\Cth.cpp: In function 'void loop()':
d:\Documents\Arduino\libraries\CopyThreads\src\Cth.cpp:70:6: error: 'serialEventRun' was not declared in this scope
  if (serialEventRun) serialEventRun();
      ^~~~~~~~~~~~~~
exit status 1
Error compiling for board SparkFun Artemis Module.

However I found an alternative (https://github.com/drifkind/QDispatch) that works on Artemis, so it solved my issues :)

@eried eried closed this as completed Oct 1, 2020
@jensh
Copy link
Owner

jensh commented Oct 1, 2020

Issue #1 was also about if (serialEventRun) serialEventRun();. I'm glad that you have found a solution.

jensh added a commit that referenced this issue Oct 1, 2020
e.g. ESPea32 or SparkFun Artemis Module.
See #2
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