-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
73 lines (56 loc) · 2.4 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
build:
@echo "** Build Disassembled Firmware"
@sh disassemble/build.sh
reassemble:
@echo "** Reference Firmware Disassemble"
@sh disassemble/reas.sh $(abspath ../reassemble-Default/reassemble.exe)
jlink_dir = /opt/SEGGER/JLink
jlink_lib_dir = /opt/SEGGER/JLink/JLink_Linux_V632g_x86_64
ozone_dir = /opt/SEGGER/Ozone/Lib
studio_dir = /opt/SEGGER/segger_embedded_studio_for_arm_3.34a/bin
install:
#cp util/jlink_flashloader/JLinkDevices.xml $(jlink_dir)
#cp -R util/jlink_flashloader/Holtek $(jlink_dir)/Devices
#cp util/jlink_flashloader/JLinkDevices.xml $(jlink_lib_dir)
#cp -R util/jlink_flashloader/Holtek $(jlink_lib_dir)/Devices
#cp util/jlink_flashloader/JLinkDevices.xml $(ozone_dir)
#cp -R util/jlink_flashloader/Holtek $(ozone_dir)/Devices
#cp util/jlink_flashloader/JLinkDevices.xml $(studio_dir)
#cp -R util/jlink_flashloader/Holtek $(studio_dir)/Devices
cp util/jlink_flashloader/JLinkDevices.xml /tmp
cp -R util/jlink_flashloader/Holtek /tmp/Devices
jlink:
JLinkExe -Device HT32F1654 -CommanderScript util/connect.jlink
#JLinkExe -Device HT32F1655 -CommanderScript util/connect.jlink
erase_pok3r:
JLinkExe -Device HT32F1655 -CommanderScript util/version-erase1655.jlink
erase_cykb:
JLinkExe -Device HT32F1654 -CommanderScript util/version-erase1654.jlink
protect_pok3r:
JLinkExe -Device HT32F1654 -CommanderScript util/protect1655.jlink
protect_cykb:
JLinkExe -Device HT32F1654 -CommanderScript util/protect1654.jlink
pok3r_bootloader:
cp disassemble/pok3r/builtin/firmware_builtin.bin /tmp/flash.bin
JLinkExe -Device HT32F1655 -CommanderScript util/flash.jlink
rm /tmp/flash.bin
rgb_bootloader:
cp disassemble/pok3r_rgb/builtin_rgb/firmware_builtin_rgb.bin /tmp/flash.bin
JLinkExe -Device HT32F1654 -CommanderScript util/flash.jlink
rm /tmp/flash.bin
core_bootloader:
cp disassemble/core/builtin_core/firmware_builtin_core.bin /tmp/flash.bin
JLinkExe -Device HT32F1654 -CommanderScript util/flash.jlink
rm /tmp/flash.bin
md200_bootloader:
cp disassemble/md200/bootloader/md200_bootloader.bin /tmp/flash.bin
JLinkExe -Device HT32F1654 -CommanderScript util/flash.jlink
rm /tmp/flash.bin
flash_test:
arm-none-eabi-objcopy HT32.elf -O binary /tmp/flash.bin
JLinkExe -Device HT32F1654 -CommanderScript util/flash.jlink
rm /tmp/flash.bin
mass_erase:
JLinkExe -Device HT32F1654 -CommanderScript util/mass-erase.jlink
unprotect:
JLinkExe -Device HT32F1654 -CommanderScript util/unprotect.jlink