USB_MSD_HOST_MQX_Lite_MKL25Z128_PEx invalid path,how to correct it in the right way?

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

USB_MSD_HOST_MQX_Lite_MKL25Z128_PEx invalid path,how to correct it in the right way?

2,206 Views
diegocolombo
Contributor IV

Please,i ask your help once again

I have to develop an application based on USB and MQX lite,the above example on FRDM-KL25Z board should help me a lot.

I read USBHOSTUG and AN4748 documents,but i'm still having some problems,likely related to the way project should be built,an issue that i don't master properly

After compilingm i have lot of warning,but the first i want to clear is:

Invalid project path: Include path not found (C:\Freescale\Freescale USB Stack v4.1.1\ProcessorExpert\Examples\Host\MSD\USB_MSD_HOST_MQX_Lite_MKL25Z128_PEx\Sources\common\kinetis).

I guess that i should copy or link the folder  \common\kinetis in \Sources,but i dont know where to pick them from.

I searched in the USB stack folder for all the \common\kinetis occurencies,and i found one in

\Freescale USB Stack v4.1.1\Source\Host\examples,it contains lot of files,shurely some are not needed ,as the MK40 and MK60 .h files

but wich one are need, assuming that this folder is the right one?


Maybe should be better to copy the project in a workspace folder in a typical position satisfying the relative paths,but where?


Thanks for your help


Diego


Tags (4)
0 Kudos
Reply
8 Replies

1,869 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Diego

first please verify that the paths do exist in your PC. probably there is just a simple character that changes.

You must verify all the paths in:

menu Project > Properties > C/C++ Build > Settings > Compiler > Input

menu Project > Properties > C/C++ Build > Settings > Linker > Input

menu Project > Properties > C/C++ General > Paths and Symbols > C Source file

You must include here all that paths you are using and remove any path that does not exists in your PC.

After this please close CW. Go to your workspace folder and remove .metadata folder. Then reopen CW, reimport your project, clean your project and try again.


Have a great day,
Daniel

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,869 Views
diegocolombo
Contributor IV

Hello Chen,thanks for your hints


i 'll try to answer to your question so to help you to help me.


first please verify that the paths do exist in your PC. probably there is just a simple character that changes.

this path does not exist in my PC,there is only one \USB_MSD_HOST_MQX_Lite_MKL25Z128_PEx folder,the one in the example,and it does not contains any

\common\kinetis folder.My question is; why that path appears in the include paths list  of this example and then is not provided in the example?


You must verify all the paths in:


menu Project > Properties > C/C++ Build > Settings > Compiler > Input

menu Project > Properties > C/C++ Build > Settings > Linker > Input

menu Project > Properties > C/C++ General > Paths and Symbols > C Source file


You must include here all that paths you are using and remove any path that does not exists in your PC.


I'm just using the example as it is, i removed the non existing path ,anyway i have lot of warnings,as implicit declaration of function 'usb_class_mass_init,this because  #include "usb_host_msd_bo.h" is missing where the function is requested.

Of course i can copy this directive in the code but i wonder why this is not done at compiler settings level.

I can modify the include paths, but i wonder why this operation is needed on paths realtive to the project folder,supposing that the example was working as it is on the pc of the one that developed it.

So i'm leaded to think that there is something wrong in the way i'm using the example


Thanks for your time and patience

Diego


0 Kudos
Reply

1,869 Views
danielchen
NXP TechSupport
NXP TechSupport

If you just using the example as it is, not change anything, I think this example should be compiled without errors.

What you need to do is to import the projects. You can do this in 2 ways.

1) open your project folder in windows explorer and drag the .project file into CW workbench. then compile

2) Use menu File > Import > Existing project into workspace and select the folder where your project is contained.

1,869 Views
diegocolombo
Contributor IV

Thanks Daniel,you are right

The example can be compiled .

What happens is that it works just partially:

Debugging it looks that the code stops in PE_ISR(Cpu_ivINT_Hard_Fault);

Makin it run ,the code performs various steps,but it looks that it restarts from reset,i wrote   printf("PE_LL_init"); right after PE_low_level_init();

As you can see after "Test done!" it repeats the initial string.

PE_LL_init

USB MSD Command test

Waiting for USB mass storage to be attached...

Mass Storage Device Attached

================ START OF A NEW SESSION ================

Testing: GET MAX LUN Command..........................OK

Testing: TEST UNIT READY Command......................OK

Testing: REQUEST SENSE Command......................OK

Testing: INQUIRY Command......................OK

Testing: REQUEST SENSE Command......................OK

Testing: READ CAPACITY Command......................OK

Testing: REQUEST SENSE Command......................OK

Testing: READ FORMAT CAPACITIES Command......................OK

Testing: REQUEST SENSE Command......................OK

Testing: MODE SENSE Command......................OK

Testing: PREVENT-ALLOW MEDIUM REMOVAL Command......................OK

Testing: REQUEST SENSE Command......................OK

Testing: VERIFY Command......................OK

Testing: WRITE(10) Command......................OK

Testing: REQUEST SENSE Command......................OK

Testing: READ(10) Command......................OK

Testing: START-STOP UNIT Command......................OK

Test done!

PE_LL_init

...

...

I'm not able to follow the code until it stops.

What does this behaviour means?

Thanks

0 Kudos
Reply

1,869 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Diego:

I want to test this function on FREEDOM-KL25Z, but found it only has a min B port, it can act as a device. How can you test it as a Host device?

0 Kudos
Reply

1,869 Views
diegocolombo
Contributor IV

Hi Daniel

"I want to test this function on FREEDOM-KL25Z, but found it only has a min B port, it can act as a device. How can you test it as a Host device?"


I did it as showed below,i found an 8 GB Key without case but properly working,so ,instead of hacking the cable i just soldered the red wire on the 5V ,just after the connector,,the red cable can be disconnected.There are no difference in behaviour when the USB key is plugged in with the 5V already present or absent..


I loaded the other project in the USB Stack,baremetal one, without MQX and it works properly,despite  i was not able to compile it with the file systems files..


My question of today  is:

even if i still dont'have a file system running,i should be able to read data from absolute addresses in the USB  key.If that is correct,wich functions should i call,and were are they?


Thank you again for your help,i wish you a good weekend and i wish that the Freescale people on the lost plane can be found safe somewhere.

Diego

SAM_3895.JPG.jpg

0 Kudos
Reply

1,869 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Diego:

You can check the USB API reference manual for details. The location is

C:\Freescale\Freescale USB Stack v4.1.1\Documentation

Regards

Daniel

0 Kudos
Reply

1,869 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Diego:

Please read the mqx_tasks.c ((C:\Freescale\Freescale USB Stack v4.1.1\ProcessorExpert\Examples\Host\MSD\USB_MSD_HOST_MQX_Lite_MKL25Z128_PEx\Sources\)

void App_Task(uint32_t task_init_data)

{

  int counter = 0;

  USB_STATUS           status = USB_OK;

  _usb_host_handle     host_handle;

 

  msd_host_init();

  while(1) {

    counter++;

    /* Init polling global variable */

    MSD_Task();

    /* Write your code here ... */

  }

}

You can see that the App_Task is Polling MSD_Task , so your result is OK.


Have a great day,
Daniel

0 Kudos
Reply