Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # \file platforms.mk |
| 3 | # \version 1.0 |
| 4 | # |
| 5 | # \brief |
| 6 | # Makefile to describe supported boards and platforms for Cypress MCUBoot based applications. |
| 7 | # |
| 8 | ################################################################################ |
| 9 | # \copyright |
| 10 | # Copyright 2018-2019 Cypress Semiconductor Corporation |
| 11 | # SPDX-License-Identifier: Apache-2.0 |
| 12 | # |
| 13 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 14 | # you may not use this file except in compliance with the License. |
| 15 | # You may obtain a copy of the License at |
| 16 | # |
| 17 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 18 | # |
| 19 | # Unless required by applicable law or agreed to in writing, software |
| 20 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 21 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 22 | # See the License for the specific language governing permissions and |
| 23 | # limitations under the License. |
| 24 | ################################################################################ |
| 25 | |
| 26 | include host.mk |
| 27 | |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 28 | # supported platforms |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame^] | 29 | PSOC_06X := PSOC_061_2M PSOC_061_1M PSOC_061_512K PSOC_062_2M PSOC_062_1M PSOC_062_512K PSOC_063_1M |
| 30 | PLATFORMS := $(PSOC_06X) CYW20829 |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 31 | |
| 32 | ifneq ($(filter $(PLATFORM), $(PLATFORMS)),) |
| 33 | else |
| 34 | $(error Not supported platform: '$(PLATFORM)') |
| 35 | endif |
| 36 | |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame^] | 37 | ifeq ($(PLATFORM), $(filter $(PLATFORM), $(PSOC_06X))) |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 38 | FAMILY := PSOC6 |
| 39 | else ifeq ($(PLATFORM), CYW20829) |
| 40 | FAMILY := CYW20829 |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 41 | endif |
| 42 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 43 | # include family related makefile into build |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame^] | 44 | include platforms/$(FAMILY).mk |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 45 | |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 46 | DEFINES += $(PLATFORM) |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 47 | DEFINES += $(FAMILY) |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 48 | |
| 49 | # Convert defines to regular -DMY_NAME style |
| 50 | ifneq ($(DEFINES),) |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 51 | PLATFORM_DEFINES := $(addprefix -D, $(subst -,_,$(DEFINES))) |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 52 | endif |
| 53 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 54 | ############################################################################### |
| 55 | # Print debug information about all settings used and/or set in this file |
| 56 | ifeq ($(VERBOSE), 1) |
| 57 | $(info #### platforms.mk ####) |
| 58 | $(info DEFINES <-> $(DEFINES)) |
| 59 | $(info FAMILY <-> $(FAMILY)) |
| 60 | $(info PLATFORM <-- $(PLATFORM)) |
| 61 | $(info PLATFORMS <-> $(PLATFORMS)) |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame^] | 62 | $(info PLATFORM_DEFINES --> $(PLATFORM_DEFINES)) |
| 63 | $(info PSOC_06X <-> $(PSOC_06X)) |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 64 | endif |