How to get I2C code stack from freeRTOS sample code

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to get I2C code stack from freeRTOS sample code

跳至解决方案
2,082 次查看
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? 

标记 (1)
0 项奖励
回复
1 解答
2,076 次查看
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 项奖励
回复
4 回复数
2,046 次查看
misterbee
Contributor II

Thank you @ZhangJennie 

0 项奖励
回复
2,077 次查看
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 项奖励
回复
2,063 次查看
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 项奖励
回复
2,055 次查看
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 项奖励
回复