Porting P.E. project for K70 to K20

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

Porting P.E. project for K70 to K20

Jump to solution
1,101 Views
crezyoz
Contributor IV

What is the best method to move my code, developed on a K70 tower into a K20 on our proto board. I used the K70 to learn Kinetis and employed a lot of P.E. components. Ideally I would like to change the target, change the pin mux's and modify components to work with the fewer resources on the K20 and re compile. Is that possible?

Thank you!

0 Kudos
1 Solution
756 Views
jimtrudeau
Senior Contributor I

It better be possible, that's the whole idea behind PEx. It won't be absolutely painless, but it should be a lot easier than without. If you have a window to wait a bit, my recommendation is to hold on for the CodeWarrior 10.3 beta (or DriverSuite 10.0) That should be available to the public (note SHOULD) about Sep 24. I've been using it for over a month now, and it's really nice. The Processor Expert tools integrated into that version of CodeWarrior have some very good features that will make this easier. Chief among them, you can export all the components from your K70 project and import them into a K20 project, with all the configuration information. Done.

That doesn't mean the configuration will work of course, because the pins will be different, the clocks will be different, and so on. But, PEx will alert you to all the inconsistencies. So you can use the help built into the tool and the K20 documentation to clear up the problems.

If you can't wait, you can accomplish all of the above a good deal less elegantly by saving templates and moving some files around in the file system. I can detail how to do that, but it's pretty ugly when two weeks will give you simple export and import capability.

View solution in original post

0 Kudos
10 Replies
756 Views
crezyoz
Contributor IV

UPDATE:

Thanks to all who responded to this. It went VERY well. I created a K20 project and set up the CPU. Then used the drag and drop method for all the PE drivers. Set up the pin muxes and it all worked extremely well. Though it was beneficial that I had already gone through the PE learning curve with the K70.

thanks again!

0 Kudos
756 Views
crezyoz
Contributor IV

I am in the middle of the conversion process and every thing seems to be going well. Except. I can only build once or twice and then CW just hangs at some point in the build process. Sometimes 53% sometimes 7%. A RESTART seems to help but it is unworkable. Any clues?

0 Kudos
756 Views
BlackNight
NXP Employee
NXP Employee

just a while guess: it could be the parallel make build. Can you try to switch off parallel build to see if this changes anything?

The settings to switch it off is in the 3rd screenshot in

http://mcuoneclipse.wordpress.com/2012/04/26/using-parallel-builds-what-is-optimal/

Hope this helps,

Erich

0 Kudos
756 Views
crezyoz
Contributor IV

Thank you Erich. I will try that and post my results.

0 Kudos
756 Views
crezyoz
Contributor IV

hmm.. turns out parallel build didn't seem to be on. Could not find a -jn value in the build command line.

After working it for a while it started to behave. It was crashing hard though. Only a re-boot would cure it.

0 Kudos
757 Views
jimtrudeau
Senior Contributor I

It better be possible, that's the whole idea behind PEx. It won't be absolutely painless, but it should be a lot easier than without. If you have a window to wait a bit, my recommendation is to hold on for the CodeWarrior 10.3 beta (or DriverSuite 10.0) That should be available to the public (note SHOULD) about Sep 24. I've been using it for over a month now, and it's really nice. The Processor Expert tools integrated into that version of CodeWarrior have some very good features that will make this easier. Chief among them, you can export all the components from your K70 project and import them into a K20 project, with all the configuration information. Done.

That doesn't mean the configuration will work of course, because the pins will be different, the clocks will be different, and so on. But, PEx will alert you to all the inconsistencies. So you can use the help built into the tool and the K20 documentation to clear up the problems.

If you can't wait, you can accomplish all of the above a good deal less elegantly by saving templates and moving some files around in the file system. I can detail how to do that, but it's pretty ugly when two weeks will give you simple export and import capability.

0 Kudos
756 Views
crezyoz
Contributor IV

That's good news. Very good news. Is there a doc explaining the proper

steps with CW 10.2? I may not have the time to wait as my deadline is Oct.

thanks!

0 Kudos
756 Views
Petr_H
NXP Employee
NXP Employee

In CW10.2, there is also already a possibility to drag and drop components with settings between projects. Please see the appropriate cheat sheet using menu command Help > Cheat sheets... and in the window that appears select CodeWarrior Processor Expert Features / Processor Expert Component Settings tips. Unfold the tree select "Copying Component Settings Between Projects".

best regards

Petr Hradsky

Processor Expert Support Team

0 Kudos
756 Views
crezyoz
Contributor IV

Thank you for this tip. And thanks as well to Mr Trudeau. I am starting this conversion this week and I hope it goes well. I really appreciate all of your help.

0 Kudos
756 Views
jimtrudeau
Senior Contributor I

Actually, it dawns on me you just need to do this in your own environment, not move it to someone else’s, and this actually is easy. Just not obvious. So without further ado, to do this for yourself..

Save the component as a template

  • Right click on the component
  • “Save Component Settings as Template” and you get a dialog
  • Save the template with a good name

It will show up in your library with that name. You can then use it as a preconfigured component to add to new projects.

Not so good, you have to do this one at a time. But it is is easy to do.

Getting this template into someone else’s CodeWarrior is inelegant. You have to locate the template file on your drive and manually move that file to the right location on their machine. No way to export and import across machines. We fixed that in 10.3. If you need to do that in 10.2 let me know and I can provide the path information.

In 10.3, you can take a project, export all its configured components in a single file, and when you import, pick which ones you want to apply to your new project. It’s very nice.

0 Kudos