器件名称: AN1202-FreeRTOS Kernel Awareness
功能描述: an1602_semihosting_in_truestudio-how-to-do-semihosting-in-truestudio-stmicroelectronics
文件大小: 603.33KB 共7页
简 介:the best FREE tools for ARM development
Atollic TrueSTUDIO C/C++ IDE
Semihosting in Atollic TrueSTUDIO
Table of content
Before you start… Linking semihosting instrumented syscalls Initialize the monitor handles Enable semihosting in debug configuration Setup terminal and test of semihosting
1
Before you start…
How do I enable semihosting communication in Atollic TrueSTUDIO? Semihosting requires some instrumentation in order to output your printf to a PC telnet terminal. Semihosting must be enabled in the J-Link GDB-server What are the limitations using semihosting? You need a SEGGER J-Link. Semihosting is not supported by ST-Link GDBserver Cortex-M target uses breakpoints (BKPT instruction) to pause target and print messages to terminal. ARM7/ARM9 instead uses software interrupts or supervisor calls (SWI/SVC instructions). Application or interrupt code will NOT run while semihosting transfers are active. You risk losing interrupts. Timing penalties to application execution due to breakpoint/interrupt and due to instrumentation
2
Linking semihosting instrumented syscalls
1. Open the project properties tool settings, go to: C/C++ Linker Miscellaneous node and add: -specs=rdimon.specs Code will now link against semihosting instrumented syscalls 2. Remove any syscalls.c that may be part of the project since such implementation would override the linked syscalls
3
Initialize the monitor handles
Initialize the semihosting monitor handles before any calls t……