Skip to content

Commit

Permalink
tools: scripts: generic_variables: handle maxim
Browse files Browse the repository at this point in the history
If a TARGET is specified as parameter to the make command and has the
`max` prefix, then assume that the PLATFORM=maxim.

This patch allows building maxim platform projects without specifying
explicitly the platform if there is a maxim TARGET set.

Example:
`make PLATFORM=maxim TARGET=max32650`
can be called now simply
`make TARGET=max32650`

A similar approach is already implemented for the xilinx projects where
if a user sets the HARDWARE variable, the PLATFORM is set automatically
to `xilinx`.

Signed-off-by: Antoniu Miclaus <[email protected]>
  • Loading branch information
amiclaus committed Nov 17, 2023
1 parent 7745b3d commit ded4e85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/scripts/generic_variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ else
ifneq '' '$(findstring pinmux_config.c,$(HARDWARE))'
PLATFORM = aducm3029
else
ifneq '' '$(findstring max,$(TARGET))'
PLATFORM = maxim
else
$(error No HARDWARE found)
endif
endif
endif
endif
endif
endif
endif

0 comments on commit ded4e85

Please sign in to comment.