How to get I2C code stack from freeRTOS sample code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get I2C code stack from freeRTOS sample code

Jump to solution
1,382 Views
misterbee
Contributor II

So I use the MCUXpresso sdk to get a sample code of freeRTOS sample. I worked on it and it is time to add I2C stack (driver and sample). I noticed in standalone freeRTOS sample, I did not see the I2C driver. To get I2C sample, I have to take different sample code base than freeRTOS, but what I want is both.

How should I go about it? 

Tags (1)
0 Kudos
Reply
1 Solution
1,376 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi misterbee 

You can add i2c component to a freertos project from SDK components manager.

ZhangJennie_1-1652242149847.png

 

add it from "Drivers" tab

ZhangJennie_0-1652242114861.png

 

Hope this helps,

Jun Zhang

 

View solution in original post

0 Kudos
Reply
4 Replies
1,346 Views
misterbee
Contributor II

Thank you @ZhangJennie 

0 Kudos
Reply
1,377 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi misterbee 

You can add i2c component to a freertos project from SDK components manager.

ZhangJennie_1-1652242149847.png

 

add it from "Drivers" tab

ZhangJennie_0-1652242114861.png

 

Hope this helps,

Jun Zhang

 

0 Kudos
Reply
1,363 Views
misterbee
Contributor II

Thank you @ZhangJennie , that works and would be one feasible option. But this means I have to be limited using MCUXpresso IDE. 

My preference is to use GNU tool chain with visual studio code or vim editor. I was hoping there is somekind of config file in which we add and remove component like I2C driver and generate the C/h files respectively to be integrated into the codebase. Are you aware if there is such feature in NXP SDK?

0 Kudos
Reply
1,355 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi misterbee 

No, we don't have such an option for your tools.

You can generate I2C source code with the method I provided. then import it to your project.

Thanks,

Jun Zhang

0 Kudos
Reply