• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2# encoding=utf-8
3# ============================================================================
4# @brief    Target Definitions File
5# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17# ============================================================================
18target = {
19    'ws63-liteos-app': {
20        'base_target_name': 'target_ws63_app_rom_template',
21        'os': 'liteos',
22        'defines': [
23            "USE_CMSIS_OS",
24            "USE_LITEOS",
25            "_ALL_SOURCE",
26            "__LITEOS__",
27            "-:CHIP_WS63=1",
28            "LIBUTIL_COMPAT",
29            "LOG_SUPPORT",
30            "HSO_SUPPORT",
31            "NO_TCXO_SUPPORT",
32            "UNSUPPORT_OTHER_MEM",
33            "SW_UART_DEBUG",
34            "SW_UART_CHIP_DEFINE",
35            "AT_COMMAND",
36            "DUMP_MEM_SUPPORT",
37            "BUILD_APPLICATION_STANDARD",
38            'CMD_ENABLE',
39            'WIFI_TASK_EXIST',
40            'BGLE_TASK_EXIST',
41            'BTH_TASK_EXIST',
42            "CONFIG_IPERF_SUPPORT",
43            "CONFIG_SENDTEST_SUPPORT",
44            "_PRE_WLAN_FEATURE_BTCOEX",
45            "_PRE_LWIP_ZERO_COPY",
46            #"WIFI_TCM_OPTIMIZE",
47            #"LWIP_TCM_OPTIMIZE",
48            "CHECKSUM_CHECK_TCP=0",
49            "CHECKSUM_CHECK_UDP=0",
50            "MBEDTLS_AES_ROM_TABLES",
51            "UPDATE_WIFI_STATIC_LIB",
52            "UPDATE_BTC_STATIC_LIB",
53            "CONFIG_NV_SUPPORT_SINGLE_CORE_SYSTEM", 'CONFIG_OTA_UPDATE_SUPPORT',
54            "MBEDTLS_HARDEN_OPEN",
55            'CONFIG_UART_SUPPORT_LPM',
56            "_PRE_RADAR_CCA_SW_OPT",
57            "MBEDTLS_CONFIG_FILE=\"config-ws-iot.h\"",
58            "CONFIG_NO_VERIFY_TLS_TIME"
59        ],
60        'ram_component': [
61            'ws63_liteos_app',
62            'ws63_liteos_app_lds',
63            'liteos_port',
64            'irmalloc',
65            'non_os',
66            '-:rtc',
67            'arch_port',
68            'board_config', # 被 pinctrl 组件依赖
69            'lpm', # 被 pwm 组件依赖
70            'chip_ws63', 'pmp_cfg_ws63',
71            'reboot', 'hal_reboot', 'reboot_port', 'cpu_utils', 'hal_cpu_core',
72            'testsuite',
73            'gpio','hal_gpio_v150','gpio_port',
74            "dfx_port_ws63", "algorithm", "cmn_header", "lwip", "lwip_tcm", "wifi_service", "mbedtls", "wpa_supplicant",
75            "at", "wifi_driver_hmac", "wifi_driver_dmac", "wifi_driver_tcm", "wifi_at", "wifi_csa", "wifi_frag", "wifi_alg_txbf", "wifi_alg_temp_protect", "wifi_tx_amsdu",
76            "wifi_auto_adjust_freq", "wifi_alg_anti_interference", "wifi_alg_edca_opt", "wifi_alg_cca_opt", "wifi_radar_sensor",
77            'wifi_btcoex', "wifi_uapsd_ap", 'sio_port', 'i2s', 'hal_sio',
78            'liteos_208_5_0', 'rtc_unified', 'hal_rtc_unified', 'rtc_unified_port',
79            'nv', 'nv_ws63', 'nv_zdiag_ws63', 'plt_at', 'dfx_printer',
80            'update_common', 'update_common_ws63', 'update_ab_ws63', 'factory_ws63', 'update_storage', 'update_storage_ws63',
81            'pm_port_ws63',
82            'gmssl_hmac_sm3',
83            'bt_at',
84            "bt_host",
85            'bg_common',
86            'bth_gle',
87            'bth_sdk',
88            'samples',
89            'bts_header',
90            'bt_app',
91            'mips',
92            'hal_mips',
93            "bgtp",
94            'soc_port',
95            'radar_sensing',
96            'radar_at',
97            'radar_ai',
98            'ohos_adapt',
99            "wifiservice",
100            "hal_iothardware",
101            "sle_lite",
102            "ble_lite",
103            'printf_adapt',
104            'little_fs','littlefs_adapt_ws63',
105            "begetutil"   ,"hilog_lite_static", "samgr_adapter", "bootstrap", "fsmanager_static" ,"hal_update_static", "hilog_static", "inithook",   "samgr_source",
106            "broadcast", "hal_file_static"  ,"init_log" , "native_file", "udidcomm",
107            "cjson_static", "hal_sys_param", "hichainsdk" ,"hota" ,"init_utils" , "param_client_lite",
108            "hal_sysparam" ,"hievent_lite_static" ,"huks_3.0_sdk"  , "samgr",
109            "hidumper_mini","hiview_lite_static","blackbox_lite",
110
111            'xo_trim_port',
112            "mqtt",
113            "coap"
114        ],
115        'ccflags': [
116            "-DBOARD_ASIC", '-DPRE_ASIC',
117        ],
118        'application': 'application',
119        'bin_name': 'ws63-liteos-app',
120        'smaller': True,
121        'hso_enable_bt': True,
122        'hso_enable': True,
123        'codesize_statistic': True,
124        'nv_update':True,
125        'generate_efuse_bin': True,
126        'copy_files_to_interim': True
127    },
128    'ws63-flashboot': {
129        'base_target_name': 'target_ws63_boot_template',
130        'CONFIG_TIMER_USING_V150': 'y',
131        "CONFIG_PMP_USING_RISCV_31" : 'y',
132        'defines': [
133            "__NON_OS__",
134            "WS63_PRODUCT_NONE",
135            "CONFIG_TIMER_MAX_NUM=3",
136            "CONFIG_TIMER_CLOCK_VALUE=24000000",
137            "CONFIG_TIMER_0_WIDTH_64=0",
138            "SW_UART_DEBUG",
139            "CONFIG_UART_SUPPORT_RX",
140            "CONFIG_UART_SUPPORT_TX",
141            "BUILD_APPLICATION_ROM",
142            "BUILD_NOOSAL",
143            "FLASH_REGION_CFG_FLASHBOOT",
144            "EFUSE_BIT_OPERATION",
145        ],
146        'ram_component': [
147            "flashboot_common", "common_boot", "ws63_flashboot_lds", "dfx_preserve",
148            "libboundscheck", "chip_ws63", "ws63_mem_config", "common_headers","non_os",
149            "sfc_port_ws63", "sfc_flash_config_ws63", "sfc_boot", "hal_sfc",
150            "cmn_header", "arch_port", "osal", "dfx_panic", "dfx_exception","cpu_utils",
151            '-:rtc', '-:hal_rtc', "common_boot_libc",
152            "error_code", "board_config", "chip_boot_port", "chip_boot_config",
153             '-:hal_systick', 'partition', 'partition_ws63','pmp_cfg_ws63', 'nonos_malloc', 'nonos_malloc_port',
154            'update_common', 'update_local', 'update_local_ws63', 'lzma_22.00', 'update_storage', 'update_common_ws63', 'update_ab_ws63', 'factory_ws63',
155            'efuse', 'hal_efuse_v151', 'efuse_port', 'soc_port',
156        ],
157        'ram_component_set': ['uart', "time_set", "cpu", "pinctrl", "watchdog", "security_unified",'pmp_set'],
158        'os': 'non-os',
159        'application': 'flashboot',
160        'bin_name': 'flashboot'
161    },
162    'ws63-liteos-xts': {
163        'base_target_name': 'target_ws63_xts_rom_template',
164        'liteos_kconfig': 'ws63_xts',
165        'os': 'liteos',
166        'defines': [
167            "USE_CMSIS_OS",
168            "USE_LITEOS",
169            "_ALL_SOURCE",
170            "__LITEOS__",
171            "-:CHIP_WS63=1",
172            "LIBUTIL_COMPAT",
173            "LOG_SUPPORT",
174            "HSO_SUPPORT",
175            "CONFIG_SUPPORT_NEW_DIAG",
176            "NO_TCXO_SUPPORT",
177            "UNSUPPORT_OTHER_MEM",
178            "SW_UART_DEBUG",
179            "SW_UART_CHIP_DEFINE",
180            "AT_COMMAND",
181            "DUMP_MEM_SUPPORT",
182            "BUILD_APPLICATION_STANDARD",
183            'CMD_ENABLE',
184            'WIFI_TASK_EXIST',
185            'BGLE_TASK_EXIST',
186            'BTH_TASK_EXIST',
187            "CONFIG_IPERF_SUPPORT",
188            "CONFIG_SENDTEST_SUPPORT",
189            "CONFIG_CACHE_MISS_SUPPORT",
190            "_PRE_WLAN_FEATURE_BTCOEX",
191            "_PRE_LWIP_ZERO_COPY",
192            #"WIFI_TCM_OPTIMIZE",
193            #"LWIP_TCM_OPTIMIZE",
194            "CHECKSUM_CHECK_TCP=0",
195            "CHECKSUM_CHECK_UDP=0",
196            "MBEDTLS_AES_ROM_TABLES",
197            "UPDATE_WIFI_STATIC_LIB",
198            "UPDATE_BTC_STATIC_LIB",
199            "CONFIG_NV_SUPPORT_SINGLE_CORE_SYSTEM", 'CONFIG_OTA_UPDATE_SUPPORT',
200            "MBEDTLS_HARDEN_OPEN",
201            'CONFIG_UART_SUPPORT_LPM',
202            "_PRE_RADAR_CCA_SW_OPT",
203        ],
204        'ram_component': [
205            'ws63_liteos_app',
206            'ws63_liteos_xts_lds',
207            'liteos_port',
208            'irmalloc',
209            'non_os',
210            '-:rtc',
211            'arch_port',
212            'board_config', # 被 pinctrl 组件依赖
213            'lpm', # 被 pwm 组件依赖
214            'chip_ws63', 'pmp_cfg_ws63',
215            'reboot', 'hal_reboot', 'reboot_port', 'cpu_utils', 'hal_cpu_core',
216            'testsuite',
217            'gpio','hal_gpio_v150','gpio_port',
218            "dfx_port_ws63", "algorithm", "cmn_header", "lwip", "lwip_tcm", "wifi_service", "mbedtls", "wpa_supplicant",
219            "at", "wifi_driver_hmac", "wifi_driver_dmac", "wifi_driver_tcm", "wifi_at", "wifi_csa", "wifi_alg_txbf", "wifi_alg_temp_protect", "wifi_tx_amsdu", "wifi_sdp",
220            "wifi_auto_adjust_freq", "wifi_promisc", "wifi_alg_anti_interference", "wifi_alg_edca_opt", "wifi_alg_cca_opt", "wifi_sr",
221            "wifi_frag", "wifi_mbo", "wifi_bsrp_nfrp", "wifi_slp", "wifi_radar_sensor", "wifi_apf", "wifi_repeater", "wifi_csi", "wifi_wapi", "wifi_wps", "wifi_psd", "wifi_blacklist", "wifi_m2u",
222            "wifi_latency", "wifi_roam", "wifi_uapsd_sta", "wifi_ant_sel", "wifi_twt", "wifi_11k", "wifi_11v", "wifi_11r",  'wifi_btcoex', "wifi_uapsd_ap", "wifi_dnb",
223            'liteos_208_5_0', 'rtc_unified', 'hal_rtc_unified', 'rtc_unified_port',
224            'nv', 'nv_ws63', 'nv_zdiag_ws63', 'plt_at',
225            'update_common', 'update_common_ws63', 'update_ab_ws63', 'factory_ws63', 'update_storage', 'update_storage_ws63',
226            'pm_port_ws63',
227            'gmssl_hmac_sm3',
228            'bt_at',
229            "bt_host",
230            'bg_common',
231            'bth_gle',
232            'bth_sdk',
233            'samples',
234            'bts_header',
235            'bt_app',
236            'mips',
237            'hal_mips',
238            "bgtp",
239            'soc_port',
240            'radar_sensing',
241            'radar_at',
242            'ohos_adapt',
243            'printf_adapt',
244            'little_fs', 'littlefs_adapt_ws63',
245            "begetutil", "devattest_sdk", "hal_token_static" ,    "hilog_lite_static" ,  "huks_test_common",  "module_ActsBootstrapTest"    ,    "module_ActsSamgrTest"  ,      "samgr_adapter",
246            "bootstrap", "fsmanager_static"  ,"hal_update_static"  ,  "hilog_static"  ,      "inithook"   ,       "module_ActsDeviceAttestTest"   ,  "module_ActsUpdaterFuncTest"  ,"samgr_source",
247            "broadcast","hal_file_static" ,  "hctest"    ,           "hiview_lite_static",  "init_log"   ,       "module_ActsDfxFuncTest"    ,      "native_file"      ,           "udidcomm",
248            "cjson_static"  ,  "hal_sys_param"   ,  "hichainsdk"     ,      "hota"      ,          "init_utils" ,       "module_ActsHieventLiteTest"   ,   "param_client_lite",
249            "devattest_core" , "hal_sysparam"  ,    "hievent_lite_static" , "huks_3.0_sdk"   ,       "module_ActsHuksHalFunctionTest" , "samgr",
250            "blackbox_lite",
251            "hidumper_mini",
252            'xo_trim_port',
253        ],
254        'ccflags': [
255            "-DBOARD_ASIC", '-DPRE_ASIC',
256        ],
257        'application': 'application',
258        'bin_name': 'ws63-liteos-xts',
259        'hso_enable_bt': True,
260        'hso_enable': True,
261        'codesize_statistic': True,
262        'nv_update':True,
263        'copy_files_to_interim': True
264    },
265}
266
267# custom copy rules, put it in target_group below and it takes effect.
268# <root> means root path
269# <out_root> means output_root path
270# <pack_target> means target_group key_name
271target_copy = {
272
273}
274
275target_group = {
276
277}
278