kopia lustrzana https://github.com/stlink-org/stlink
Writing registers works too
rodzic
8c7b98a4cb
commit
a19abbb547
|
@ -78,7 +78,7 @@ int main(int argc, char *argv[]) {
|
||||||
stlink_read_mem32(sl, 0x4001100c, 4);
|
stlink_read_mem32(sl, 0x4001100c, 4);
|
||||||
DD(sl, "GPIOC_ODR = 0x%08x", read_uint32(sl->q_buf, 0));
|
DD(sl, "GPIOC_ODR = 0x%08x", read_uint32(sl->q_buf, 0));
|
||||||
#endif
|
#endif
|
||||||
#if 1
|
#if 0
|
||||||
// happy new year 2011: let blink all the leds
|
// happy new year 2011: let blink all the leds
|
||||||
// see "RM0041 Reference manual - STM32F100xx advanced ARM-based 32-bit MCUs"
|
// see "RM0041 Reference manual - STM32F100xx advanced ARM-based 32-bit MCUs"
|
||||||
|
|
||||||
|
@ -169,13 +169,14 @@ int main(int argc, char *argv[]) {
|
||||||
stlink_read_mem32(sl, 0x20000000, 1024 * 6);
|
stlink_read_mem32(sl, 0x20000000, 1024 * 6);
|
||||||
stlink_read_mem32(sl, 0x20000000 + 1024 * 6, 1024 * 2);
|
stlink_read_mem32(sl, 0x20000000 + 1024 * 6, 1024 * 2);
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 1
|
||||||
stlink_read_all_regs(sl);
|
reg regs;
|
||||||
|
stlink_read_all_regs(sl, ®s);
|
||||||
stlink_step(sl);
|
stlink_step(sl);
|
||||||
fputs("++++++++++ write r0 = 0x12345678\n", stderr);
|
fputs("++++++++++ write r0 = 0x12345678\n", stderr);
|
||||||
stlink_write_reg(sl, 0x12345678, 0);
|
stlink_write_reg(sl, 0x12345678, 0);
|
||||||
stlink_read_reg(sl, 0);
|
stlink_read_reg(sl, 0, ®s);
|
||||||
stlink_read_all_regs(sl);
|
stlink_read_all_regs(sl, ®s);
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
stlink_run(sl);
|
stlink_run(sl);
|
||||||
|
|
Ładowanie…
Reference in New Issue