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

SimpleLink does not compile (simplelink_sockets.c) #29805

Closed
denisbohm opened this issue Nov 4, 2020 · 3 comments
Closed

SimpleLink does not compile (simplelink_sockets.c) #29805

denisbohm opened this issue Nov 4, 2020 · 3 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale

Comments

@denisbohm
Copy link

simplelink_sockets.c does not compile as it references the symbol ENSOCK that does not seem to be defined anywhere in the Zephyr sources:

https://github.com/zephyrproject-rtos/zephyr/search?q=ENSOCK

../simplelink/simplelink_sockets.c:70:11: error: 'ENSOCK' undeclared (first use in this function); did you mean 'ENOTSOCK'?
70 | error = ENSOCK;
| ^~~~~~
| ENOTSOCK

@denisbohm denisbohm added the bug The issue is a bug, or the PR is fixing a bug label Nov 4, 2020
@denisbohm
Copy link
Author

Just noticed the below in the TI hal user.h. So maybe SL_INC_INTERNAL_ERRNO is being defined somehow, but should not be?

/*!
\brief User's errno setter function. User must provide an errno setter
in order to let the SimpleLink Wi-Fi driver to support BSD API
alongside the user's errno mechanism.

\param      None.

\sa         SL_INC_INTERNAL_ERRNO

\note

\note       belongs to \ref porting_sec

\warning

/
#ifndef SL_INC_INTERNAL_ERRNO
/

  • Zephyr Port: use Zephyr SDK's errno.h definitions, and supply those missing
  • to allow the SimpleLink driver.c to compile
  • Also, supply the external errno setter function.
    */
    #include <errno.h>
    #define ERROR EIO
    #define INEXE EALREADY
    #define ENSOCK ENFILE

extern int dpl_set_errno(int err);
#define slcb_SetErrno dpl_set_errno

#endif

@denisbohm
Copy link
Author

Looks like the above TI hal user.h code segment for Zephyr is new. It isn't in the code that I've been using to create my CC3120 SPI driver (simplelink_sdk_wifi_plugin_4_20_00_10). So I did not have that in my port of user.h. I will add that code to my driver. So not sure this is actually a Zephyr compile issue. (Although it may be an issue that those defines aren't somewhere standard, so this code isn't needed in user.h.)

@nashif nashif added the priority: low Low impact/importance bug label Nov 10, 2020
@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants