I'm coming to the same problem and found 2 solutions for semihosting with MQX.
1. Use iodebug driver that coming with full version of MQX (i tried with 4.2).
The FSL_MQX_getting_started document showed possibility for use semihost with MQX (chapter 5)
It refer to the document Freescale MQX™ RTOS I/O User's Guide (MQXIOUG) about description.
MQX_IO_User_Guide at chapter 26 describe usage example for iodebug driver.
The MQX 4.2 have example project Freescale_MQX_4_2\mqx\examples\io that could be run with K64F.
What is need to be changed it's a installing driver for semihost during main_task run like a
_io_debug_install("iodebug:", &_bsp_iodebug_init);
with _bsp_iodebug_init that define semihost option.
And BSP must be compiled with options
#define BSP_DEFAULT_IO_CHANNEL "iodebug:"
#define BSPCFG_ENABLE_IODEBUG 1
Also ttya/ttyb output could be removed if not needed.
With it semihost worked.
I guess iodebug could be ported more or less easy to the another version of MQX (for example MQX from KSDK that don't have io, but use nio instead, so iodebug need to be ported with sybsystem)
2. Use direct semihost stdio. The example below is for KSDK 1.3.
The list of changes are next:
a) Do a declaration of init routine:
extern void initialise_monitor_handles(void);
b) In the beginning of the main_task call
initialise_monitor_handles();
c) Cross ARM C Linker/Libraries
Remove nosys library
d) Cross ARM C Linker/Miscellaneous
Remove from 'other objects' ${ProjDirPath}/../../../../../../rtos/mqx/lib/frdmk64f.kds/debug/mqx_stdlib/lib_mqx_stdlib.a
Remove option Cross reference (-cref)
Other linker flags:
Add --specs=rdimon.specs
Remov -Xlinker -z -Xlinker muldefs --specs=nano.specs
Increase stack size.
With above changes I am able to get semihost even without commenting _read and _write routines from the fsl_debug_console.c