How to turn semi-hosting off in debugger configuration?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to turn semi-hosting off in debugger configuration?

513 Views
joseph_jean-jac
Contributor III

Hi,

For my program, I am printing out my output via UART in TeraTerm. However, I am still getting a semi-host hard fault. I was told I need to turn semi-hosting off in the debugger configuration. 

How would I do that?

Thanks! 

0 Kudos
6 Replies

226 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi Joseph,

You can try switching from Semihost to UART as follows.

pastedImage_1.png

For further information you can check the MCUXpresso IDE and Semihosting document.

I hope you find this helpful.


Have a great day,
Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

226 Views
joseph_jean-jac
Contributor III

Thanks Felipe, I already did that before this issue came up. I was already printing my output via UART. That is why it's strange I'm still getting this semi-host hard fault handler. I thought it might be something else in the settings.

I looked at FreeRTOS website for dealing with semi host hard fault handlers and it seems the resolution to this issue is kinda open field unfortunately. Extremely frustrating to say the least. 

0 Kudos

226 Views
BlackNight
NXP Employee
NXP Employee

Select one of the 'none' or 'nohost' library variants:

pastedImage_1.png

I hope this helps,

Erich

0 Kudos

226 Views
joseph_jean-jac
Contributor III

Hi Erich,

I tried the above and unfortunately it didn't work. Interestingly enough, I could only select NewlibNano(nohost). If I selected NewlibNano(none), it resulted in a compilation error. Also I was reading in another thread on this website that Redlib is only for C projects and I'm using C++. 

I looked into the build settings for debug and release to make sure either Newlibnano(auto) was selected or Newlibnano(nohost), I will keep digging around. Thanks for the help so far.  

0 Kudos

226 Views
BlackNight
NXP Employee
NXP Employee

With 'none' you cannot use any host functions (file open/etc) because they are not present. With 'nohost' these functions are provided as empty dummy functions. And yes, if you use C++ you should use newlib instead. But depends what you are using from C++.

0 Kudos

226 Views
joseph_jean-jac
Contributor III

I am using classes, hence why I am using C++ unless I missed understood your question.

So I decided to dig further with the debugger inside xPortStartScheduler() and I noticed that the semi-host hard fault occurs exactly when I try to step into the following line: prvProcessReceivedCommands() at line 533 in timers.c file. I'm not sure if this information further confirms I am still not turning off semi-host properly in the debugger configuration or if something else is at play now.

0 Kudos