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:
<file path="board/devboard/pin_mux.c" update_enabled="true"/>
<file path="board/devboard/pin_mux.h" update_enabled="true"/>
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
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:
Linked resource has small decoration icon, see e.g. abc.c file:
This seems to be also related to linked resources: Link to Files and Folders in Eclipse | MCU on Eclipse