Port existing code to XGate

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

Port existing code to XGate

Jump to solution
2,032 Views
hucklim
Contributor III

Hello everyone,

I am using the Codewarrior IDE(v5.9 special edition) +Processor Exper (v3.02)t to implement my firmware code.

My current project does not include the XGate support.

Currently I am planning to use XGate to offload some of the interrupt tasks from the main controller. I have not found any application note showing a step by step instructions to port an existing code to a XGate Project. Does anybody have any information on how to do this?

 

Yours,

Huck

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
1,870 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

We support HCS12X derivatives with XGate (including XDP512), but we do not support any code generation for XGate. Currently we do not plan to add support for this.

We say “processor expert does not support any code generation for XGate”, for instance, processor expert can not be able to generate a prm file that include XGate associated content. So user has to rewrite their own xgate supporting prm file but can’t use pe generated prm.

Another example is that pe also can not generate xgate supported vector table, etc.

thus it loose some of the major advantages of pe.

This is the reason that if you make a project with XGATE the Proc.Exp. option does not exist.

in practice, we don’t recommend user use processor expert and xgate together in one project. In practice, we only have sample code that use xgate or  pe only but never use them together.

if you want add xgate support to processor expert anyway, I ever figure out a solution:

To add XGATE support to the project, we have to follow the steps below:
1.   import XGATE lib file: Open the project with CW, in project manager window, right click mouse and select “Add files…”, import ansi_xgi.lib from {CW install directory}\lib\xgatec\lib; if you are using floating support XGATE, you need import ansi_xg.lib instead.
2.   import xgate header and source file: the simple method is to create a new project with xgate. Then copy xgate.h and xgate.cxgate file from its source folder to the current project folder. Then import this two file into the project.
3.   press ALT+F7, compiler setting, add -D__FAR_DATA to the command line arguments.
4.   add #include "xgate.h" in your main file. according to your own need, you could change your prm and C file now. 
5.   in prm file, you need allocate proper memory for xgate. You have to change it manually based on your designed xgate memory allocation. Meanwhile, if you use processor expert, you need disable prm generation in cpu bean instpector.
6.   how to see xgate code in debugger: press F5 to call debugger, in debugger menu “componnet”, “Open”, “Source” to open a new source file window, in the new window, right click mouse and select “show score”, “xgate”. This window is used to show your current xgate code running state.
7.   how to save the current debugger window configuration: go to debugger menu “File”, “save configuration”. Thus when you open debugger next time, the layout of the debugger windows will be same.

* Note: I suggest you try the above steps in an empty testing project to familiar with these steps first before you perform it into your own project.

I hope this can help you. Have a nice day!

=================================================

this answer if for you. if it helps, please click on "correct answer " button. thanks!

Best Regards,

ZhangJun

View solution in original post

0 Kudos
Reply
3 Replies
1,871 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

We support HCS12X derivatives with XGate (including XDP512), but we do not support any code generation for XGate. Currently we do not plan to add support for this.

We say “processor expert does not support any code generation for XGate”, for instance, processor expert can not be able to generate a prm file that include XGate associated content. So user has to rewrite their own xgate supporting prm file but can’t use pe generated prm.

Another example is that pe also can not generate xgate supported vector table, etc.

thus it loose some of the major advantages of pe.

This is the reason that if you make a project with XGATE the Proc.Exp. option does not exist.

in practice, we don’t recommend user use processor expert and xgate together in one project. In practice, we only have sample code that use xgate or  pe only but never use them together.

if you want add xgate support to processor expert anyway, I ever figure out a solution:

To add XGATE support to the project, we have to follow the steps below:
1.   import XGATE lib file: Open the project with CW, in project manager window, right click mouse and select “Add files…”, import ansi_xgi.lib from {CW install directory}\lib\xgatec\lib; if you are using floating support XGATE, you need import ansi_xg.lib instead.
2.   import xgate header and source file: the simple method is to create a new project with xgate. Then copy xgate.h and xgate.cxgate file from its source folder to the current project folder. Then import this two file into the project.
3.   press ALT+F7, compiler setting, add -D__FAR_DATA to the command line arguments.
4.   add #include "xgate.h" in your main file. according to your own need, you could change your prm and C file now. 
5.   in prm file, you need allocate proper memory for xgate. You have to change it manually based on your designed xgate memory allocation. Meanwhile, if you use processor expert, you need disable prm generation in cpu bean instpector.
6.   how to see xgate code in debugger: press F5 to call debugger, in debugger menu “componnet”, “Open”, “Source” to open a new source file window, in the new window, right click mouse and select “show score”, “xgate”. This window is used to show your current xgate code running state.
7.   how to save the current debugger window configuration: go to debugger menu “File”, “save configuration”. Thus when you open debugger next time, the layout of the debugger windows will be same.

* Note: I suggest you try the above steps in an empty testing project to familiar with these steps first before you perform it into your own project.

I hope this can help you. Have a nice day!

=================================================

this answer if for you. if it helps, please click on "correct answer " button. thanks!

Best Regards,

ZhangJun

0 Kudos
Reply
1,870 Views
hucklim
Contributor III

Hello Jennie,

thanks for your step by step instructions. I will try it out on a test project.

Yours sincerely,

Huck Lim

0 Kudos
Reply
1,870 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

you are welcome!

Best Regards,

ZhangJun

0 Kudos
Reply