How can I 'printf' some messages from Cortex-M7 to uart terminal on S32G-VNP-RDB2 board

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

How can I 'printf' some messages from Cortex-M7 to uart terminal on S32G-VNP-RDB2 board

1,281 Views
ZhiXiaoli
Contributor I

Hi nxp community, 

I have two questions.

1.   How can I 'printf' some messages from Cortex-M7 to uart terminal (e.g. uart 1, and uart 0 used for Linux console)?  Can you provide a simple example that has already tested on S32G2-VNP-RDB2 board?

Below is my experiment setup:

Software:  S32 Design Studio IDE v3.5 with packages
S32G2 AUTOSAR 4.4 RTD 4.0.2_P04 D2312
FreeRTOS 10.4.6 UOS 4.0.2 D2307
S32G IPCF 4.10.0 D2405
NXP Linux BSP42
NXP GCC 9.2.0 for Arm 32-bit Bare-Metal (for M7 core)
NXP GCC 11.4.0 (for A53 core)
Board: S32G2-VNP-RDB2
I create an example project from IPCF_FreeRTOS_S32G274A_M7_0, it can communicate with A53.  (this project will be as a starter for our application with IPCF)

Now I want to printf (output) some messages from M7 to a uart terminal, how can I do? 

2.  how to see 'printf' messages on debug console when using a S32 Debug probe? I can debug M7 program by 'step, watch variables, and etc.'  But  nothing happens although I chosen 'Newlib semihosting (-specs=rdimon.specs) in 'Settings-> Target Processor'

 

 

0 Kudos
Reply
1 Reply

1,257 Views
Joey_z
NXP Employee
NXP Employee

hi, ZhiXiaoli

Thank you for contacting us.

You can try to use the demo of Uart in RTD as the following picture.

Joey_z_0-1763721974865.png

Hope this can help you.

BR

Joey

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2229872%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20can%20I%20'printf'%20some%20messages%20from%20Cortex-M7%20to%20uart%20terminal%20%20on%20S32G-VNP-RDB2%20board%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2229872%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20nxp%20community%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20two%20questions.%3C%2FP%3E%3CP%3E1.%26nbsp%3B%20%26nbsp%3BHow%20can%20I%20'printf'%20some%20messages%20from%20Cortex-M7%20to%20uart%20terminal%20(e.g.%20uart%201%2C%20and%20uart%200%20used%20for%20Linux%20console)%3F%26nbsp%3B%20Can%20you%20provide%20a%20simple%20example%20that%20has%20already%20tested%20on%20S32G2-VNP-RDB2%20board%3F%3C%2FP%3E%3CP%3EBelow%20is%20my%20experiment%20setup%3A%3C%2FP%3E%3CP%3ESoftware%3A%26nbsp%3B%20S32%20Design%20Studio%20IDE%20v3.5%20with%20packages%3CBR%20%2F%3ES32G2%20AUTOSAR%204.4%20RTD%204.0.2_P04%20D2312%3CBR%20%2F%3EFreeRTOS%2010.4.6%20UOS%204.0.2%20D2307%3CBR%20%2F%3ES32G%20IPCF%204.10.0%20D2405%3CBR%20%2F%3ENXP%20Linux%20BSP42%3CBR%20%2F%3ENXP%20GCC%209.2.0%20for%20Arm%2032-bit%20Bare-Metal%20(for%20M7%20core)%3CBR%20%2F%3ENXP%20GCC%2011.4.0%20(for%20A53%20core)%3CBR%20%2F%3EBoard%3A%20S32G2-VNP-RDB2%3CBR%20%2F%3EI%20create%20an%20example%20project%20from%20IPCF_FreeRTOS_S32G274A_M7_0%2C%20it%20can%20communicate%20with%20A53.%26nbsp%3B%20(this%20project%20will%20be%20as%20a%20starter%20for%20our%20application%20with%20IPCF)%3C%2FP%3E%3CP%3ENow%20I%20want%20to%20printf%20(output)%20some%20messages%20from%20M7%20to%20a%20uart%20terminal%2C%20how%20can%20I%20do%3F%26nbsp%3B%3C%2FP%3E%3CP%3E2.%26nbsp%3B%20how%20to%20see%20'printf'%20messages%20on%20debug%20console%20when%20using%20a%20S32%20Debug%20probe%3F%20I%20can%20debug%20M7%20program%20by%20'step%2C%20watch%20variables%2C%20and%20etc.'%26nbsp%3B%20But%26nbsp%3B%20nothing%20happens%20although%20I%20chosen%20'Newlib%20semihosting%20(-specs%3Drdimon.specs)%20in%20'Settings-%26gt%3B%20Target%20Processor'%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2232761%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20can%20I%20'printf'%20some%20messages%20from%20Cortex-M7%20to%20uart%20terminal%20%20on%20S32G-VNP-RDB2%20board%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2232761%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%2C%26nbsp%3B%3CSPAN%3EZhiXiaoli%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20contacting%20us.%3C%2FP%3E%0A%3CP%3EYou%20can%20try%20to%20use%20the%20demo%20of%20Uart%20in%20RTD%20as%20the%20following%20picture.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Joey_z_0-1763721974865.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Joey_z_0-1763721974865.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F366791iCF42D0D3D7B4B63F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Joey_z_0-1763721974865.png%22%20alt%3D%22Joey_z_0-1763721974865.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHope%20this%20can%20help%20you.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%3C%2FLINGO-BODY%3E