Is it possible to create multiple MCUXpresso Config Tool configurations for one IAR EWARM project?

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create multiple MCUXpresso Config Tool configurations for one IAR EWARM project?

Jump to solution
187 Views
Senior Contributor I

Hello,

we have one IAR EWARM project with multiple configurations. Each configuration could be a different product, therefore it is necessary to create different pin_mux/clock/.. settings for each EWARM configuration. Is this somehow possible with MCUXpresso Config Tools v7?

If I create two .mex files at the same folder level as the EWARM project file it will create pin_mux, clock_mux in the board subfolder. My first idea was to create this file/folder structure:

<project workspace>
|-- config1.mex
|-- config2.mex
|-- ewarmproject.eww
|--/board
   |--/config1
   |  |-- pin_mux.c
   |  |-- pin_mux.h
   |  |-- clocks.c
   |  |-- clocks.h
   |
   |--/config2
      |-- pin_mux.c
      |-- pin_mux.h
      |-- clocks.c
      |-- clocks.h

In the MEX files there are the following entries for every MCUXpresso Tool

<generated_project_files>
            <file path="board/Config1/pin_mux.c" update_enabled="true"/>
            <file path="board/Config1/pin_mux.h" update_enabled="true"/>
</generated_project_files>

For config1.mex these entries would include the path board/Config1 and for the config2.mex it would be board/Config2. After changing the <generated_project_files> paths for all tools and saving the file, I opened the MEX file with MCUXpresso Tool and changed one pin setting. After saving and generating the source code I realized that MCUXpresso Tools still used the pin_mux.c file of Config2 despite changing the generated_project_files path to Config1. The other tools used the Config1 path. In addition to this MCUXpresso Tools changed the <generated_project_files> paths back to Config2. It looks like the tool is not using the paths written in the MEX file.

Do you have any idea how we could implement multiple clock/pin/peripherals/dcd settings for one EWARM project? We would like to put the MEX files in the same directory as the EWARM project file so MCUXpresso can read the project settings and give hints for missing drivers.

Kind regards,

Stefan

Labels (1)
0 Kudos
1 Solution
36 Views
NXP Employee
NXP Employee

Hi,

Unfortunately, this is a limitation of the current version of the config tools. I'm not aware of any workaround as the .mex file needs to be along with the project file and it can work with only one pin_mux.c output file. The only solution that I see is to split the application into several separate IAR projects in separate folders linking the shared source files and have the .mex files separately in each of those projects. 

We will try to improve this in next versions of the MCUXPresso config tools.

best regards

Petr Hradsky

MCUXPresso config tools team

View solution in original post

0 Kudos
6 Replies
36 Views
NXP Employee
NXP Employee

Hi Stefan,

in Pins Tool, you can create several configurations called "Functional Groups", see main menu - Edit - Functional Group Properties.

All the configurations are generated into pin_mux.c, but each of them is in separate function. Normally these configurations are used to switch pin configuration in run-time, however some functions will not be used in your application, they should be removed by the linker.

Functional Groups are supported in Clocks Tool and Peripherals Tool too.

Regards

Marek

Regards,
Marek
0 Kudos
36 Views
Senior Contributor I

Hi Marek,

thank you for your suggestion. Your suggestion works well for projects which use the same processor. In our case we also have to change the processor within one EWARM project and I think for different processors you have to use different MEX files, right?

Kind regards,

Stefan

0 Kudos
36 Views
NXP Employee
NXP Employee

Yes, you are right. This would work only for one processor.

Regards,
Marek
0 Kudos
36 Views
Senior Contributor I

Do you have an idea for a workaround with multiple processors in one EWARM project?

0 Kudos
37 Views
NXP Employee
NXP Employee

Hi,

Unfortunately, this is a limitation of the current version of the config tools. I'm not aware of any workaround as the .mex file needs to be along with the project file and it can work with only one pin_mux.c output file. The only solution that I see is to split the application into several separate IAR projects in separate folders linking the shared source files and have the .mex files separately in each of those projects. 

We will try to improve this in next versions of the MCUXPresso config tools.

best regards

Petr Hradsky

MCUXPresso config tools team

View solution in original post

0 Kudos
36 Views
Senior Contributor I

Hello,

thank you for your answer and your suggestion!

Kind regards,

Stefan

0 Kudos