Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. python
  2. import os.path
  3. import sys
  4. sys.path.insert(0, "/usr/local/lib/python2.7/site-packages")
  5. sys.path.insert(0, os.path.expanduser("~/repos/PyCortexMDebug"))
  6. end
  7. source ~/repos/PyCortexMDebug/cmdebug/svd_gdb.py
  8.  
  9. define svd21g
  10. svd_load ~/Downloads/Atmel.SAMD21_DFP.1.2.280/samd21a/svd/ATSAMD21G18A.svd
  11. end
  12. define svd51g
  13. svd_load ~/Downloads/Atmel.SAMD51_DFP.1.0.70/svd/ATSAMD51G19A.svd
  14. end
  15. define svd51j
  16. svd_load ~/Downloads/Atmel.SAMD51_DFP.1.0.70/svd/ATSAMD51J19A.svd
  17. end
  18. define svd51p
  19. svd_load ~/Downloads/Atmel.SAMD51_DFP.1.0.70/svd/ATSAMD51P20A.svd
  20. end
  21. define svd840
  22. svd_load ~/repos/circuitpython/ports/nrf/nrfx/mdk/nrf52840.svd
  23. end
  24. define svdf407
  25. svd_load ~/Downloads/en.stm32f4_svd/STM32F4_svd_V1.2/STM32F407.svd
  26. end
  27. define reload
  28. python
  29. info = gdb.execute("info file", False, True)
  30. filename = info.split("\n")[0].split("\"")[1]
  31. directory = filename.split("/")[-2]
  32. board = directory.split("-")[1]
  33. gdb.execute("make -j3 BOARD=" + board + "")
  34. end
  35. load
  36. mon reset
  37. end
  38. define reload_debug
  39. python
  40. info = gdb.execute("info file", False, True)
  41. filename = info.split("\n")[0].split("\"")[1]
  42. directory = filename.split("/")[-2]
  43. board = directory.split("-")[1]
  44. gdb.execute("make -j3 BOARD=" + board + " DEBUG=1")
  45. end
  46. load
  47. mon reset
  48. end
  49.  
  50. define clean
  51. python
  52. info = gdb.execute("info file", False, True)
  53. filename = info.split("\n")[0].split("\"")[1]
  54. directory = filename.split("/")[-2]
  55. board = directory.split("-")[1]
  56. gdb.execute("make -j3 BOARD=" + board + " clean")
  57. end
  58. end
  59. tar ext :2331
  60. set prompt \033[1;34m(gdb) \033[0m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement