Advertisement
Guest User

Untitled

a guest
Sep 1st, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.07 KB | None | 0 0
  1. ########################################################################
  2. # BSD 3-Clause License
  3. # Copyright (c) 2019, Eric Pernia
  4. # All rights reserved.
  5. #
  6. # Write cese-pres.bin at 0x1A000000
  7. # Write cvt_2040 at 0x1B000000
  8. ########################################################################
  9.  
  10. # OpenOCD executable name
  11. OOCD=openocd
  12.  
  13. # OpenOCD configuration script for board
  14. OOCD_SCRIPT=lpc4337.cfg
  15.  
  16. # Download program into flash memory of board
  17. download_m4:
  18.     @echo DOWNLOAD to FLASH
  19.     $(OOCD) -f $(OOCD_SCRIPT) \
  20.         -c "init" \
  21.         -c "halt 0" \
  22.         -c "flash write_image erase unlock cese-pres.bin 0x1A000000 bin" \
  23.         -c "reset run" \
  24.         -c "shutdown" 2>&1
  25.  
  26. download_m0:
  27.     $(OOCD) -f $(OOCD_SCRIPT) \
  28.         -c "init" \
  29.         -c "halt 0" \
  30.         -c "flash write_image erase unlock cvt_2040_14ipp.bin 0x1B000000 bin" \
  31.         -c "reset run" \
  32.         -c "shutdown" 2>&1     
  33.        
  34. # Erase Flash memory of board
  35. erase:
  36.     @echo ERASE
  37.     $(Q)$(OOCD) -f $(OOCD_SCRIPT) \
  38.         -c "init" \
  39.         -c "halt 0" \
  40.         -c "flash erase_sector 0 0 last" \
  41.         -c "shutdown" 2>&1
  42.  
  43. .PHONY: download_m0 download_m4 erase
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement