/* * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. * * SPDX-License-Identifier: BSD-3-Clause */ #include "pico/stdio/driver.h" #include "pico/stdio_semihosting.h" #include "pico/binary_info.h" //static void __attribute__((naked)) semihosting_puts(const char *s) { // __asm ( // // "mov r1, r0\n" // "mov r0, #4\n" // "bkpt 0xab\n" // "bx lr\n" // ); //} static void __attribute__((naked)) semihosting_putc(char c) { __asm ( "mov r1, r0\n" "mov r0, #3\n" "bkpt 0xab\n" "bx lr\n" ); } static void stdio_semihosting_out_chars(const char *buf, int length) { for (uint i = 0; i