First off, has anyone been able to run any version of a Freescale USB Stack on a KwikStik? Here are my challenges and where I am at today.
I am running Windows 7-64bit, CW 10.2, USB Stack 3.2.
Trying to import the Virtual Com project from the USB Stack results in an immediate error, that I believe stems from permissions on being able to access or transfer files:
Error processing changed links in project description file.
Could not write file: C:\Program Files (x86)\Freescale USB Stack v3.2.0\Source\Device\app\cdc\cw10\kinetis_k40\.project.
C:\Program Files (x86)\Freescale USB Stack
....
I tried changing my default workspace to a more generic c:\workspace and that didn't help at all.
Next I tried running in XPmode and installed CW10.2 and USB Stack 3.2
I was able to import the project, but then the code had problems. With some help I was able to comment out usb_bsp.h and change MCG_S_OSCINIT0_MASK to MCG_S_OSCINIT_MASK. At this point I can compile the project, but now when I try to debug and load the code on my KwikStick I get another error:
Error creating session: The remote system chosen in the Launch Configuration Main Tab is unknown.
Does anyone know a way to make this work?
Solved! Go to Solution.
Hello,
the first problem looks like a Windows 7 permission problem: depending on UAC or other settings you cannot write files in c:\program files folder. Having the workspace in your case outside that folder does not help if you do not set the 'copy files' option with importing the project.
I suggest to install the FSL USB stack e.g. inside a c:\freescale folder (where you have full access).
The thing about and MCG_S_OSCINIT_MASK seems to be an issue that the projects are broken because they use things for the K20 (so they break for anything else than K20 (but I did not try it for K20)). I have made the engineering team aware of this, and this should be fixed in a next release. So for now you have found the workaround already.
The last thing is: the projects delivered in the 3.2.0 stack are missing the connection settings: ReferencedRSESystems.xml or rseHostSettingsCache.xml is missing, as such the debugger does not know the connection settings. You can see this if you inspect the demo project e.g. in C:\Freescale\Freescale USB Stack v3.2.0\Source\Device\app\hid\cw10\kinetis_k40: that XML file is missing.
(see http://mcuoneclipse.wordpress.com/2012/03/17/dissection-of-mcu10-projects/ for details).
As a consequence, the settings in Run > Debug Configurations > Main > Connections are missing.
At least I see this in my projects installed by the FSL 3.2.0 stack.
So you need to fix this with
a) either create a new project with the wizard for your board, and then assign the created connection to your project
b) create the connection settings from scratch (see http://mcuoneclipse.wordpress.com/2012/04/30/flashing-with-a-button-and-a-magic-wand/ how to do this, there it is done for the simple flash operation, but the settings are the same for debug)
c) Use my project (attached):
- rename C:\Freescale\Freescale USB Stack v3.2.0\Source\Device\app\cdc\cw10\kinetis_k40_72MHz
- unzip the attached project as/in
C:\Freescale\Freescale USB Stack v3.2.0\Source\Device\app\cdc\cw10\kinetis_k40_72MHz
- import that project into your workspace
That project has Segger set up (as it is on the KwikStick. I was able to download it on my Kwikstick and it runs there.
But as the Kwikstick is using that new USB cable, and I only have one, I was not able to verify if the CDC part is working
Hope this helps,
BK
Hello,
the first problem looks like a Windows 7 permission problem: depending on UAC or other settings you cannot write files in c:\program files folder. Having the workspace in your case outside that folder does not help if you do not set the 'copy files' option with importing the project.
I suggest to install the FSL USB stack e.g. inside a c:\freescale folder (where you have full access).
The thing about and MCG_S_OSCINIT_MASK seems to be an issue that the projects are broken because they use things for the K20 (so they break for anything else than K20 (but I did not try it for K20)). I have made the engineering team aware of this, and this should be fixed in a next release. So for now you have found the workaround already.
The last thing is: the projects delivered in the 3.2.0 stack are missing the connection settings: ReferencedRSESystems.xml or rseHostSettingsCache.xml is missing, as such the debugger does not know the connection settings. You can see this if you inspect the demo project e.g. in C:\Freescale\Freescale USB Stack v3.2.0\Source\Device\app\hid\cw10\kinetis_k40: that XML file is missing.
(see http://mcuoneclipse.wordpress.com/2012/03/17/dissection-of-mcu10-projects/ for details).
As a consequence, the settings in Run > Debug Configurations > Main > Connections are missing.
At least I see this in my projects installed by the FSL 3.2.0 stack.
So you need to fix this with
a) either create a new project with the wizard for your board, and then assign the created connection to your project
b) create the connection settings from scratch (see http://mcuoneclipse.wordpress.com/2012/04/30/flashing-with-a-button-and-a-magic-wand/ how to do this, there it is done for the simple flash operation, but the settings are the same for debug)
c) Use my project (attached):
- rename C:\Freescale\Freescale USB Stack v3.2.0\Source\Device\app\cdc\cw10\kinetis_k40_72MHz
- unzip the attached project as/in
C:\Freescale\Freescale USB Stack v3.2.0\Source\Device\app\cdc\cw10\kinetis_k40_72MHz
- import that project into your workspace
That project has Segger set up (as it is on the KwikStick. I was able to download it on my Kwikstick and it runs there.
But as the Kwikstick is using that new USB cable, and I only have one, I was not able to verify if the CDC part is working
Hope this helps,
BK
Thanks for the help.
I did find that the problem with windows 7 is actually copying the files from the USB stack residing in program files. I copied the files for the USB stack to C:\freescale and then was able to import the project. That solved one problem.