Hi GaryOlmstead,
You're going to have to do more just copy in the files - sorry if I left that impression.
When you're copying in files you have to make sure that you:
- Create "source folders" (not normal folders) in the MCUXpresso project. You can't just copy the folders over - they MUST be "source folders". After creating the "source folders", I copy in the contents from the example project.
- Check the preprocessor flags and make sure that the appropriate ones for the features you want (ie USB) are included.
- Make sure all the new folders are listed in the build includes.
In my situation, when I'm copying in the CDC device files from the Tower K21F board to mine (K22), I have to do the following steps:
1. Create "source folders" for:
- osa
- usb
And copy in contents from respective folders from the previous project
2. Open "Properties"=>"C/C++ Build"=>"Settings"=>"Preprocessor" and match the following terms:
__REDLIB__
CPU_MK22FN1M0AVMC12_cm4
CPU_MK22FN1M0AVMC12
_DEBUG=1
USB_STACK_FREERTOS
USB_STACK_FREERTOS_HEAP_SIZE=53248
FSL_RTOS_FREE_RTOS
SDK_DEBUGCONSOLE=0
CR_INTEGER_PRINTF
PRINTF_FLOAT_ENABLE=0
__MCUXPRESSO
__USE_CMSIS
DEBUG
3. Open "Properties"=>"C/C++ Build"=>"Settings"=>"Includes" and match the following includes:
"${workspace_loc:/${ProjName}/board}"
"${workspace_loc:/${ProjName}/source}"
"${workspace_loc:/${ProjName}/}"
"${workspace_loc:/${ProjName}/usb/device/source/khci}"
"${workspace_loc:/${ProjName}/usb/include}"
"${workspace_loc:/${ProjName}/osa}"
"${workspace_loc:/${ProjName}/drivers}"
"${workspace_loc:/${ProjName}/CMSIS}"
"${workspace_loc:/${ProjName}/freertos/include}"
"${workspace_loc:/${ProjName}/freertos/portable}"
"${workspace_loc:/${ProjName}/drivers/freertos}"
"${workspace_loc:/${ProjName}/utilities}"
"${workspace_loc:/${ProjName}/startup}"
"${workspace_loc:/${ProjName}/usb/device/class/cdc}"
"${workspace_loc:/${ProjName}/usb/device/class}"
"${workspace_loc:/${ProjName}/usb/device/source}"
"${workspace_loc:/${ProjName}/usb/device/include}"
It may seem like a lot of work to do this, but with a notebook app and cut and pasting the information in the example project "Properties" and doing some experimenting you can figure out what's needed to build the project in fairly short order.
Again, apologies for not indicating that you have to do more than just copy the files.
myke