Mark,
Yes we got this to work, but there was a long and arduous road to getting this to work.
First off do not bother cloning a bsp, psp and the middle ware directories from mqx. That will serve no purpose. You can do all that once you have gotten the whole system stiched together.
Here are the steps we did.
1) we used the k20d256, this is not the correct processor. You can't use any of the k20 bsp files in mqx. The mcg does line up.
2) you must use the k40dx256. Just make a backup copy of the whole mqx directory and don't bother changing any of the names. Work directly with the k40dx256 files
3) if you are using middleware systems like, usb, mfs and so on you will have to generate a wizard based template project inorder to get all the legion of linkages to libraries correct. We tried the acedemic approach of cloning a bsp into a new name, then changing all the linkages. We got a multitude of errors missing references and so on. I would recommend going back and making your clone of the system after you get the basic project working.
4) the template project you must generate must be based on the mqx broad project, twrk40dx256. You should build an empty project template but include the middleware code base you need. This will set the linkages correctly
5) for the k20dx256, mqx 3.8.1 and 3.8.0 generates incorrect code for the mcg module. The debugger will hang waiting for the clock to sync. It never does. The code is wrong.
6) we built a Processor Expert project without mqx, loaded that and verified that we could hit a breakpoint in the code. This we could do.
7) take the code from cpu.c in PE find the section that has the mcg.
8) go into the user_config.h and make sure that the LCD driver is turned off. This is the difference between the k20 and k40
9) switch back to the mqx IDE, go to the sources directory created by mqx in the build directory, ie....\Freescale\Freescale MQX 3.8\mqx\build\cw10\bsp_twrk40x256\Generated_Code\, patch in your code for the cpu.c you got from PE
10) rebuild the bsp, psp, middleware etc
11) rebuild your project, .... add code etc.
Where we still have a problem is in the middleware for the USB, we can't get it to run. The task traps to the bit bucket and we don't know why.
It has taken several weeks to get to this point working with the mqx development group, and support.
If you are using the USB MFS and get it to work, I would also appreciate some feedback. We are in a time problem now for production and don't have this working. Our code base is being ported from the 51jm128 CF1 and works under mqx 3.8.1, so this is not new untested code. But we can't get past the mqx problems as yet.
Regards
Robert Lewis
I will attach our cpu.c file.