Hey Google: Find ‘Error from StubMonSemihost: “monitor” command not supported by this target.’

Something what I say quite often is: “Google is your friend”. It means that the answer to many questions can be found with an internet search engine. And I have to admit that I have to ‘google’ my own articles to find solutions for problems I feel I have seen in the past too :-).

But for the one problem below I did not find anything: not on my own blog, and not anywhere else in the internet:

Exception

Exception

So let’s publish an article so I can find it later again. And maybe this one is helpful for everyone else running into the same problem?

The problem happened with the NXP MCUXpresso IDE V11.2.0 which has been used in an exam and I passed an exam project for the LPC845-BRK board to the students. It worked well, except that two students reported a problem: debugging was not possible using the onboard LinkServer debug probe. It showed the following exception box:

Exception

Exception

Error from StubMonSemihost: -interpreter-exec console "mon semihost enable": msg=""monitor" command not supported by this target."
Error from StubMonSemihost: -interpreter-exec console "mon semihost enable": msg=""monitor" command not supported by this target."
at com.nxp.mcuxpresso.core.debug.support.linkserver.commands.MIStubCommandBase.getResult(MIStubCommandBase.java:114)
at com.nxp.mcuxpresso.core.debug.support.linkserver.commands.MIStubCommandWrapper.getResult(MIStubCommandWrapper.java:98)
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:975)
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:822)

The good thing with that IDE is that it can automatically detect the debug probe and create the Eclipse launch configuration for it. The bad thing is that obviously this can fail. In this case the launch configuration created was incomplete and missing information in the ‘Startup’ tab, marked below:

missing commands in startup

missing commands in startup

The initialization commands should be:

set non-stop on
set pagination off
set mi-async
set remotetimeout 60000
##target_extended_remote##
set mem inaccessible-by-default ${mem.access}
mon ondisconnect ${ondisconnect}
set arm force-mode thumb
${load}

The run command should be:

${run}

With this, everything works fine:

correct launch configuration

correct launch configuration

Why this can happen is unclear to me, and it does not happen frequently. Still, it can happen.

But from now on, your internet search engine can hopefully find this article and provide at least a workaround for you.

Happy debugging:-)

PS: “Hey Google, please find me!”

3 thoughts on “Hey Google: Find ‘Error from StubMonSemihost: “monitor” command not supported by this target.’

  1. Thanx – while I haven’t experienced the problem I do appreciate you being proactive and putting up your solution so that it can be found by other people.

    Like

    • It does not happen frequently I believe, but if it happens i think it is hard to find the cause of the problem. It took me a while to identify it, so hope hopefully next time I can find it faster if I do not remember it any more. Dito for everyone else 🙂

      Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.