13d0407baSopenharmony_ci# 23d0407baSopenharmony_ci# Copyright (c) 2022 FuZhou Lockzhiner Electronic Co., Ltd. All rights reserved. 33d0407baSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 43d0407baSopenharmony_ci# you may not use this file except in compliance with the License. 53d0407baSopenharmony_ci# You may obtain a copy of the License at 63d0407baSopenharmony_ci# 73d0407baSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 83d0407baSopenharmony_ci# 93d0407baSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 103d0407baSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 113d0407baSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 123d0407baSopenharmony_ci# See the License for the specific language governing permissions and 133d0407baSopenharmony_ci# limitations under the License. 143d0407baSopenharmony_ci# 153d0407baSopenharmony_ci 163d0407baSopenharmony_ciTARGET = liteos 173d0407baSopenharmony_ciELF_FILE = $(ELFFILE) 183d0407baSopenharmony_ciBUILD_DIR = $(OUTDIR) 193d0407baSopenharmony_ci 203d0407baSopenharmony_ciPREFIX = arm-none-eabi- 213d0407baSopenharmony_ciCC =$(PREFIX)gcc 223d0407baSopenharmony_ciAS = $(PREFIX)gcc -x assembler-with-cpp 233d0407baSopenharmony_ciCP = $(PREFIX)objcopy 243d0407baSopenharmony_ciSZ = $(PREFIX)size 253d0407baSopenharmony_ci 263d0407baSopenharmony_ciHEX = $(CP) -O ihex 273d0407baSopenharmony_ciBIN = $(CP) -O binary -S 283d0407baSopenharmony_ci 293d0407baSopenharmony_ci#################################### 303d0407baSopenharmony_ciall: 313d0407baSopenharmony_ci @echo "Create $(BUILD_DIR)/$(TARGET).elf" 323d0407baSopenharmony_ci cp -f ${ELF_FILE} $(BUILD_DIR)/$(TARGET).elf 333d0407baSopenharmony_ci $(SZ) $(BUILD_DIR)/$(TARGET).elf 343d0407baSopenharmony_ci @echo "Create $(BUILD_DIR)/$(TARGET).hex" 353d0407baSopenharmony_ci rm -rf $(BUILD_DIR)/$(TARGET).hex 363d0407baSopenharmony_ci $(HEX) $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex 373d0407baSopenharmony_ci @echo "Create $(BUILD_DIR)/$(TARGET).bin" 383d0407baSopenharmony_ci rm -rf $(BUILD_DIR)/$(TARGET).bin 393d0407baSopenharmony_ci $(BIN) $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).bin 403d0407baSopenharmony_ci md5sum $(BUILD_DIR)/$(TARGET)*