TinyUSB ported to LPC55S36 with MCUXpressso IDE

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

TinyUSB ported to LPC55S36 with MCUXpressso IDE

2,058 次查看
martingcavallo
Contributor III

Hi everyone!

I'm starting to work on a project that requires porting TinyUSB to LPC55S36 MCU. I am using an LPCXpresso55S36 board and MCUXpresso IDE.

I'm trying to follow the Getting Started guide described in the TinyUSB GitHub repo, more exactly the steps described under Add TinyUSB to your project. However, it is not clear to me. I add some comments with respecto to these steps below:

 

Copy or git submodule this repo into your project in a subfolder. Let's say it is your_project/tinyusb. 

DONE. I added TinyUSB repo as a submodule and I can see the repo folders inside MCUXpresso IDE.

 

  • Add all the .c in the tinyusb/src folder to your project

Does this means that I have to move tusb_option.h, tusb.c and tusb.h to another folder, like sourcefolder? Or perhaps this is not neccesary in MCUXpressoIDE.

 

  • Add your_project/tinyusb/src to your include path. Also make sure your current include path also contains the configuration file tusb_config.h.

This seems is not needed in MCUXpresso IDE, it should be made automatically when project is buit.


  • Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS since they are passed by IDE/compiler to maintain a unique configure for all boards).
  • If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to implement alltud descriptorcallbacks for the stack to work.

In these two points, I suppose I have to write my own code to LPC55S36.


Therefore, has anyone made this before?? Has anyone a detailed guide/application note or suggestion to share??

 

Thanks in advance!!!

 

Martin

5 回复数

2,000 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello martingcavallo,

Sorry we haven't use this.

I think you can first refer to the author's steps, check what' the problem when compile project. Or create a new blank project on MCUXpresso IDE, then copy and paste source code into it. Or there is USB demo under SDK, you can refer to.

 

 Regards,

Alice

0 项奖励
回复

1,939 次查看
martingcavallo
Contributor III

Hello Alice!

Thank you very much for your response.

I understand. I will try to add the TinyUSB library to a MCU project and try to build it.

I saw in

Project/Properties/C/C++ Build/Tool Chain Editor

that the current builder selected is  Gnu Make Builder. Is there a way to modify a makefile?? It seems that the makefile is created the first time you build. The Debug folder is created and a makefile is inside. Am I right?? Could I modify this file to try to include TinyUSB dependecies correctly?

Thanks in advance!!

Martin

0 项奖励
回复

1,913 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Martin,

I think the author of this application know this well, how about ask from  TinyUSB GitHub repo.

 

BR

Alice

0 项奖励
回复

1,910 次查看
martingcavallo
Contributor III

Hi Alice!

Finally I could build TinyUSB library from MCUXpressso.

I had to create a new Empty Makefile Project, then I added TinyUSB library as a submodule, and replicating the Make file located in the example folders from the project root directory, I could build using make.

Anyway, thanks for your support. 

Regards, 

Martin 

0 项奖励
回复

832 次查看
mohaimen
Contributor I

Hi @martingcavallo! My apologies for bumping up such an old thread but I am in the same boat. I am trying to integrate TinyUSB into MCUXpresso and I was wondering if you created any documentation on how you did it? I am using a different board, the KL25Z, but that shouldn't have much of an impact, I believe.

 

Please let me know if you remember the steps, it would help me out immensely!

0 项奖励
回复