{"id":6113,"date":"2021-05-29T06:24:18","date_gmt":"2021-05-29T06:24:18","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=6113"},"modified":"2023-08-14T10:36:20","modified_gmt":"2023-08-14T05:06:20","slug":"freertos-lecture-32-understanding-arm-semi-hosting-feature","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/","title":{"rendered":"FreeRTOS Lecture 32 &#8211; Understanding ARM Semi-hosting feature"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 35px; padding-bottom: 0px; background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"col-md-1 col-sm-12 col-xs-12 col-lg-1\">\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"col-md-10 col-sm-12 col-xs-12 col-lg-10\">\n<h1 class=\"\" style=\"text-align: center; font-size: 30px; border-width: 0px; line-height: 47px;\"><span style=\"color: #000080;\">Understanding ARM Semi-hosting feature <\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\" style=\"border-width: 0px; margin-top: -25px;\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<p>&nbsp;<\/p>\n<div class=\"bg-hr bg-hr-10 color2-color\" style=\"border-style: solid; border-width: 0px 0px 3px;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"\" style=\"border-width: 0px; font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now, let\u2019s print some data by the task handlers, and let\u2019s use some printf statements in order to print some logs. For that, you have to use ARM semihosting.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><b>ARM semihosting:<\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">ARM semihosting is a feature of the ARM Cortex M platform. As the name itself indicates, this feature takes the help of host software (Figure 1).<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\"> We are using STM32 system workbench IDE with debugger and other features as host software. You have to take the help of the host software to exchange some debug-related information or message.<\/span><\/p>\n<figure id=\"attachment_6116\" aria-describedby=\"caption-attachment-6116\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-6116\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-1-5.png\" alt=\"Figure 1. Overview of semihosting.\" width=\"744\" height=\"371\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5.png 1650w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-300x149.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-768x383.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-1024x510.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-600x299.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-120x60.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-500x249.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-200x100.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-400x199.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-800x399.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5-1200x598.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6116\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Overview of semihosting.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">For example, if you use printf in your embedded software, which is running on the target hardware. Let\u2019s say the target hardware is a Nucleo board. Then there is no need to implement printf library code in your embedded software, which runs on the target. That would consume lots of space. So, the technique here is you can use printf without using the native printf library on your embedded software. But take&nbsp;<\/span><span style=\"font-weight: 400;\">the help of the printf library present in the host or to be specifically present in the host debugging software, which is your eclipse. This technique is called ARM semihosting. <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">We actually use the technique of message transfers from embedded software running on your hardware to the IDE to implement some of the C library functions such as printf, scanf, etc. This is what we call as semihosting. <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">The semihosting is a mechanism that allows target boards to exchange messages from the embedded software to the host computer, which is running a debugger. Remember that this semihosting works only when you put the IDE in debugging mode.<\/span><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">There is a small document, as shown in Figure 2. Please download that. There you will see the project settings you have to do in order to enable the ARM semihosting. There are three important steps:<\/span><\/p>\n<ol class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">You have to send some arguments to the GCC linker.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Do some debug configuration for your application. That means you have to send monitor arm semihosting enable command.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">After that, in the main.c you have to call the initialise_monitor_handles() function. <\/span><\/li>\n<\/ol>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The combination of all the above things will configure the semihosting in the openSTM32 system workbench.<\/span><\/p>\n<figure id=\"attachment_6117\" aria-describedby=\"caption-attachment-6117\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-6117\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-2-5.png\" alt=\"Figure 2. Settings to be made in order to enable the semihosting.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-2-5-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6117\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Settings to be made in order to enable the semihosting.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now let\u2019s do all these settings one by one.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">1. First, let\u2019s set the linker arguments to enable the semihosting feature. For that, just copy the line shown in Figure 3 and go to the eclipse. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now let\u2019s terminate the debugging session by clicking on the option shown in Figure 4. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Then go to the C\/C++ perspective (Figure 5). <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">After that, right-click on the project, go to properties (Figure 6), then go to C\/C++ build, go to settings (Figure 7), click on MCU GCC linker, then go to miscellaneous (Figure 8) and in linker flags tab just paste the copied line, as shown in Figure 9, after that click apply and ok (Figure 10).<\/span><\/p>\n<figure id=\"attachment_6118\" aria-describedby=\"caption-attachment-6118\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-6118\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-3-5.png\" alt=\"Figure 3. Linker settings to enable the semihosting.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-3-5-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6118\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Linker settings to enable the semihosting.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6119\" aria-describedby=\"caption-attachment-6119\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6119\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-4-5.png\" alt=\"Figure 4. Option to terminate the debugging mode.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-4-5-1200x639.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6119\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. Option to terminate the debugging mode.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6120\" aria-describedby=\"caption-attachment-6120\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6120\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-5-5.png\" alt=\"Figure 5. Option for entering into C\/C++ perspective.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-5-5-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6120\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. Option for entering into C\/C++ perspective.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6121\" aria-describedby=\"caption-attachment-6121\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6121\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-6-5.png\" alt=\"Figure 6. Properties of current STM32 project.\" width=\"744\" height=\"419\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5.png 1920w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-300x169.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-768x432.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-1024x576.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-600x338.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-120x68.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-500x281.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-200x113.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-400x225.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-800x450.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-6-5-1200x675.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6121\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. Properties of current STM32 project.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6122\" aria-describedby=\"caption-attachment-6122\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6122\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-7-5.png\" alt=\"Figure 7. C\/ C++ build settings.\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-7-5-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6122\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7. C\/ C++ build settings.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6123\" aria-describedby=\"caption-attachment-6123\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6123\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-8-4.png\" alt=\"Figure 8. Miscellaneous folder of MCU GCC linker.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-8-4-1200x639.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6123\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 8. Miscellaneous folder of MCU GCC linker.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6124\" aria-describedby=\"caption-attachment-6124\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6124\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-9-4.png\" alt=\"Figure 9. Making required linker settings.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4.png 1913w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-9-4-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6124\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 9. Making required linker settings.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6125\" aria-describedby=\"caption-attachment-6125\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6125\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-10-4.png\" alt=\"Figure 10. Applying the changes made.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4.png 1913w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-10-4-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6125\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 10. Applying the changes made.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">2. After that, let\u2019s do the second step, i.e., debug configuration of your application. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">For that, right-click on your project, go to debug as and then go to debug configurations (Figure 11). Select your project, go to startup, just browse here, you will see run commands as shown in Figure 12 there you just write the monitor arm semihosting enable command. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now click apply. After that, click close.<\/span><\/p>\n<figure id=\"attachment_6126\" aria-describedby=\"caption-attachment-6126\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6126\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-11-3.png\" alt=\"Figure 11. Debug configurations of current STM32 project.\" width=\"744\" height=\"399\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-300x161.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-768x411.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-1024x549.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-600x321.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-500x268.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-800x429.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-11-3-1200x643.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6126\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 11. Debug configurations of current STM32 project.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6127\" aria-describedby=\"caption-attachment-6127\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6127\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-12-3.png\" alt=\"Figure 12. Running semihosting enable command in debug configurations.\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-12-3-1200x636.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6127\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 12. Running semihosting enable command in debug configurations.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">3. Now the third step is in the main.c use the code marked in Figure 13. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">First, let\u2019s call the initialise_monitor_handles() function as a very first function, as shown in Figure 14. It need not be the very first function, but it is better to call this before calling any printf statements. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Also, copy the extern of that function, i.e., extern void initialise_monitor_handles() and paste it in the main.c, as shown in Figure 15.<\/span><\/p>\n<figure id=\"attachment_6128\" aria-describedby=\"caption-attachment-6128\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6128\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-13-3.png\" alt=\"Figure 13. Functions to be called in main.c.\" width=\"744\" height=\"397\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-1024x546.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-13-3-1200x640.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6128\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 13. Functions to be called in main.c.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\">int main(void)<br \/>\n{<\/p>\n<p class=\"\">initialise_monitor_handles();<\/p>\n<p class=\"\">\/\/1. Reset the RCC clock configuration to the default reset state.<br \/>\n\/\/HSI ON, PLL OFF, HSE OFF, system clock = 16MHz, cpu_clock = 16MHz<br \/>\nRCC_DeInit();<\/p>\n<figure id=\"attachment_6129\" aria-describedby=\"caption-attachment-6129\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6129\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-14-3.png\" alt=\"Figure 14. Call for initialise_monitor_handles() function.\" width=\"744\" height=\"397\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-768x410.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-1024x546.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-14-3-1200x640.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6129\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 14. Call for initialise_monitor_handles() function.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6130\" aria-describedby=\"caption-attachment-6130\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6130\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-15-3.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-15-3-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6130\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 15. Prototype of initialise_monitor_handles() function.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">After that, you can get rid of syscalls.c, which is added by the OpenSTM32 system workbench. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Just right-click on that, go to the properties (Figure 16), and exclude that from the build (Figure 17) because we don\u2019t need that file. Click apply and then ok.<\/span><\/p>\n<figure id=\"attachment_6131\" aria-describedby=\"caption-attachment-6131\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6131\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-16-3.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-16-3-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6131\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 16. Properties of syscalls.c.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6132\" aria-describedby=\"caption-attachment-6132\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6132\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-17-1.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-17-1-1200x639.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6132\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 17. Excluding syscalls.c from the build.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now let\u2019s try to build the project (Figure 18) and see whether it gives any error or not. <\/span><\/p>\n<figure id=\"attachment_6133\" aria-describedby=\"caption-attachment-6133\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6133\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-18-1.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-18-1-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6133\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 18. Building the project.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">See the logs in Figure 19. The project was built successfully without any errors.<\/span><\/p>\n<figure id=\"attachment_6134\" aria-describedby=\"caption-attachment-6134\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6134\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-19-1.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-19-1-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6134\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 19. Result of compilation.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 35px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><strong><span style=\"text-decoration: underline; color: #000080;\">Summary:<\/span><\/strong><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">To enable the semihosting, you have to just do three things. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The first one is you have to provide linker arguments in order to work with semihosting. Figure 2 shows the linker arguments, which must be supplied to the linker. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The second step is to include the monitor arm semihosting enable command in the debug configurations of your project. That means whenever you debug the project, this command will be executed, which enables the semihosting feature. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">After that, in the main function include the function call and prototype of the initialise_monitor_handles() function.&nbsp;<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">After that, you can use your printf statement. Let\u2019s write \u201cThis is hello world example code \\n\u201d inside the printf function. Since you are using printf, include #include&lt;stdio.h&gt; header file, as shown in Figure 20. It is always better if you include stdint.h.<\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px inset;\"><span style=\"color: #ff99cc;\">#include<\/span> \"stm32f4xx.h\"\r\n<span style=\"color: #ff99cc;\">#include<\/span> \"FreeRTOS.h\"\r\n<span style=\"color: #ff99cc;\">#include<\/span> \"task.h\"\r\n\r\nTaskHandle_t xTaskHandle1=NULL;\r\nTaskHandle_t xTaskHandle2=NULL;\r\n\r\n<span style=\"color: #008000;\">\/\/Task functions prototypes<\/span>\r\n<span style=\"color: #ff99cc;\">void<\/span> vTask1_handler(<span style=\"color: #ff99cc;\">void<\/span> *params);\r\n<span style=\"color: #ff99cc;\">void<\/span> vTask2_handler(<span style=\"color: #ff99cc;\">void<\/span> *params);\r\n\r\n<span style=\"color: #008000;\">\/\/used for semihosting<\/span>\r\nextern void initialise_monitor_handles();\r\n\r\n\r\n<span style=\"color: #ff99cc;\">int<\/span> main(<span style=\"color: #ff99cc;\">void<\/span>)\r\n{\r\n    initialise_monitor_handles();\r\n <span style=\"color: #ff00ff;\">   printf<\/span>(\"This is hello world example code\\n\");\r\n\r\n    <span style=\"color: #008000;\">\/\/1. Reset the RCC clock configuration to the default reset state.<\/span>\r\n<span style=\"color: #008000;\">    \/\/HSI ON, PLL OFF, HSE OFF, system clock = 16MHz, cpu_clock = 16MHz<\/span>\r\n    RCC_DeInit();<\/pre>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6136\" aria-describedby=\"caption-attachment-6136\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6136\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-21.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-21-1200x639.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6136\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 20. Including the header files.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Build the project once again. <\/span><span style=\"font-weight: 400; color: #000000;\">Now the project is compiled successfully without any error. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now in the task function, let\u2019s write printf(\u201cHello-World: From Task-1\\n\u201d), as shown in Figure 21. In task 2 handler also again print the same thing and write \u201cHello-World: From Task-2\\n\u201d.<\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"color: #ff99cc;\">void<\/span> vTask1_handler(<span style=\"color: #ff99cc;\">void<\/span> *params)\r\n{\r\n    <span style=\"color: #ff99cc;\">while<\/span>(1)\r\n    {\r\n        <span style=\"color: #ff00ff;\">printf<\/span>(\"Hello-world: From Task-1\\n\");\r\n    }\r\n}\r\n\r\n<span style=\"color: #ff99cc;\">void<\/span> vTask2_handler(<span style=\"color: #ff99cc;\">void<\/span> *params)\r\n{\r\n  <span style=\"color: #ff99cc;\">  while<\/span>(1)\r\n    {\r\n        <span style=\"color: #ff00ff;\">printf<\/span>(\"Hello-world: From Task-2\\n\");\r\n    }\r\n}<\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\">Use of printf statements in task handlers<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now let\u2019s test this code:<\/span><\/p>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">First, let\u2019s build the project.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Just flash the code (Figure 21 and 22). Now the code is running. But in order to see the logs, you have to get into the debugger mode because that works based on the semihosting technique.<\/span><\/li>\n<\/ul>\n<figure id=\"attachment_6139\" aria-describedby=\"caption-attachment-6139\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6139\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-23.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-23-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6139\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 21. Flashing the code into the hardware board (step 1).<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6142\" aria-describedby=\"caption-attachment-6142\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6142\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-24-2.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"392\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-300x158.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-768x404.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-1024x538.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-600x316.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-120x63.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-500x263.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-200x105.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-400x210.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-800x421.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-24-2-1200x631.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6142\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 22. Flashing the code into the hardware board (step 2).<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">In order to see semihosting in action, you have to be in debugger mode. Your firmware will be exchanging the information with the debugger of the IDE. That\u2019s why you have to first trigger the debugger. To trigger the debugger, first, you have to get into the debugging mode (Figure 23).<\/span><\/li>\n<\/ul>\n<figure id=\"attachment_6143\" aria-describedby=\"caption-attachment-6143\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6143\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-25.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25.png 1913w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-25-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6143\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 23. Entering into the debugging mode.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Figure 24 is showing that the semihosting is enabled. Now let\u2019s hit run and see whether our print statements are printing the messages or not.<\/span><\/p>\n<figure id=\"attachment_6144\" aria-describedby=\"caption-attachment-6144\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6144\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-26.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"394\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-1024x542.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-26-1200x635.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6144\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 24. Debug mode.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Now your project is printing the message \u201cThe hello world example code\u201d, as shown in Figure 25. The execution is actually halted at line 46 (Figure 25) because we have kept the breakpoint there.&nbsp;<\/span><\/li>\n<\/ul>\n<figure id=\"attachment_6145\" aria-describedby=\"caption-attachment-6145\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6145\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-27.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-27-1200x636.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6145\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 25. Result of project execution.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li><span style=\"font-weight: 400; color: #000000;\">Let\u2019s remove all the breakpoints, as shown in Figure 26.<\/span><\/li>\n<\/ul>\n<figure id=\"attachment_6146\" aria-describedby=\"caption-attachment-6146\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6146\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-28.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-28-1200x636.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6146\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 26. Removing the breakpoints.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Now hit resume once again (Figure 27). Now in Figure 28, you can observe that task 1 is running for some time quanta, and after that, task 2 will run for some time.<\/span><\/li>\n<\/ul>\n<figure id=\"attachment_6147\" aria-describedby=\"caption-attachment-6147\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6147\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-29.png\" alt=\"Figure 29. Option to run the code.\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-29-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6147\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 27. Option to run the code<\/span>.<\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6148\" aria-describedby=\"caption-attachment-6148\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6148\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/05\/Figure-30.png\" alt=\"Understanding ARM Semi-hosting feature\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-30-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6148\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 28. Execution of tasks in round-robin fashion.<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The execution of tasks looks very slow because the debugger is involved here. The software has to exchange the information with the debugger, and the debugger is printing those messages, which it got from the board. So, it looks very slow.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\"> In this example, for the demonstration purpose, we used the semihosting technique. This will be helpful when you debug the code. Whenever you debug the code, if you want to take the help of printf to see what\u2019s going on, you can use this technique. For production and all, we will never use this arm semihosting technique.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 27px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><b>FastBit Embedded Brain Academy Courses <\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 17px;\"><span style=\"font-weight: 400; color: #000000;\">click here: <\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"http:\/\/fastbitlab.com\/course1\"><span style=\"font-weight: 400;\">https:\/\/fastbitlab.com\/course1<\/span><\/a><\/span><\/p>\n<div class=\"mceTemp\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Understanding ARM Semi-hosting feature &nbsp; &nbsp; Now, let\u2019s print some data by the task handlers, and let\u2019s use some printf statements in order to print some logs. For that, you have to use ARM semihosting. ARM semihosting: ARM semihosting is a feature of the ARM Cortex M platform. As the name itself indicates, this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6116,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[19],"class_list":["post-6113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-freertos-lectures","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>FreeRTOS Lecture 32 - Understanding ARM Semi-hosting feature<\/title>\n<meta name=\"description\" content=\"FreeRTOS lecture 32 -Understanding ARM Semi-hosting feature. Now, let\u2019s print some data by the task handlers, and let\u2019s use some printf\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FreeRTOS Lecture 32 - Understanding ARM Semi-hosting feature\" \/>\n<meta property=\"og:description\" content=\"FreeRTOS lecture 32 -Understanding ARM Semi-hosting feature. Now, let\u2019s print some data by the task handlers, and let\u2019s use some printf\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-29T06:24:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-14T05:06:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1650\" \/>\n\t<meta property=\"og:image:height\" content=\"822\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"FreeRTOS Lecture 32 &#8211; Understanding ARM Semi-hosting feature\",\"datePublished\":\"2021-05-29T06:24:18+00:00\",\"dateModified\":\"2023-08-14T05:06:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/\"},\"wordCount\":1643,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Figure-1-5.png\",\"keywords\":[\"FreeRTOS Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/\",\"name\":\"FreeRTOS Lecture 32 - Understanding ARM Semi-hosting feature\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Figure-1-5.png\",\"datePublished\":\"2021-05-29T06:24:18+00:00\",\"dateModified\":\"2023-08-14T05:06:20+00:00\",\"description\":\"FreeRTOS lecture 32 -Understanding ARM Semi-hosting feature. Now, let\u2019s print some data by the task handlers, and let\u2019s use some printf\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Figure-1-5.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Figure-1-5.png\",\"width\":1650,\"height\":822,\"caption\":\"Figure 1. Overview of semihosting.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-32-understanding-arm-semi-hosting-feature\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FreeRTOS Lecture 32 &#8211; Understanding ARM Semi-hosting feature\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FreeRTOS Lecture 32 - Understanding ARM Semi-hosting feature","description":"FreeRTOS lecture 32 -Understanding ARM Semi-hosting feature. Now, let\u2019s print some data by the task handlers, and let\u2019s use some printf","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/","og_locale":"en_US","og_type":"article","og_title":"FreeRTOS Lecture 32 - Understanding ARM Semi-hosting feature","og_description":"FreeRTOS lecture 32 -Understanding ARM Semi-hosting feature. Now, let\u2019s print some data by the task handlers, and let\u2019s use some printf","og_url":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2021-05-29T06:24:18+00:00","article_modified_time":"2023-08-14T05:06:20+00:00","og_image":[{"width":1650,"height":822,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"FreeRTOS Lecture 32 &#8211; Understanding ARM Semi-hosting feature","datePublished":"2021-05-29T06:24:18+00:00","dateModified":"2023-08-14T05:06:20+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/"},"wordCount":1643,"commentCount":1,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5.png","keywords":["FreeRTOS Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/","url":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/","name":"FreeRTOS Lecture 32 - Understanding ARM Semi-hosting feature","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5.png","datePublished":"2021-05-29T06:24:18+00:00","dateModified":"2023-08-14T05:06:20+00:00","description":"FreeRTOS lecture 32 -Understanding ARM Semi-hosting feature. Now, let\u2019s print some data by the task handlers, and let\u2019s use some printf","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/05\/Figure-1-5.png","width":1650,"height":822,"caption":"Figure 1. Overview of semihosting."},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-32-understanding-arm-semi-hosting-feature\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FreeRTOS Lecture 32 &#8211; Understanding ARM Semi-hosting feature"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/6113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=6113"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/6113\/revisions"}],"predecessor-version":[{"id":15444,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/6113\/revisions\/15444"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/6116"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=6113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=6113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=6113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}