CodeWarrior "Build Configuration" Vs ProcessorExpert Configuration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CodeWarrior "Build Configuration" Vs ProcessorExpert Configuration

2,962件の閲覧回数
PhilV
Contributor III

I have a single project that I am trying to configure in such a way that it is flexible for more than one CPU.

In ProcessorExpert I have a second CPU, and two configurations that I can switch between and I am happy with all of that.
In CodeWarrior I am using the "PEcfg_*" macros (and inclusion of cpu.h) to determine which processor is being targetted.
What I am trying to do is have a BUILD configuration in CodeWarrior that I can switch between the two processors.
With Build Config #1 I would include in the project the folder "Generated_Code_cpu1", and in Build Config #2 I would include the folder "Generated_Code_cpu2".

I know I can set the ProcessorExpert generated code output directory in the CodeWarrior build configuration, BUT is there anyway to set the ProcessorExpect configuration ?

For instance if I select CodeWarrior build config #1 the tools will be setup for CPU#1, and the ProcessorExpert Generated_Code output folder will be set to "Generated_Code_cpu1". However if within ProcessorExpert the selected configuration is "CPU2" then it isn't going to work and I'll end up with code for CPU2 being generated in the "Generated_Code_cpu1" directory.

Am I missing something on how to tie together the CodeWarrior build configuration and the ProcessorExpert configuration settings, or does the developer have to remember to switch both settings manually?

0 件の賞賛
返信
4 返答(返信)

2,957件の閲覧回数
PhilV
Contributor III

Actually... it seems even the above does not work.
Despite having two CodeWarrior project build configurations, the project 'properties' (or at least the ProcessorExpert section of them) is not specific to that build configuration. Any PE directory that I specify in the project properties applies to BOTH configurations  

0 件の賞賛
返信

2,931件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

You are right. The processor expert generated code can't be for a specific build configuration. It's for entire project.

2,926件の閲覧回数
PhilV
Contributor III

I'm now using a work around which seems "ok" - especially as I don't need to change the PE code very often.

I generate the PE code into "Generated_Code" directory.
I then manually copy that to "Generated_Code_CPU1" directory.
Switch PE configuration to CPU2, and generate the code again.
Again manually copy from "Generated_Code" to "Generated_Code_CPU2"

I'm then using the build configurations in CodeWarrior for CPU1 to exclude the "Generated_Code" and "Generated_Code_CPU2" directories, and similarly the config for CPU2 excludes "Generated_Code" and "Generated_Code_CPU1" directories.

Its a bit clunky, but it seems to work.

0 件の賞賛
返信

2,920件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

yes, we can reuse processor expert generated code this way by copying it to a self-defined folder like "Generated_Code_CPU1". but Processor expert generated code only goes to "Generated_Code" directory

0 件の賞賛
返信