Not able to print in the teraterm using the T2081 processor

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

Not able to print in the teraterm using the T2081 processor

285 Views
Vimalprasad
Contributor I

I'm working on the T2081 processor in Code warrior 10.5.1 version. I have created the CodeWarrior bareboard Project. here, I'm using the printf statement with proper library(stdio.h) but it is not printing in the  teraterm. 

In my code I have initialized the uart and if I write the data in that register, the data is printing in teraterm. but the printf is not working in teraterm.

Can you tell me the configuration or mapping have to do in the code warrior tool for the T2081 processor?

0 Kudos
Reply
7 Replies

238 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please create a default bareboard project in CodeWarrior IDE from File->New->CodeWarrior Bareboard project wizards, in "Debug Target Settings" panel, please select "Download" Launch configuration.

Then modify "DDR Controller Setup" section in CodeWarrior initialization file t2081\t2081-core00\CFG\T2081QDS_init_core.tcl according to your custom board.

Then use CodeWarrior to download the project to the target board and run it.

If still no output on the UART port of your custom board, please refer to the following procedure to redirect output to a debugger console instead of UART to check whether there is output in CodeWarrior debugger console.

 

#-------------------------------------------------------------------------------------
CodeWarrior Debugger Console I/O
#-------------------------------------------------------------------------------------
 
Every project will print "Welcome to CodeWarrior from Core x - Thread y!" out of the common 
serial port (DUART1). To view the output, connect a null-modem serial cable from 
the serial port to your computer. Open a terminal program and set it up to match 
these settings:
 
Baud Rate: 115200
Data Bits: 8
Parity: None
Stop Bits: 1
Flow Control: None
 
NOTES:
 
* To be able to debug into the UART library you need to do the following steps:
1. Create a stationary project using the UART option.
2. Build the project
3. Right click on the elf file and select properties.
4. On the "File Mappings" tab see the unmapped files, select them, and click the "Add" button.
5. Browse the local file system path according to the UART source files. Default located in
<CWInstallDir>\PA\PA_Support\Serial\T2081QDS_aeabi_32bit_serial\Source
(or T2081QDS_aeabi_64bit_serial, depending on your type of project)
Now you can debug into the UART source files.
 
* The UART libraries are compiled with a specific CCSRBAR address. For a different
value of the CCSRBAR you need to rebuild the UART library:
1. From your CW install directory, import the 
<CWInstallDir>\PA\PA_Support\Serial\T2081QDS_aeabi_32bit_serial (or T2081QDS_aeabi_64bit_serial) project
2. Switch to the correspondent Build Target (eg DUARTA_UC_32bit).
Open duart_config.h file and change the value of the "MMR_BASE" accordingly
3. Re-build the project (and copy the output library in you project) 
 
* The stationery projects use UART1 output by default. If you need to use UART2, please
check the corresponding UART library in the build target and uncheck the default one
(both UART1_T2081QDS.aeabi.UC.[32|64]bit.a and UART2_T2081QDS.aeabi.UC.[32|64]bit.a are included in the
project's Lib folder).
Also please make sure you have the correct library listed in the "Other objects" panel in the project's
Properties > C/C++ Build > Settings > Power AEABI e6500 Linker > Miscellaneous.
 
* If you want to redirect output to a debugger console instead of UART driver, 
please follow above instruction to remove UART1_T2081QDS library from the project and instead use the libconsole.a
library from the project Lib Folder. Please make sure you have the correct library listed in the "Other objects" panel in the project's
Properties > C/C++ Build > Settings > Power Linux Linker > Miscellaneous (replace the UART library with "-lconsole")
Also please make sure you "Activate Support for System Services" in the "System Call Services" sub-tab
from the "Debugger" tab in the corresponding debug launch configuration. 
0 Kudos
Reply

219 Views
Vimalprasad
Contributor I

Hi @yipingwang thanks for your reply,

By using the printf statement in the Codewarrior , I'm getting the junk data in the teraterm. I have checked the baud rate also then also the printf statement is not coming properly in the teraterm. 

Can you please me to do any other configuration to print the statement properly without the junk data?

-----------------

And also I have another doubt. I have downloaded  QorIQ_SDK-V2.0-20160527-yocto.iso and QorIQ_Linux_SDK_v2.0-1703.tar.bz2 from the Linux_SDK_for_QorIQ_Processors . I have installed this files in my system by following the documentation QorIQ-SDK-2.0-1703. For setup the machine I have to give the command to select one which is supported for T2081 processor.  To  set the require package we have select the machine and refer this link Setup_the_environment_for_processor .

I can't find which type of machine have to select for my T2081 processor.Can you please tell which machine need to select?

@yipingwang  can you please give the solution for the two problems at the earliest.

 

0 Kudos
Reply

208 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the previous procedure to redirect output to a debugger console instead of UART to check whether there is normal output in CodeWarrior debugger console.

If yes, it means there is problem with your the UART on your custom board.

You could select T2080 in QorIQ SDK 2.0 build environment.

 

0 Kudos
Reply

84 Views
Vimalprasad
Contributor I

If we are writing data through the UART register in the code, we are getting the data correctly in  teraterm. but if we are using the print statement in the code, we are getting the junk prints in teraterm.

Con you tell me the configurations to get correct prints from the teraterm using the printf statement?

0 Kudos
Reply

55 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please try whether you could output printf in CodeWarrior debugger console successfully. If no, please check DDR configuration issue.

please follow above instruction to remove UART1_T2081QDS library from the project and instead use the libconsole.a
library from the project Lib Folder. Please make sure you have the correct library listed in the "Other objects" panel in the project's
Properties > C/C++ Build > Settings > Power Linux Linker > Miscellaneous (replace the UART library with "-lconsole")
Also please make sure you "Activate Support for System Services" in the "System Call Services" sub-tab
from the "Debugger" tab in the corresponding debug launch configuration. 
0 Kudos
Reply

52 Views
Vimalprasad
Contributor I

In the debugger console the printf is working properly, but in the teraterm UART printf is coming like a junk prints. can you please give the solution to make work the printf statement in UART Terminal?

0 Kudos
Reply

7 Views
yipingwang
NXP TechSupport
NXP TechSupport

I have verified CodeWarrior sample program on T2080RDB, there is no problem with printf.

Please make sure that you are using CodeWarrior sample project, please create the project with the following procedure.

Please create a default bareboard project in CodeWarrior IDE from File->New->CodeWarrior Bareboard project wizards, in "Debug Target Settings" panel, please select "Download" Launch configuration.

Then modify "DDR Controller Setup" section in CodeWarrior initialization file t2081\t2081-core00\CFG\T2081QDS_init_core.tcl according to your custom board.

Then use CodeWarrior to download the project to the target board and run it.

If your problem persists, please send your CodeWarrior project to me to do more investigation.

0 Kudos
Reply