-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
55 lines (43 loc) · 1.62 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
APP = nrf5340
OSDIR = mdepx
CMD = python3 -B ${OSDIR}/tools/emitter.py
all: app net
app:
@${CMD} -j src-app/mdepx.conf
${CROSS_COMPILE}objcopy -O ihex obj/${APP}-app.elf obj/${APP}-app.hex
${CROSS_COMPILE}size obj/${APP}-app.elf
net:
@${CMD} -j src-net/mdepx.conf
${CROSS_COMPILE}objcopy -O ihex obj/${APP}-net.elf obj/${APP}-net.hex
${CROSS_COMPILE}size obj/${APP}-net.elf
dtb-app:
cpp -nostdinc -Imdepx/dts -Imdepx/dts/arm -Imdepx/dts/common \
-Imdepx/dts/include -undef, -x assembler-with-cpp \
nrf5340_app.dts -O obj/nrf5340_app.dts
dtc -I dts -O dtb obj/nrf5340_app.dts -o obj/nrf5340_app.dtb
bin2hex.py --offset=1015808 obj/nrf5340_app.dtb obj/nrf5340_app.dtb.hex
nrfjprog -f NRF53 --erasepage 0xf8000-0xfc000
nrfjprog -f NRF53 --program obj/nrf5340_app.dtb.hex -r
dtb-net:
cpp -nostdinc -Imdepx/dts -Imdepx/dts/arm -Imdepx/dts/common \
-Imdepx/dts/include -undef, -x assembler-with-cpp \
nrf5340_net.dts -O obj/nrf5340_net.dts
dtc -I dts -O dtb obj/nrf5340_net.dts -o obj/nrf5340_net.dtb
bin2hex.py --offset=17022976 obj/nrf5340_net.dtb obj/nrf5340_net.dtb.hex
nrfjprog -f NRF53 --coprocessor CP_NETWORK \
--erasepage 0x0103c000-0x01040000
nrfjprog -f NRF53 --coprocessor CP_NETWORK \
--program obj/nrf5340_net.dtb.hex -r
flash-app:
nrfjprog -f NRF53 --erasepage 0x40000-0x60000
nrfjprog -f NRF53 --program obj/nrf5340-app.hex -r
flash-net:
nrfjprog -f NRF53 --coprocessor CP_NETWORK \
--erasepage 0x01000000-0x0103c000
nrfjprog -f NRF53 --coprocessor CP_NETWORK \
--program obj/nrf5340-net.hex -r
reset:
nrfjprog -f NRF53 -r
clean:
@rm -rf obj/*
include ${OSDIR}/mk/user.mk