Example S32K312 Printf Semihosting DS3.5 RTD300

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example S32K312 Printf Semihosting DS3.5 RTD300

Example S32K312 Printf Semihosting DS3.5 RTD300

*******************************************************************************

 The purpose of this demo application is to present a usage of the
Printf Semihosting for the S32K3xx MCU.

 ------------------------------------------------------------------------------
* Test HW: S32K3X2EVB-Q172
* MCU: S32K312
* Compiler: S32DS3.5
* SDK release: RTD 3.0.0
* Debugger: PE micro
* Target: internal_FLASH
********************************************************************************

Create New project :--

Dinesh_Guleria_0-1707031699387.png



Select Semi hosting library in project Properties :--

Dinesh_Guleria_1-1707031800366.png



In Debugger setting :---

Dinesh_Guleria_2-1707031851198.png



Include file :--
#include <stdio.h>

Output :--

Dinesh_Guleria_3-1707031893795.png

 

 

Attachments
Comments

Hi @Dinesh_Guleria ,

 

Thanks for the information. It works but only with debugger.

I cannot run the code without debugger with given settings.

It runs without debugger when I select "libraries support" as non semihosting options like  newlib or newlib nano.

 

What could you suggest?

 

%3CLINGO-SUB%20id%3D%22lingo-sub-1801354%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20S32K312%20Printf%20Semihosting%20DS3.5%20RTD300%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1801354%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CP%3E%3CSPAN%3E*******************************************************************************%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BThe%20purpose%20of%20this%20demo%20application%20is%20to%20present%20a%20usage%20of%20the%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EPrintf%20Semihosting%20for%20the%20S32K3xx%20MCU.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B------------------------------------------------------------------------------%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Test%20HW%3A%20S32K3X2EVB-Q172%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20MCU%3A%20S32K312%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Compiler%3A%20S32DS3.5%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20SDK%20release%3A%20RTD%203.0.0%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Debugger%3A%20PE%20micro%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Target%3A%20internal_FLASH%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E********************************************************************************%3CBR%20%2F%3E%3CBR%20%2F%3ECreate%20New%20project%20%3A--%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1707031699387.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1707031699387.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F261809i72589C91DB4D64EF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1707031699387.png%22%20alt%3D%22Dinesh_Guleria_0-1707031699387.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3ESelect%20Semi%20hosting%20library%20in%20project%20Properties%20%3A--%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_1-1707031800366.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_1-1707031800366.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F261810i89B91AD4E1031B32%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_1-1707031800366.png%22%20alt%3D%22Dinesh_Guleria_1-1707031800366.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20Debugger%20setting%20%3A---%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_2-1707031851198.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_2-1707031851198.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F261811iB9954AA9EC90A755%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_2-1707031851198.png%22%20alt%3D%22Dinesh_Guleria_2-1707031851198.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3EInclude%20file%20%3A--%3CBR%20%2F%3E%23include%20%3CSTDIO.H%3E%3CBR%20%2F%3E%3CBR%20%2F%3EOutput%20%3A--%3C%2FSTDIO.H%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_3-1707031893795.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_3-1707031893795.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F261812iD8428DC5AE542B35%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_3-1707031893795.png%22%20alt%3D%22Dinesh_Guleria_3-1707031893795.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1911372%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20S32K312%20Printf%20Semihosting%20DS3.5%20RTD300%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1911372%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F190759%22%20target%3D%22_blank%22%3E%40Dinesh_Guleria%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20for%20the%20information.%20It%20works%20but%20only%20with%20debugger.%3C%2FP%3E%3CP%3EI%20cannot%20run%20the%20code%20without%20debugger%20with%20given%20settings.%3C%2FP%3E%3CP%3EIt%20runs%20without%20debugger%20when%20I%20select%20%22libraries%20support%22%20as%20non%20semihosting%20options%20like%26nbsp%3B%20newlib%20or%20newlib%20nano.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EWhat%20could%20you%20suggest%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎02-04-2024 12:32 AM
Updated by: