How to Add Cloned BSP to List in CodeWarrior New Project Wizard in MQX 4.2 OR How To Use Cloned BSP?

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

How to Add Cloned BSP to List in CodeWarrior New Project Wizard in MQX 4.2 OR How To Use Cloned BSP?

Jump to solution
1,350 Views
dmitriyc
Contributor III

Hi,

 

I am using CodeWarrior 10.6build140329 and MQX 4.2 on 64-bit WIN7.

 

I just cloned a BSP (TWRK60F120M) using the BSP cloning wizard and exported the source tree to a non-default directory.

 

I followed the directions in the beginning of the BSP cloning guide for 4.2, and referenced the BSP Cloning Utility's help file.

 

For reference, I have read these threads on the subject:

Custom BSP with MQX 4.0.1 and CW 10.4

How to add cloned BSP to list in Codewarrior New Project Wizard

 

I tried to follow the directions in the above threads. However, I ran into a wall when I saw that the MWX4.2 cloning wizard (or at least the copy of it on my PC) does not generate a CodeWarriorNPW folder. I made sure that the board was added under Settings->Preferences in the BSP cloner -- it was.

 

Restarting CodeWarrior, I did not see the newly cloned BSP.

 

At this point, I decided take matters into my own hands and kludged together a REG and XML file based on previous forum posts and what already existed for the out-of-the-box BSP. Both are included as attachments in this post.

 

Restarting CW10.6, I saw my board listed in the new project wizard and created a new project using it.

 

However, on clicking build, I get the error message:

DescriptionResourcePathLocationType
mingw32-make: *** No rule to make target `C:/Freescale/Freescale_MQX_4_2/lib/k60f120mrmssc.cw10gcc/debug/bsp/intflash.ld', needed by `explicit-dependencies'.  Stop.HelloSCC/C++ Problem

 

Looks like some part of the old configuration is left somewhere. Anyway, this is where I pause, hoping someone could show me an easier way to do this or some crucial workflow step that I am missing.

 

Secondarily, is there some document that describes how to create a new project or switch an existing project to different (for example, newly cloned) BSP?

 

Is it as simple is just changing a bunch of include/library/etc paths in the  project config? If so I'd say all this trying to add it to the wizard has been in vain for me if it's easier to just take the manual route. That's the next thing I will try, but I was initially hesitant to do it because I assumed the tools provided would get everything straight automagically, and doing things manually might have some unanticipated "gotchas".

 

NOTE/EDIT: Yes, I did not actually even import the new BSP into my workspace (duh) in the original post. I am rectifying this and will be keep on messing around with it and weeding out issues. However, my original question is still valid: What is the "correct/recommended" procedure/workflow for creating a new project with a cloned BSP (or migrating an existing project created with one of the standard BSPs)?

 

EDIT2: Does the BSP being cloned need to be built at least once before cloning? I did not do this either, will build the standard ones before cloning and try again.

Original Attachment has been moved to: RMSsc_MQX42.reg

Original Attachment has been moved to: mqx_k60f120rmssc.xml.zip

0 Kudos
1 Solution
670 Views
RadekS
NXP Employee
NXP Employee

Hi dmitriyc,

Unfortunately, it is already known issue of MQX 4.2. This feature is missing in current version of BSP Cloning Wizard tool.

We changed type of generators (now it is ruby) and we missed this point - *.xml and *.reg files are not generated.

I already reported it into our internal bug database and it will be fixed in one of next MQX releases.

Note: *.xml and *.reg files are in readable format therefore you can edit them by any text editor.

Workaround:

You could take my xml file, modify all "MY_BOARD411" BSP names into your name and modify MCU type. In reg file you should replace "MY_BOARD411" by your BSP name and edit path to MQX4.2 with MQX version. After that, it should work even with MQX4.2

No, building project before cloning has no influence on result status.

I hope it helps you.

Have a great day,
RadekS

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

View solution in original post

3 Replies
671 Views
RadekS
NXP Employee
NXP Employee

Hi dmitriyc,

Unfortunately, it is already known issue of MQX 4.2. This feature is missing in current version of BSP Cloning Wizard tool.

We changed type of generators (now it is ruby) and we missed this point - *.xml and *.reg files are not generated.

I already reported it into our internal bug database and it will be fixed in one of next MQX releases.

Note: *.xml and *.reg files are in readable format therefore you can edit them by any text editor.

Workaround:

You could take my xml file, modify all "MY_BOARD411" BSP names into your name and modify MCU type. In reg file you should replace "MY_BOARD411" by your BSP name and edit path to MQX4.2 with MQX version. After that, it should work even with MQX4.2

No, building project before cloning has no influence on result status.

I hope it helps you.

Have a great day,
RadekS

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

670 Views
stefanoconegian
Contributor I

Hi Radek,

thanks a lot for your answer! I followed your suggestion for my board with k60n512 MCU and it works.

bye,

stefano

0 Kudos
670 Views
dmitriyc
Contributor III

Thank you. I got it working. Took some working out of other kinks, but if forgot what they were specifically. New projects get generated and work just fine.

One "gotcha" I do remember:

The BoardName variable at the bottom at the XML file has to match that name of your BSP project as well as the name of the folder it's in. Otherwise, you will get "no rule to make target" errors when trying to build a project.

I suspect this is because CW created the the linker file in lib/BSPProjectName.tool/debug, while it generates makefiles that say it is in lib/BoardName.tool/debug... Or something like that, I don't remember the details, but be careful there...

0 Kudos