Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ########################################################################
- # BSD 3-Clause License
- # Copyright (c) 2019, Eric Pernia
- # All rights reserved.
- #
- # Write cese-pres.bin at 0x1A000000
- # Write cvt_2040 at 0x1B000000
- ########################################################################
- # OpenOCD executable name
- OOCD=openocd
- # OpenOCD configuration script for board
- OOCD_SCRIPT=lpc4337.cfg
- # Download program into flash memory of board
- download_m4:
- @echo DOWNLOAD to FLASH
- $(OOCD) -f $(OOCD_SCRIPT) \
- -c "init" \
- -c "halt 0" \
- -c "flash write_image erase unlock cese-pres.bin 0x1A000000 bin" \
- -c "reset run" \
- -c "shutdown" 2>&1
- download_m0:
- $(OOCD) -f $(OOCD_SCRIPT) \
- -c "init" \
- -c "halt 0" \
- -c "flash write_image erase unlock cvt_2040_14ipp.bin 0x1B000000 bin" \
- -c "reset run" \
- -c "shutdown" 2>&1
- # Erase Flash memory of board
- erase:
- @echo ERASE
- $(Q)$(OOCD) -f $(OOCD_SCRIPT) \
- -c "init" \
- -c "halt 0" \
- -c "flash erase_sector 0 0 last" \
- -c "shutdown" 2>&1
- .PHONY: download_m0 download_m4 erase
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement