Lib_i2c build errors Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
egberttheone
New User
Posts: 2
Joined: Sun Mar 27, 2016 1:58 pm

Lib_i2c build errors

Post by egberttheone »

I'm trying to add lib_i2c to a project.
After adding lib_i2c using online librarys within xtimecomposer studio and adding it to the make file "USED_MODULES = lib_i2c" i get a lot of errors.

obviously i'm doing something wrong but i'm not sure what.
I have added a screen shot of the build error's

The code is a extension on the usb audio project(builds fine without the lib_i2c).

globally > "on tile[0] : port p_i2c = PORT_I2C; // bit 0 = SDA, bit 1 = SCL, bit 4 = RST i2c"

Code: Select all


#define USER_MAIN_DECLARATIONS \
  i2c_master_if i2c[1];

#define USER_MAIN_CORES \
 on tile[0] : i2c_master_single_port(i2c, 1, p_i2c, 100, 0, 1, 0);

thank you for your time.
You do not have the required permissions to view the files attached to this post.
View Solution
egberttheone
New User
Posts: 2
Joined: Sun Mar 27, 2016 1:58 pm

Post by egberttheone »

I have found the problem, in the makefile the BUILD_FLAGS contained "-DSDA_HIGH=2 -DSCL_HIGH=1 " these names are used by the i2c module and gave the errors.
After removing them from the BUILD_FLAGS it compiles without errors.