Defining the location of the source files generated by the config tools.

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

Defining the location of the source files generated by the config tools.

967 Views
jaldridge
Contributor II

The MXUXpresso tool generates board support source code files. These are placed by default in board/boards, (ie: clock_config.c, .h etc).

I want to support two hardware targets, with compile time switches. The two targets are called "Dev" and "Eval". The pin out from the MCU is sufficiently different that I want to have two sets of board files. To support this I'm willing to have two .mex files in the same project.

I've renamed the folder board/boards to be board/evalboard and created a second board/devboard. Similarly I've duplicated the .mex files, one for the eval board and one for the dev board. I've manually edited each of these files so that the paths for generated files are correct. For example, in devboard.mex I've got:

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

I open the mex file by double clicking on it within MXUXpresso in the Project Explorer pain.

The issue I have is that both .mex files want to use the devboard folder for the generated files. This is correct for the dev build, but no good for the eval build.

Is there way around this?

Windows 7, MCUXpresso 11.0.1

0 Kudos
1 Reply

903 Views
liborukropec
NXP Employee
NXP Employee

Hello John,

unfortunately Config Tools does not support neither renaming generated files nor two mex files in the project (it opens the first found mex file, unless explicitly mex file is double clicked).

What I'd try (not guaranteed it will work) is to create two projects, each with its own mex file and only one project (e.g the first) will be used for compiling. The pin_mux files can be linked from the "second" project into the "first", either in different directory, or under different name.

The linked files (resources) can be created by drag&drop the source file from second project to the first one, holding Ctrl+Shift keys at the same time, resulting in this dialog:

pastedImage_1.png

Linked resource has small decoration icon, see e.g. abc.c file:

pastedImage_2.png

This seems to be also related to linked resources: Link to Files and Folders in Eclipse | MCU on Eclipse 

Regards,

Libor

0 Kudos