Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for semihosting #188

Open
notjob opened this issue May 25, 2016 · 3 comments
Open

Support for semihosting #188

notjob opened this issue May 25, 2016 · 3 comments
Labels

Comments

@notjob
Copy link

notjob commented May 25, 2016

It would be nice to allow support for semihosting for targets that have no serial output possibilities. In order to achieve that, one needs to add --specs=rdimon.specs to the linker options. But then since the low-level functions defined in rdimon.specs are already defined in retarget.cpp, the program will not compile or work. These functions are:

  • _lseek
  • _isatty
  • _open
  • _close

I can see that in device.h file of some mbed-hal-* modules, DEVICE_SEMIHOST exists but it doesn't seem to have been used at all. One suggestion that I've tried and worked is to #if !DEVICE_SEMIHOST the definitions of those functions out. The two functions below are also necessary to exclude for semihosting to work correctly:

  • _read
  • _write
@ciarmcom
Copy link
Member

ARM Internal Ref: IOTSFW-2603

@Kukunin
Copy link

Kukunin commented Jan 22, 2017

Spent at least 4 hours trying to enable semihosting in my mbed-based project.
Eventually figured out, that mbed implements low-level functions strictly to redirect them to UART.
So, 👍 for this issue

@amq
Copy link

amq commented Apr 18, 2017

Just noticed https://github.com/ARMmbed/swo

It's not exactly printf() or tr_debug(), but it at least allows SWO output for devices without STDIO_MESSAGES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants