Created
April 8, 2019 08:56
-
-
Save samuelsadok/040b48143efe4f209276f63fe378063b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source Support/gdbtrace.init | |
target remote | openocd -f "interface/stlink-v2.cfg" -f "target/stm32f4x_stlink.cfg" -c "gdb_port pipe; log_output openocd.log" | |
#cortex_m vector_catch all | |
#monitor swdp_scan | |
monitor reset halt | |
monitor cortex_m vector_catch all | |
#file /Data/Projects/ODrive/Firmware/build/ODriveFirmware.elf | |
#attach 1 # <---- Connect to the target | |
set mem inaccessible-by-default off | |
set print pretty | |
#load | |
#start | |
enableSTM32SWD # <*--- turn on SWO output pin on CPU | |
monitor tpiu config internal swo.log uart off 168000000 | |
## ---------- EITHER, IF USING A BLUEPILL------------------------- | |
#monitor traceswo 2250000 | |
# # <*--- wakeup tracing on the probe | |
#prepareSWD SystemCoreClock 2250000 1 0 # <*--- Setup SWO timing (Bluepill case) | |
# | |
## ----------ALTERNATIVELY, FOR GENUINE BMP----------------------- | |
#monitor traceswo # <*--- Enable BMP traceswo output | |
#prepareSWD ConfigCoreClock 200000 0 1 # <*--- Setup SWO timing (BMP case) | |
## ----------END OF ALTERNATIVE----------------------------------- | |
dwtSamplePC 1 | |
dwtSyncTap 3 | |
dwtPostTap 1 | |
dwtPostInit 1 | |
dwtPostReset 15 | |
dwtCycEna 1 | |
ITMId 1 | |
ITMGTSFreq 3 | |
ITMTSPrescale 3 | |
ITMTXEna 1 | |
ITMSYNCEna 1 | |
ITMEna 1 | |
ITMTER 0 0xFFFFFFFF | |
ITMTPR 0xFFFFFFFF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment