book icon indicating copy to clipboard operation
book copied to clipboard

Book has example code that says shouldn't be run

Open leshow opened this issue 6 years ago • 0 comments

in getting started- hardware the book/code says:

    // exit QEMU
    // NOTE do not run this on hardware; it can corrupt OpenOCD state
    // debug::exit(debug::EXIT_SUCCESS);

then later when gdb is running on the hardware:

(gdb) next
16          writeln!(stdout, "Hello, world!").unwrap();

(gdb) next
19          debug::exit(debug::EXIT_SUCCESS);

Note that the line is supposed to be printed with hprintln. I'm happy to fix this in a PR

leshow avatar Jul 22 '19 03:07 leshow