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

Expression cannot be used as a function #216

Open
fatburg3r opened this issue Jul 2, 2023 · 0 comments
Open

Expression cannot be used as a function #216

fatburg3r opened this issue Jul 2, 2023 · 0 comments

Comments

@fatburg3r
Copy link

I tried compiling the example sketch provided in the library using the Arduino IDE, but I got the following error. I'm using an Ardunio Nano 33 BLE. Any idea why this is happening?

Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Nano 33 BLE"

C:\Users\suiyu\OneDrive\Documents\Arduino\libraries\micro-ecc-master\examples\ecc_test\ecc_test.ino: In function 'void loop()':

ecc_test:37:54: error: expression cannot be used as a function

   const struct uECC_Curve_t * curve = uECC_secp160r1();

                                                      ^

ecc_test:48:41: error: too many arguments to function 'int uECC_make_key(uint8_t*, uint8_t*)'

   uECC_make_key(public1, private1, curve);

                                         ^

In file included from C:\Users\suiyu\OneDrive\Documents\Arduino\libraries\micro-ecc-master\examples\ecc_test\ecc_test.ino:1:0:

C:\Users\suiyu\OneDrive\Documents\ArduinoData\packages\arduino\hardware\mbed_nano\4.0.2\cores\arduino/mbed/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC.h:107:5: note: declared here

 int uECC_make_key(uint8_t public_key[uECC_BYTES*2], uint8_t private_key[uECC_BYTES]);

     ^~~~~~~~~~~~~

ecc_test:53:41: error: too many arguments to function 'int uECC_make_key(uint8_t*, uint8_t*)'

   uECC_make_key(public2, private2, curve);

                                         ^

In file included from C:\Users\suiyu\OneDrive\Documents\Arduino\libraries\micro-ecc-master\examples\ecc_test\ecc_test.ino:1:0:

C:\Users\suiyu\OneDrive\Documents\ArduinoData\packages\arduino\hardware\mbed_nano\4.0.2\cores\arduino/mbed/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC.h:107:5: note: declared here

 int uECC_make_key(uint8_t public_key[uECC_BYTES*2], uint8_t private_key[uECC_BYTES]);

     ^~~~~~~~~~~~~

ecc_test:58:63: error: too many arguments to function 'int uECC_shared_secret(const uint8_t*, const uint8_t*, uint8_t*)'

   int r = uECC_shared_secret(public2, private1, secret1, curve);

                                                               ^

In file included from C:\Users\suiyu\OneDrive\Documents\Arduino\libraries\micro-ecc-master\examples\ecc_test\ecc_test.ino:1:0:

C:\Users\suiyu\OneDrive\Documents\ArduinoData\packages\arduino\hardware\mbed_nano\4.0.2\cores\arduino/mbed/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC.h:123:5: note: declared here

 int uECC_shared_secret(const uint8_t public_key[uECC_BYTES*2],

     ^~~~~~~~~~~~~~~~~~

ecc_test:67:59: error: too many arguments to function 'int uECC_shared_secret(const uint8_t*, const uint8_t*, uint8_t*)'

   r = uECC_shared_secret(public1, private2, secret2, curve);

                                                           ^

In file included from C:\Users\suiyu\OneDrive\Documents\Arduino\libraries\micro-ecc-master\examples\ecc_test\ecc_test.ino:1:0:

C:\Users\suiyu\OneDrive\Documents\ArduinoData\packages\arduino\hardware\mbed_nano\4.0.2\cores\arduino/mbed/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC.h:123:5: note: declared here

 int uECC_shared_secret(const uint8_t public_key[uECC_BYTES*2],

     ^~~~~~~~~~~~~~~~~~

exit status 1

expression cannot be used as a function
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

1 participant