Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- python
- import os.path
- import sys
- sys.path.insert(0, "/usr/local/lib/python2.7/site-packages")
- sys.path.insert(0, os.path.expanduser("~/repos/PyCortexMDebug"))
- end
- source ~/repos/PyCortexMDebug/cmdebug/svd_gdb.py
- define svd21g
- svd_load ~/Downloads/Atmel.SAMD21_DFP.1.2.280/samd21a/svd/ATSAMD21G18A.svd
- end
- define svd51g
- svd_load ~/Downloads/Atmel.SAMD51_DFP.1.0.70/svd/ATSAMD51G19A.svd
- end
- define svd51j
- svd_load ~/Downloads/Atmel.SAMD51_DFP.1.0.70/svd/ATSAMD51J19A.svd
- end
- define svd51p
- svd_load ~/Downloads/Atmel.SAMD51_DFP.1.0.70/svd/ATSAMD51P20A.svd
- end
- define svd840
- svd_load ~/repos/circuitpython/ports/nrf/nrfx/mdk/nrf52840.svd
- end
- define svdf407
- svd_load ~/Downloads/en.stm32f4_svd/STM32F4_svd_V1.2/STM32F407.svd
- end
- define reload
- python
- info = gdb.execute("info file", False, True)
- filename = info.split("\n")[0].split("\"")[1]
- directory = filename.split("/")[-2]
- board = directory.split("-")[1]
- gdb.execute("make -j3 BOARD=" + board + "")
- end
- load
- mon reset
- end
- define reload_debug
- python
- info = gdb.execute("info file", False, True)
- filename = info.split("\n")[0].split("\"")[1]
- directory = filename.split("/")[-2]
- board = directory.split("-")[1]
- gdb.execute("make -j3 BOARD=" + board + " DEBUG=1")
- end
- load
- mon reset
- end
- define clean
- python
- info = gdb.execute("info file", False, True)
- filename = info.split("\n")[0].split("\"")[1]
- directory = filename.split("/")[-2]
- board = directory.split("-")[1]
- gdb.execute("make -j3 BOARD=" + board + " clean")
- end
- end
- tar ext :2331
- set prompt \033[1;34m(gdb) \033[0m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement