CW10 Processor Expert Project Organization

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

CW10 Processor Expert Project Organization

962 Views
WHookway
Contributor III

Hello,

 

I'm using CW10 and I have a project defined that is using "Device Initialization" and I would now like to use the features of "Processor Expert".  When I try to convert the project to use Processor Expert I get an error indicating the project already contains the Device Initialization project.  Can this be converted?  Secondly, I have added additional targets under Project/Make Target/Create but I do not see any means to configure them, is this feature only to be used with Processor Expert?  Can targets be used without using processor expert?

 

My goal is to support a base set of firmware for 2 projects (different application firmware) handling many common I/O requirements on 2 sets of hardware (V1 and V2 due to memory requirements of the two applications) where development is beginning on the eval boards for the 51JM128 and M52259 until my target hardware is available.  Is there a TN or white paper that suggest a project organization for this type of configuration.  I was going to use a single project with multiple configurations to handle the 2 projects and multiple targets to handle the multiple processor choices.  But I am not certain if the eval boards and my final target hardware (again 2 sets) should be additional projects or could be handled as targets.  Also I was thinking of making this project a reference (lib or other?)  so that it could be used by the two applications (two separate other projects).  This would allow the basefirmware and hardware I/O services to be developed independent of the application development.  Any suggestions would be appreciated.

 

Thanks,

Will

Labels (1)
0 Kudos
1 Reply

210 Views
ProcessorExpert
Senior Contributor III

Hello,

Regarding the conversion of the Device initialization project to using Processor Expert:   Unfortunately this feature is not supported yet, it is planned for the next releases. Currently it's necessary to add Peripheral initialization components to the Processor Expert project and configure them manually to the same initialization values as components within the Device initialization.


Regarding support for the two platforms - CodFireV1 (JM128) and V2 (MCF52259): Yes, it's possible to create two targets for these two, however, it's not easy to configure the targets because project wizard doesn't support such feature so configuration for the second target needs to be imported from another project (for example if you would like to add ColdfFireV2 for ColdFireV1 project,  you need to create new target and import CFV2 configuration from some newly created project for CFV2). There problem also is that the project for such derivatives has a little bit different structure and you would definitely use different configuration for Processor Expert components for each platform. Thus, I recommend to create separate projects for each of the platforms (you can have open both of them at once) and share just the application code the following way:


1. Create separate bareboard projects for ColdFireV1 JM128 and MCF52259, both with Processor Expert enabled. For example named 'PRJ_V1' and 'PRJ_V2'.


2. In each of  projects right-click on the 'ProcessorExpert.pe' and select 'Generate Processor Expert code'. User modules are prepared by PE into the folder {project}/Sources.


You can decide which project will contain the shared user modules with application code and in the other we'll replace them by links. For example, we'll keep PRJ_V1 sources as shared and remove PRJ_V2 ones the following way:


3. In the Project panel, open the 'Sources' folder of PRJ_V2 and delete the files (Events.c, Events.h, ProcessorExpert.c) by selecting them and using the 'Delete' command from pop-up menu.


4. Right-click on 'Sources' folder in PRJ_V2 and select 'Add Files...'. Then find the 'Sources' folder of  'PRJ_V1' and select Events.c, Events.h, ProcessorExpert.c from there. Confirm 'Create links for each files and directories' in the following 'File and Folder Import' dialog.


5. Right click on PRJ_V2 project folder and select 'Properties. Unfold the 'C/C++ General' folder and select 'Paths and Symbols'. In the right pane, select 'C Source File' and click on 'Add...' button to add a new path. Then type '/PRJ_V1/Sources and check 'Is a workspace path' checkbox and confirm the dialog, select 'Apply' and the OK in 'Properties' dialog.


6. Now you should be able to build both projects. You can add components to the projects and configure them accordingly on each platform. It's just necessary to keep the components synchronized, so they have the same names and are configured to behave same way (for example BitIO component cannot be input in one project and output in the other if you want to share the application code). The goal is to have two sets of the components with the same names configured to your needs on each platform. Don't forget to re-generated the Processor Expert code in each project after component configuration change.
Regarding the component selection please note that there is a limitation that same of the components that are provided for ColdFireV1 are not available for ColdFireV2, and some of the peripherals may be different so the Peripheral Initialization component settings would differ or even different components will be used for the same task. You can find a list of supported component for ColdfFireV2 on this page.

In case you would need to use different application code for each platform you can use preprocessor symbols defined by Processor Expert in Cpu.h, for example this way:

#ifdef PEcfg_51JM128VLK  // something specific for CFV1#else  // other CPU#endif

 


best regards
Petr Hradsky
Processor Expert Support Team

0 Kudos