Home | Projects | Notes > ARM Cortex-M3/M4 Processor > Semihosting

Semihosting

 

Semihosting

 

locating-newlib-and-newlib-nano

 

 

Semihosting Procedure

  1. Connect your board to the host machine.

  2. Run OpenOCD with the board configuration file

    Full path to the board configuration file: \usr\share\openocd\scripts\board\stm32f4discovery.cfg

    Leave this terminal busy, and launch another terminal. Go to project directory and do Step 3.

  3. Connect to the OpenOCD via GDB Client or Telnet Client

    Using GDB Client:

    Keyword monitor allows you to issue OpenOCD command on GDB client. (This keyword is not necessary if you are issuing OpenOCD command on Telnet.)

    Using Telnet

    You are not bypassing GDB Client, so monitor keyword is not necessary. Just directly type in commands.

    c.f. To terminate Telnet session, Ctrl+] close.

  4. Issue commands over GDB Client or Telnet to OpenOCD to download and debug the code.

  5. Enable the semihosting feature in the OpenOCD

     

 

References

Nayak, K. (2022). Embedded Systems Programming on ARM Cortex-M3/M4 Processor [Video file]. Retrieved from https://www.udemy.com/course/embedded-system-programming-on-arm-cortex-m3m4/