Skip to content

Commit 90d50ce

Browse files
agattidpgeorge
authored andcommitted
shared/runtime/semihosting: Rename ARM semihosting files.
Make room for RISC-V semihosting code, by renaming the existing `semihosting.[ch]` files into `semihosting_arm.[ch]`. Signed-off-by: Alessandro Gatti <[email protected]>
1 parent de0e13a commit 90d50ce

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

shared/runtime/semihosting.c renamed to shared/runtime/semihosting_arm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include "semihosting.h"
27+
#include "semihosting_arm.h"
2828

2929
// Resources:
3030
// http://embed.rs/articles/2016/semi-hosting-rust/

shared/runtime/semihosting.h renamed to shared/runtime/semihosting_arm.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
* THE SOFTWARE.
2525
*/
26-
#ifndef MICROPY_INCLUDED_LIB_UTILS_SEMIHOSTING_H
27-
#define MICROPY_INCLUDED_LIB_UTILS_SEMIHOSTING_H
26+
#ifndef MICROPY_INCLUDED_SHARED_RUNTIME_SEMIHOSTING_ARM_H
27+
#define MICROPY_INCLUDED_SHARED_RUNTIME_SEMIHOSTING_ARM_H
2828

2929
/*
3030
3131
To use semi-hosting for a replacement UART:
32-
- Add lib/semihosting/semihosting.c to the Makefile sources.
32+
- Add shared/runtime/semihosting_arm.c to the Makefile sources.
3333
- Call mp_semihosting_init() in main(), around the time UART is initialized.
3434
- Replace mp_hal_stdin_rx_chr and similar in mphalport.c with the semihosting equivalent.
35-
- Include lib/semihosting/semihosting.h in the relevant files.
35+
- Include shared/runtime/semihosting_arm.h in the relevant files.
3636
3737
Then make sure the debugger is attached and enables semihosting. In OpenOCD this is
3838
done with ARM semihosting enable followed by reset. The terminal will need further
@@ -48,4 +48,4 @@ int mp_semihosting_rx_char();
4848
uint32_t mp_semihosting_tx_strn(const char *str, size_t len);
4949
uint32_t mp_semihosting_tx_strn_cooked(const char *str, size_t len);
5050

51-
#endif // MICROPY_INCLUDED_LIB_UTILS_SEMIHOSTING_H
51+
#endif // MICROPY_INCLUDED_SHARED_RUNTIME_SEMIHOSTING_ARM_H

0 commit comments

Comments
 (0)