Created
December 7, 2020 15:12
-
-
Save artizirk/82c4190f45017d8befcff45c0984b3ab to your computer and use it in GitHub Desktop.
openocd: arm semihosting enable; reset run
This file contains 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
void __attribute__ ((noinline)) print_semihosting(const void *buf, uint32_t size) | |
{ | |
uint32_t args[3]; | |
args[0] = 1; | |
args[1] = (uint32_t)buf; | |
args[2] = size; | |
asm( "mov r0, #5\n" | |
"mov r1, %0\n" | |
"bkpt 0x00AB" : : "r"(args) : "r0", "r1", "memory"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment