Skip to main content
Visitor II
March 9, 2025
Question

Compile Lsm6dsm self test

  • March 9, 2025
  • 1 reply
  • 267 views

Hi,

I am trying to use command line to compile self test of lsm6dsm by the following: 

arm-linux-gnueabi-gcc -static  lsm6dsm_self_test.c lsm6dsm_reg.c -o self test -I.

and got error: 

lsm6dsm_self_test.c:159:21: error: ‘SENSOR_BUS’ undeclared (first use in this function)

I couldn't find how to define SENSOR_BUS.

I have tried:

extern SPI_HandleTypeDef hspi1;
#define SENSOR_BUS hspi1

The device is connected using SPI.

Regards.

 

 

    This topic has been closed for replies.

    1 reply

    ST Employee
    March 12, 2025

    Hi @Shabtai 

     

    This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

     

    Regards,

    Billy