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 the rtdoa_node and rtdoa_tag examples fails #17

Open
seijikun opened this issue Jun 29, 2021 · 2 comments
Open

Compiling the rtdoa_node and rtdoa_tag examples fails #17

seijikun opened this issue Jun 29, 2021 · 2 comments

Comments

@seijikun
Copy link

seijikun commented Jun 29, 2021

When compiling the rtdoa_node or the rtdoa_tag example, I get compile errors.

Software-Versions:

  • uwb-apps: master
  • gcc: 9.2.1 & 10.2.1
  • mynewt: 1.8.0

Hardware: DWM1001

Error:

Error: repos/decawave-uwb-core/lib/uwb_pan/src/uwb_pan.c: In function 'handle_pan_request':
repos/decawave-uwb-core/lib/uwb_pan/src/uwb_pan.c:353:48: error: taking address of packed member of 'struct _pan_frame_t' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  353 |     if (pan->request_cb(request->long_address, &request->req, &response->req)) {
      |                                                ^~~~~~~~~~~~~
repos/decawave-uwb-core/lib/uwb_pan/src/uwb_pan.c:353:63: error: taking address of packed member of 'struct _pan_frame_t' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  353 |     if (pan->request_cb(request->long_address, &request->req, &response->req)) {
      |                                                               ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors


@seijikun seijikun changed the title Compiling rtdoa_node example fails Compiling the rtdoa_node and rtdoa_tag examples fails Jun 29, 2021
@seijikun
Copy link
Author

seijikun commented Jun 29, 2021

Adding "-Wno-error=address-of-packed-member" to the cflags of the two examples makes them compile, and it seems to work, at least.

@thejclark96
Copy link

Adding "-Wno-error=address-of-packed-member" to the cflags of the two examples makes them compile, and it seems to work, at least.

Where exactly do you go to do this?

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