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

Build error in sixaxis_main.c #11751

Closed
maurosollar opened this issue Feb 22, 2024 · 3 comments
Closed

Build error in sixaxis_main.c #11751

maurosollar opened this issue Feb 22, 2024 · 3 comments

Comments

@maurosollar
Copy link

After this steps, I have this build error:

./tools/configure.sh -l nrf52832-dk:nsh
menu configure
Application Configuration
Examples
(*) BMI160

make -j

CC: fixedmath/lib_ubsqrt.c sixaxis_main.c: In function 'sixaxis_main':
sixaxis_main.c:50:26: error: storage size of 'data' isn't known
50 | struct accel_gyro_st_s data;
| ^~~~
sixaxis_main.c:65:36: error: invalid application of 'sizeof' to incomplete type 'struct accel_gyro_st_s'
65 | ret = read(fd, &data, sizeof(struct accel_gyro_st_s));
| ^~~~~~
sixaxis_main.c:66:25: error: invalid application of 'sizeof' to incomplete type 'struct accel_gyro_st_s'
66 | if (ret != sizeof(struct accel_gyro_st_s))
| ^~~~~~
sixaxis_main.c:50:26: warning: unused variable 'data' [-Wunused-variable]
50 | struct accel_gyro_st_s data;
| ^~~~

@acassis
Copy link
Contributor

acassis commented Feb 22, 2024

@maurosollar I think you selected the BMI160 example but forgot to enable the BMI160 driver: CONFIG_SENSORS_BMI160

You also need to enable the right I2C port connected to your board's sensor and use the right I2C pins definition.

Also you need to initialize your BMI160 driver in your board bring-up, see boards/arm/tiva/tm4c1294-launchpad/src/tm4c_bringup.c as reference!

Nice too see another "mineiro" here using NuttX RTOS!!! Welcome!

@acassis
Copy link
Contributor

acassis commented Feb 22, 2024

@fdcavalcanti maybe you also can help here, because you added support to BMI160 on tm4c1294-launchpad board :-)

@maurosollar
Copy link
Author

Thanks Alan, exactly what it says. It worked! I really like NuttX, but I still know very little about this RTOS, before I used Microchip with Assembly. I'm from Minas Gerais Uai, rs.

Thanks a lot @acassis

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