加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 2.61 KB
一键复制 编辑 原始数据 按行查看 历史
iot-solution_admin 提交于 2021-03-22 15:35 . init version
CPRE := @
ifeq ($(V),1)
CPRE :=
VERB := --verbose
endif
MK_GENERATED_IMGS_PATH:=generated
SOLUTOIN_NAME:=$(shell basename `pwd`)
.PHONY:startup
startup: all
all:
@echo "Build Solution by $(BOARD) "
$(CPRE) scons $(VERB) --board=$(BOARD) -j4
@echo YoC SDK Done
@echo [INFO] Create bin files
$(CPRE) product image $(MK_GENERATED_IMGS_PATH)/images.zip -i $(MK_GENERATED_IMGS_PATH)/data -l -v "v1.0" -p
$(CPRE) product image $(MK_GENERATED_IMGS_PATH)/images.zip -e $(MK_GENERATED_IMGS_PATH) -x
$(CPRE) product image $(MK_GENERATED_IMGS_PATH)/images.zip -e $(MK_GENERATED_IMGS_PATH)/data -b
@echo [INFO] Create wm bin files
$(CPRE) csky-elfabiv2-objcopy -O binary ./out/$(SOLUTOIN_NAME)/yoc.elf ./out/$(SOLUTOIN_NAME)/yoc.bin
$(CPRE) gcc ../../components/chip_w800/wmsdk/tools/w800/wm_tool.c -Wall -lpthread -O2 -o ./out/$(SOLUTOIN_NAME)/wm_tool
$(CPRE) ./out/$(SOLUTOIN_NAME)/wm_tool -b ./out/$(SOLUTOIN_NAME)/yoc.bin -fc 0 -it 1 -ih 81FA000 -ra 8012000 -ua 8132000 -nh 0 -un 0 -vs yoc-7.3.0
$(CPRE) cat ../../components/chip_w800/wmsdk/tools/w800/w800_secboot.img ./out/$(SOLUTOIN_NAME)/yoc.img > ./out/$(SOLUTOIN_NAME)/yoc.fls
$(CPRE) ./out/$(SOLUTOIN_NAME)/wm_tool -b ./out/$(SOLUTOIN_NAME)/yoc.img -fc 1 -it 1 -ih 81FA000 -ra 8012000 -ua 8132000 -nh 0 -un 0 -vs yoc-7.3.0
$(CPRE) mv ./out/$(SOLUTOIN_NAME)/yoc_gz.img ./out/$(SOLUTOIN_NAME)/yoc_ota.bin
@echo [INFO] Create fls file
$(CPRE) cp $(MK_GENERATED_IMGS_PATH)/data/boot boot.bin
$(CPRE) cp $(MK_GENERATED_IMGS_PATH)/data/prim prim.bin
$(CPRE) cp $(MK_GENERATED_IMGS_PATH)/data/imtb imtb.bin
$(CPRE) ./out/$(SOLUTOIN_NAME)/wm_tool -b boot.bin -fc 0 -it 512 -ih 8002000 -ra 8002400 -ua 8132000 -nh 81FA000 -un 0
$(CPRE) ./out/$(SOLUTOIN_NAME)/wm_tool -b prim.bin -fc 0 -it 1 -ih 81FA000 -ra 8012000 -ua 8132000 -nh 0 -un 0
$(CPRE) ./out/$(SOLUTOIN_NAME)/wm_tool -b imtb.bin -fc 0 -it 1 -ih 20047400 -ra 8010000 -ua 0 -nh 0 -un 0
$(CPRE) cat boot.img prim.img imtb.img > ./out/$(SOLUTOIN_NAME)/yoc_total.fls
$(CPRE) rm -f boot.bin prim.bin imtb.bin boot.img prim.img imtb.img
run:all
$(CPRE) ./out/$(SOLUTOIN_NAME)/wm_tool -c $(DL_PORT) -rs at -ds 2000000 -dl ./out/$(SOLUTOIN_NAME)/yoc.fls -sl str -ws 115200
.PHONY:flash
flash:
$(CPRE) product flash $(MK_GENERATED_IMGS_PATH)/images.zip -w prim -f script/w800_flash.elf
.PHONY:flashdata
flashdata:
$(CPRE) product flashbin ir_data.bin 0x8200000 -f script/w800_spiflash.elf
.PHONY:flashall
flashall:
$(CPRE) product flash $(MK_GENERATED_IMGS_PATH)/images.zip -a -f script/w800_flash.elf
sdk:
$(CPRE) yoc sdk
.PHONY:clean
clean:
$(CPRE) scons -c
$(CPRE) find . -name "*.[od]" -delete
$(CPRE) rm yoc_sdk yoc.* generated out -rf
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化