Components not "Applicable to project"

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

Components not "Applicable to project"

Jump to solution
1,817 Views
joeservo
Contributor III

How are components checked if they are "applicable" to your project? i have imported some beans (PEupd files) from USB Stack v4.1.1 and for some reason USB_CDC_CLASS is not shown in the Components Library. USB_HID_CLASS and MSD are shown. Right clicking does not offer any help. Installing it anyway to force an error says "not supported by the processor". No way i can find how to check for supported porcessors. I have tried to read the files in the local components folder but not having any luck.

 

on a side note, KSDK components disappear when i filter to onyl components applicable to the project. may be related.

Labels (1)
1 Solution
1,441 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

as for the question about how things are checked if something is applicable or not: there is for sure that check if it is an SDK project or not. The low level hardware drivers do have this built in (but I don't know the details and this is not exposed directly even if you develop your own component imho).

Erich

View solution in original post

0 Kudos
18 Replies
1,442 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

as for the question about how things are checked if something is applicable or not: there is for sure that check if it is an SDK project or not. The low level hardware drivers do have this built in (but I don't know the details and this is not exposed directly even if you develop your own component imho).

Erich

0 Kudos
1,441 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Joe,

Which MCU are you using?

Please notice that the Freescale USB stack v4.1.1 is an old product and it was not tested in KDS. I would recommend that you use KSDK 1.3.0 (USB stack) and KDS 3.0.0, you can create a new Kinetis project with Processor Expert and KSDK 1.3.0 and implement your application by using Processor Expert KSDK 1.3.0 USB components.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 Kudos
1,441 Views
joeservo
Contributor III

i am using a K70. it works for the HID class, not the CDC. I also just managed to hack and slash my way through CDC using examples in USB Stack v4.1 and have i compiled but not tested (no windows driver).

USB Stack v5.0 doesnt offer the PEupd files to import into KDS. any other method i've found to potentially do the same thing is written for CW. KSDK 1.3.0 components are not "applicable to the project" according to KDS.

do you know where in the component files KDS checks to see if it is applicable to the project? and what does that mean.

0 Kudos
1,441 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Joe,

The KSDK components will not be applicable to your project because the K70 MCUs are not supported by Kinetis SDK 1.3.0. Regarding the USB_CDC_CLASS component there seems to be an issue with the component, if you want to select this component you will need to change the filtering from "Applicable to project" to "All".

About the CDC example not working, which error do you get?

Thanks for your response.

Best Regards!

Carlos Mendoza

Technical Support Engineer

0 Kudos
1,441 Views
joeservo
Contributor III

USB Stack 4.1 not tested with KDS 3.0 and K70 not supported by KSDK 1.3, now you understand my frustration. i have it almost working but need to understand some items first.

if i change the filter to all and place the CDC component anyway, the error by the target cpu says "not supported for this processor" or something like that.  i have tried searching the bean files for a list of supported devices but i can not find them. when i imported the PEupd files, the components were placed in a "MyComponents" folder. are there files placed anywhere else? do you know how the components are checked against the project?

0 Kudos
1,441 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

'not supported for this processor' is a message which comes up when you try to use a 'non-sdk' (not starting with "fsl_" in the name) with a project which has Kinetis SDK enabled (your created a project for using it with the Kinetis SDK).

Or in other words: with a few exceptions, you only can use components starting with "fsl_" (all lower case) for a Kinetis SDK project.

(Some background of this is discussed here: Overview: Overview: Processor Expert | MCU on Eclipse ).

If you want a Kinetis SDK project, then you should use the USB drivers inside the SDK (without Processor Expert).

If you want to look outside and use Processor Expert, then one option is to use the McuOnEclipse 4.1.1 USB components (CDC, MSD and HID) of the McuOnEclipse project (see for example USB with the Freescale FRDM-K22F Board | MCU on Eclipse ), but they are provided 'as is'. Another think you could look at is the uTasker project (Welcome to the homepage of the µTasker operating system with integrated TCP/IP stack, USB and target...) project.

I hope this helps,

Erich

0 Kudos
1,441 Views
joeservo
Contributor III

erich, i am glad you responded since i tried your McuOnEclpise project first but had issues with the RingBuffer component. I could not choose the rx/tx buffer in the pulldown menu.  also the K70 is not even an option, but it didnt seem to care if i choose the K6x option. Maybe this is why the ringbuffer would not work but i could not find where in the bean it checks against this. So then i turned to USB Stack 4.1, which, although everyone seems to be advising me against using, is the only thing that builds for the K70/KDS.

it looks like creating a kSDK project is not even possible for K70, i've confirmed that with a new junk project.

i have downloaded utasker when i started this project and used it to debug the issues in KDS for the DDR and LCD components. the usb is a bit difficult to follow in his project and the class and descriptor data are even bigger mysteries.

i guess the question of why KDS says certain beans are not applicable has been answered, but i do believe the CDC bean under USB Stack v4.1 is a mistake since its the only one that is not included. I would still like to understand where this is decided since NXP has decided not to track issues with it and has left K70 designers without any clean solution.

0 Kudos
1,441 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

about the RingBuffer component: are you shure you have imported both Part1 and Part2 files from the components zip file from McuOnEclipse - Browse /PEx Components at SourceForge.net ? The fact that you cannot select the RingBuffer component sounds like you have this one not installed.

Erich

0 Kudos
1,441 Views
joeservo
Contributor III

i downloaded the components from a different site, i'll have to check my history but regardless i tried from that link and it generated PE code. Some minor errors during build (#include files from CW projects, couple others i can describe if you like) but i got through them. i need to create an inf file or modify usb_desccriptor files to match the one made previously to test. on first attempt windows recognizes it but no driver is loaded (as expected). is there a post somewhere showing a simple application, the necessary init steps and possible an inf file? the function names seem to be the same as USB Stack 4.1 so my old application seemed to work.

0 Kudos
1,441 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

maybe you already have seen it: the Documentation subfolder (generated) of the project creates the .inf file for the USB CDC device class and driver. I expect that your application shall work with the code as it is the USB 4.1.1 code base with a few bug fixes and extensions (e.g. buffer handling). If there is anything I could make it better for your, for sure I can consider to include that into the code base so all the others can benefit too.

Regards,

Erich

0 Kudos
1,441 Views
joeservo
Contributor III

not sure that i am in any better position than with the USB 4.1 Stack. but at least you are familiar with this method. Windows connects, i see some usb traffic on connect, disconnect, but nothing on key presses. i'm using hyperterminal and tried a gui i wrote in visual studio just to be sure. you have answered the original question, but would like to debug this some more with you if possible. there are a few lines of code that seem incorrect to me but i am no usb expert. what do you suggest?

0 Kudos
1,441 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

I'm using the TWR-K70 board, so in case this is your setup too, then have a look at an article I wrote earlier (for CodeWarrior at that time):

USB with the TWR-K60F120M and TWR-K70F120M | MCU on Eclipse

I have ported that project to Kinetis Design Studio V3.x. I have the full project attached for reference. This project uses USB CDC on the TWR-SER card (see about the jumper settings in above article). !

I hope this helps,

Erich

0 Kudos
1,441 Views
joeservo
Contributor III

that project worked. i looked at my project and the main difference was i added FSL_USB_CDC_Device not FSL_USB_Stack. these components should've just been added to KDS to save everyone the headache.

one thing i did change you may want to think about. in usb_cdc_pstn.c, function USB_Class_CDC_PSTN_Set_Ctrl_Line_State

from this:

if(g_dte_status & CARRIER_ACTIVATION_CHECK)

{

     g_pstn_callback(controller_ID, USB_APP_CDC_CARRIER_ACTIVATED,NULL);

}

else

{

     g_pstn_callback(controller_ID, USB_APP_CDC_CARRIER_DEACTIVATED, NULL);

}

to this:

if(g_dte_status & CARRIER_ACTIVATION_CHECK)

{

     if (g_dte_present)

          g_pstn_callback(controller_ID, USB_APP_CDC_CARRIER_ACTIVATED,NULL);

     else

          g_pstn_callback(controller_ID, USB_APP_CDC_CARRIER_DEACTIVATED,NULL);

}

this allows you to use start_app and start_transactions to figure if you are simply plugged into a host and/or port open. otherwise there is no difference in the two (except when physically disconnected). i dont see any consequences with the demo code, have not tried other functions.

this will also require the always present 'start_transactions = TRUE;' in CDC1_Notify_callback to be commented out. and the removal of the static on the variable declaration.

thank you for the help.

1,441 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

I have quickly added your suggestion and tried it out. But somehow I'm maybe missing something, as when I connect with a COM port now to the device, the terminal application hangs. Maybe you have done some other changes too?

About removing the 'static': I think I better add some getter methods so the application can check if transactions have been started.

regards,

Erich

0 Kudos
1,441 Views
joeservo
Contributor III

that should be all the changes, tested with hyperterminal.

1. change in USB_Class_CDC_PSTN_Set_Ctrl_Line_State

2. comment last line in CDC1_Notify_Callback

3. remove "static" from variable declaration, but its not needed to test these changes.

i attached the two files to be sure.

0 Kudos
1,441 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

thanks for the files. I compared them again, but still: that solution does not work for me (KL25Z128).

When I plug the USB cable in, I get here:

    if(g_dte_status & CARRIER_ACTIVATION_CHECK)
    {
         if (g_dte_present) {
              g_pstn_callback(controller_ID, USB_APP_CDC_CARRIER_ACTIVATED,NULL);
         } else {
              g_pstn_callback(controller_ID, USB_APP_CDC_CARRIER_DEACTIVATED,NULL);
         }
    }

However, g_dte_status is always zero here, so the call backs do not get called at all in your new version. And the USB device does not properly enumerate. It might be a difference in our hardware, but it simply does not seem to work that way for me.

And I do not receive any special events when I close/open the COM port on the host. Not sure what I'm missing.

Thanks,

Erich

0 Kudos
1,441 Views
joeservo
Contributor III

found this:

USB CDC with the FRDM-K64F, finally! | MCU on Eclipse

i was definitely initializing it wrong. also modified the PID/VID to match the inf file i made earlier. with these changes (no echo app running though) windows pulls up a driver and assigns a com port. i do not get any characters transmitted from my terminal program. i placed a breakpoint in the USB_LDD ISR and it does not break with a key press. connect and disconnect from the terminal generate interrupts and requests LINE_CODING. just cant transfer characters.

0 Kudos
1,441 Views
BlackNight
NXP Employee
NXP Employee

Hi Joe,

you might check your terminal program if it is sending characters only if you press enter.

And: there is a know issue with USB  CDC driver enumeration in Windows: having the USB cable connected with a virtual COM port open, and the communication breaks, the COM port will be stuck and you won't be able to send/receive characters.

Make sure that you a) have the device unplugged b) then have the com port closed c) plugin in the device and d) then open the COM port.

I hope this helps,

Erich

0 Kudos