]> rtime.felk.cvut.cz Git - sysless.git/blob - arch/h8300/generic/bloader/Makefile.omk
h8300/bloader: Wait between botstrap phases
[sysless.git] / arch / h8300 / generic / bloader / Makefile.omk
1 # -*- makefile -*-
2
3 bin_PROGRAMS = bloader
4
5 bloader_SOURCES = bloader.c 
6 bloader_LIBS = boot_fn bspbase
7 #bloader_MOREOBJS = boot_fn.o
8
9 link_VARIANTS = boot bload
10
11 VERBOSE=-vv
12
13 TOHIT=$(USER_COMPILED_DIR_NAME)/bin-utils/tohit -d $(HIT_DEV)
14 HIT_BAUD=19200
15
16 .PHONY: bootstrap bootstrap_ram bootstrap_erase bootstrap_flash
17 bootstrap: bootstrap_ram bootstrap_erase bootstrap_flash
18
19 bootstrap_ram:
20         @$(QUIET_CMD_ECHO) "Bootstrap to internal ram"
21         $(Q)$(TOHIT) $(VERBOSE) --baud 4800 --command B --blockmode 128 $(USER_COMPILED_DIR_NAME)/bin/bloader-bload.bin || exit 1
22         @$(QUIET_CMD_ECHO) "Done"
23         @sleep 1
24
25 bootstrap_erase:
26         @$(QUIET_CMD_ECHO) "Erasing flash"
27         $(Q)$(TOHIT) $(VERBOSE) --baud $(HIT_BAUD) --erase --start 0x000000 --length 0x1600 || exit 1
28         @$(QUIET_CMD_ECHO) "Done"
29         @sleep 1
30
31 bootstrap_flash:
32         @$(QUIET_CMD_ECHO) "Programming flash"
33         $(Q)$(TOHIT) $(VERBOSE) --baud $(HIT_BAUD) --command 1 --blockmode 32 --start 0x000000 $(USER_COMPILED_DIR_NAME)/bin/bloader-boot.bin || exit