Jump to content
I2Cdevlib Forums

Compiling problems


Recommended Posts

Hi, I'm new in the forum, First I would like to introduce myself. I'm a student of mechanical engineering,  and I'm working on a flight computer for a rocket and I'm using this sensor. I'm having problems with the example sketch, and I hope someone can help me, here is the log:




In file included from msp430_i2c.c:14:
i2c.h:87: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'I2Cdev'
msp430_i2c.c: In function 'I2C_masterInit':
msp430_i2c.c:50: error: 'I2C_PxSEL' undeclared (first use in this function)
msp430_i2c.c:50: error: (Each undeclared identifier is reported only once
msp430_i2c.c:50: error: for each function it appears in.)
msp430_i2c.c:50: error: 'SDA_PIN' undeclared (first use in this function)
msp430_i2c.c:50: error: 'SCL_PIN' undeclared (first use in this function)
msp430_i2c.c:51: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:51: error: 'UCSWRST' undeclared (first use in this function)
msp430_i2c.c:52: error: 'UCB1CTL0' undeclared (first use in this function)
msp430_i2c.c:52: error: 'UCMST' undeclared (first use in this function)
msp430_i2c.c:52: error: 'UCMODE_3' undeclared (first use in this function)
msp430_i2c.c:52: error: 'UCSYNC' undeclared (first use in this function)
msp430_i2c.c:53: error: 'UCSSEL_2' undeclared (first use in this function)
msp430_i2c.c:54: error: 'UCB1BR0' undeclared (first use in this function)
msp430_i2c.c:54: error: 'I2C_PRESCALE' undeclared (first use in this function)
msp430_i2c.c:55: error: 'UCB1BR1' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_enable':
msp430_i2c.c:73: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:73: error: 'UCSWRST' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_disable':
msp430_i2c.c:91: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:91: error: 'UCSWRST' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_setSlaveAddress':
msp430_i2c.c:113: error: 'UCB1I2CSA' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_setMode':
msp430_i2c.c:133: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:133: error: 'I2C_TRANSMIT_MODE' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_isBusBusy':
msp430_i2c.c:153: error: 'UCB1STAT' undeclared (first use in this function)
msp430_i2c.c:153: error: 'UCBBUSY' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_enableInterrupt':
msp430_i2c.c:181: error: 'UC1IFG' undeclared (first use in this function)
msp430_i2c.c:184: error: 'UC1IE' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_disableInterrupt':
msp430_i2c.c:211: error: 'UC1IE' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_clearInterruptFlag':
msp430_i2c.c:235: error: 'UC1IFG' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterSendSingleByte':
msp430_i2c.c:260: error: 'UC1IE' undeclared (first use in this function)
msp430_i2c.c:260: error: 'UCB1TXIE' undeclared (first use in this function)
msp430_i2c.c:266: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:266: error: 'UCTR' undeclared (first use in this function)
msp430_i2c.c:266: error: 'UCTXSTT' undeclared (first use in this function)
msp430_i2c.c:269: error: 'UC1IFG' undeclared (first use in this function)
msp430_i2c.c:269: error: 'UCB1TXIFG' undeclared (first use in this function)
msp430_i2c.c:272: error: 'UCB1TXBUF' undeclared (first use in this function)
msp430_i2c.c:278: error: 'UCTXSTP' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterMultiByteSendStart':
msp430_i2c.c:308: error: 'UC1IE' undeclared (first use in this function)
msp430_i2c.c:308: error: 'UCB1TXIE' undeclared (first use in this function)
msp430_i2c.c:314: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:314: error: 'UCTR' undeclared (first use in this function)
msp430_i2c.c:314: error: 'UCTXSTT' undeclared (first use in this function)
msp430_i2c.c:317: error: 'UC1IFG' undeclared (first use in this function)
msp430_i2c.c:317: error: 'UCB1TXIFG' undeclared (first use in this function)
msp430_i2c.c:320: error: 'UCB1TXBUF' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterMultiByteSendNext':
msp430_i2c.c:345: error: 'UC1IE' undeclared (first use in this function)
msp430_i2c.c:345: error: 'UCB1TXIE' undeclared (first use in this function)
msp430_i2c.c:347: error: 'UC1IFG' undeclared (first use in this function)
msp430_i2c.c:347: error: 'UCB1TXIFG' undeclared (first use in this function)
msp430_i2c.c:351: error: 'UCB1TXBUF' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterMultiByteSendFinish':
msp430_i2c.c:375: error: 'UC1IE' undeclared (first use in this function)
msp430_i2c.c:375: error: 'UCB1TXIE' undeclared (first use in this function)
msp430_i2c.c:377: error: 'UC1IFG' undeclared (first use in this function)
msp430_i2c.c:377: error: 'UCB1TXIFG' undeclared (first use in this function)
msp430_i2c.c:381: error: 'UCB1TXBUF' undeclared (first use in this function)
msp430_i2c.c:387: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:387: error: 'UCTXSTP' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterMultiByteSendStop':
msp430_i2c.c:409: error: 'UC1IE' undeclared (first use in this function)
msp430_i2c.c:409: error: 'UCB1TXIE' undeclared (first use in this function)
msp430_i2c.c:411: error: 'UC1IFG' undeclared (first use in this function)
msp430_i2c.c:411: error: 'UCB1TXIFG' undeclared (first use in this function)
msp430_i2c.c:415: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:415: error: 'UCTXSTP' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterMultiByteReceiveStart':
msp430_i2c.c:435: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:435: error: 'UCTR' undeclared (first use in this function)
msp430_i2c.c:437: error: 'UCTXSTT' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterMultiByteReceiveNext':
msp430_i2c.c:456: error: 'UCB1RXBUF' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterMultiByteReceiveFinish':
msp430_i2c.c:478: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:478: error: 'UCTXSTP' undeclared (first use in this function)
msp430_i2c.c:484: error: 'UC1IFG' undeclared (first use in this function)
msp430_i2c.c:484: error: 'UCB1RXIFG' undeclared (first use in this function)
msp430_i2c.c:488: error: 'UCB1RXBUF' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterMultiByteReceiveStop':
msp430_i2c.c:508: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:508: error: 'UCTXSTP' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterSingleReceiveStart':
msp430_i2c.c:530: error: 'GIE' undeclared (first use in this function)
msp430_i2c.c:536: error: 'UCB1CTL1' undeclared (first use in this function)
msp430_i2c.c:536: error: 'UCTR' undeclared (first use in this function)
msp430_i2c.c:539: error: 'UCTXSTT' undeclared (first use in this function)
msp430_i2c.c:545: error: 'UCTXSTP' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_masterSingleReceive':
msp430_i2c.c:568: error: 'UCB1RXBUF' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_readBytesFromAddress':
msp430_i2c.c:679: error: 'I2C_TRANSMIT_MODE' undeclared (first use in this function)
msp430_i2c.c:705: error: 'I2C_RECEIVE_MODE' undeclared (first use in this function)
msp430_i2c.c:709: error: 'I2C_RECEIVE_INTERRUPT' undeclared (first use in this function)
msp430_i2c.c: In function 'I2C_writeBytesToAddress':
msp430_i2c.c:740: error: 'I2C_TRANSMIT_MODE' undeclared (first use in this function)
msp430_i2c.c:746: error: 'I2C_TRANSMIT_INTERRUPT' undeclared (first use in this function)
Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

Update, managed to solve the problems

 

now I have an issue, I ran the Arduino i2c bus scanner and im getting 0x68 and 0x77 for my board, since I assumed that AD0 low for the mpu6050 remained 0x68 I left the code as it is, but im getting garbage output on the serial monitor

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...