printf() problem on ADuCM4050 COG eval board with linker file mode=2

HI 

I am facing a problem with printf() statements using the ADuCM4050 COG eval board with linker file mode=2 using the IAR tools. Here is the situation:

I am using IAR tools version 8.32.3.

I have installed packs: AnalogDevices.ADuCM4x50_DFP.3.2.0.pack, ARM.CMSIS.5.2.0.pack, AnalogDevices.EV-COG-AD4050LZ_BSP.3.1.0.pack,

I am using the button_press as an example by copying the project from the 4050 COG board pack examples.

I modified the linker .icf file with the line:

define symbol USER_SRAM_MODE = 2;

I enabled the symbol ADI_DISABLE_INSTRUCTION_SRAM  in the startup_ADuCM4050.s file.

I inserted a printf("hello\n"); statement in the main() function.

Now when I run the project I get an error message in the debug log when the printf statements are executed saying "invalid semihosting buffer size: ..."

Please see log below:

I did not see this problem until I modified the linker .icf  and startup files.

Tue May 21, 2019 16:54:47: IAR Embedded Workbench 8.32.3 (C:\Program Files (x86)\IAR Systems\
Embedded Workbench 8.32\arm\bin\armproc.dll)
Tue May 21, 2019 16:54:47: Loaded macro file:
C:/Users/hwaldman/IAR-CMSIS-Packs/AnalogDevices/ADuCM4x50_DFP/3.2.0/\ARM\config\flashloader\
AnalogDevices\FlashADuCM4050.mac
Tue May 21, 2019 16:54:47: Loading the CMSIS-DAP driver
Tue May 21, 2019 16:54:48: Probe: CMSIS-DAP probe SW module ver 1.17
Tue May 21, 2019 16:54:48: Probe: Connecting to DAPLink
CMSIS-DAP:0603000041114e450024300ac207002992d1000097969900 firmware v.1.0
Tue May 21, 2019 16:54:48: Emulation layer version 4.46
Tue May 21, 2019 16:54:48: Notification to init-after-power-up hookup.
Tue May 21, 2019 16:54:48: Notification to core-connect hookup.
Tue May 21, 2019 16:54:48: Connected DAP v2 on SWD. Detected IDCODE=0x6ba02477.
Tue May 21, 2019 16:54:48: Connecting to TAP#0 DAP AHB-AP-CM port 0 (IDR=0x24770011).
Tue May 21, 2019 16:54:48: Recognized CPUID=0x410fc241 Cortex-M4 r0p1 arch ARMv7-M
Tue May 21, 2019 16:54:48: Debug resources: 6 instruction comparators, 4 data watchpoints.
Tue May 21, 2019 16:54:48: MultiCore: Asynchronous core execution FORCED.
Tue May 21, 2019 16:54:48: MultiCore: Synchronous core execution DISABLED.
Tue May 21, 2019 16:54:48: LowLevelReset(hardware, delay 200)
Tue May 21, 2019 16:54:49: -I- execUserFlashInit!
Tue May 21, 2019 16:54:49: Loaded debugee:
C:/Users/hwaldman/IAR-CMSIS-Packs/AnalogDevices/ADuCM4x50_DFP/3.2.0/\ARM\config\flashloader\
AnalogDevices\FlashADuCM4050.out
Tue May 21, 2019 16:54:49: Target reset
Tue May 21, 2019 16:54:51: Unloaded macro file:
C:/Users/hwaldman/IAR-CMSIS-Packs/AnalogDevices/ADuCM4x50_DFP/3.2.0/\ARM\config\flashloader\
AnalogDevices\FlashADuCM4050.mac
Tue May 21, 2019 16:54:51: Downloaded C:\Analog Devices\freertos\FreeRTOSv10.0.0\FreeRTOS\Demo\
CORTEX_M4_ADuCM4x50_IAR\iar832\button_press\EV-COG-AD4050LZ\iar\Debug\Exe\
button_press.out to flash memory.
Tue May 21, 2019 16:54:51: 14760 bytes downloaded into FLASH (4.11 Kbytes/sec)
Tue May 21, 2019 16:54:52: Loaded debugee: C:\Analog Devices\freertos\FreeRTOSv10.0.0\FreeRTOS\
Demo\CORTEX_M4_ADuCM4x50_IAR\iar832\button_press\EV-COG-AD4050LZ\iar\Debug\Exe\
button_press.out
Tue May 21, 2019 16:54:52: LowLevelReset(software, delay 200)
Tue May 21, 2019 16:54:52: LowLevelReset(hardware, delay 200)
Tue May 21, 2019 16:54:52: 14760 bytes verified (23.90 Kbytes/sec)
Tue May 21, 2019 16:54:52: Download completed and verification successful.
Tue May 21, 2019 16:54:52: LowLevelReset(software, delay 200)
Tue May 21, 2019 16:54:53: Target reset
Tue May 21, 2019 16:54:53: INFO: Configuring trace using 'SWO,ETB' setting ...
Tue May 21, 2019 16:54:53: INFO: SWO trace mode is not supported by the probe (use I-jet/I-jet-Trace
probe) - trace is disabled.
Tue May 21, 2019 16:54:53: MultiCore: Synchronous core execution DISABLED.
Tue May 21, 2019 16:55:07: Invalid semihosting buffersize: 0, semihosting call aborted
Tue May 21, 2019 16:55:07: Invalid semihosting buffersize: 1085222564, semihosting call aborted
Tue May 21, 2019 16:55:08: Invalid semihosting buffersize: 1085222564, semihosting call aborted
Tue May 21, 2019 16:55:08: Invalid semihosting buffersize: 1085222564, semihosting call aborted
Tue May 21, 2019 16:55:08: Invalid semihosting buffersize: 1085222564, semihosting call aborted
Tue May 21, 2019 16:55:08: Invalid semihosting buffersize: 1085222564, semihosting call aborted