where do i view the printf results of example programs ??

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

where do i view the printf results of example programs ??

ソリューションへジャンプ
1,549件の閲覧回数
Champaka
Contributor III

Hi,

 

       I am working on mpc5125 board and code warrior v9.2. when i run the example program say hello world program, the program compiles, gets downloaded to the board and executes. But i dont see any output window being created on my monitor screen to view the result of printf statement. where do i view these results ??

ラベル(1)
1 解決策
897件の閲覧回数
Champaka
Contributor III

Hi Lander,

          i had actually forgotten to read the tutorial document that comes along with the board. To view the printf statement results,

  • connect your board's usb port to your pc
  • determine the COM port number for the connection, right click on the My Computer icon and select Manage. Click Device Manager. Find and expand ports (COM and LPT).
  • open a hyperterminal program and choose the following settings

          Bitsper Second: 115200, Data bits: 8, Parity:None, Stop bit: 1, Flow control: None.

  • debug your project using J-TAG

After you run the program printf statement results can be seen in the hyper terminal !!

元の投稿で解決策を見る

14 返答(返信)
897件の閲覧回数
lander
Contributor IV

I'm having the same issue with the twr-k60d100m.  I've been searching online for others with similar issues and it is hard to find the solution.  Apparently in 2011, CodeWarrior console did not support printing to the console in MQX, not sure if it still holds today. 

0 件の賞賛
898件の閲覧回数
Champaka
Contributor III

Hi Lander,

          i had actually forgotten to read the tutorial document that comes along with the board. To view the printf statement results,

  • connect your board's usb port to your pc
  • determine the COM port number for the connection, right click on the My Computer icon and select Manage. Click Device Manager. Find and expand ports (COM and LPT).
  • open a hyperterminal program and choose the following settings

          Bitsper Second: 115200, Data bits: 8, Parity:None, Stop bit: 1, Flow control: None.

  • debug your project using J-TAG

After you run the program printf statement results can be seen in the hyper terminal !!

897件の閲覧回数
lander
Contributor IV

I am able to debug the program but the trouble I am facing still is the printf()'s in the terminal.  When I go to my Device Manager, the only device that shows up is named, LibUSN-Win32 Devices and inside is Open Source BDM - Debug Port, and there are no options to change the bits per second, data bits...etc inside that device properties.  What am I doing wrong?

Thank you,

Lander

0 件の賞賛
897件の閲覧回数
Champaka
Contributor III

Hi,

      Once you connect your board's usb port to your pc, the com port should get detected under device manager - ports(COM and LPT). If not there should be some driver issues which can be sorted out by installing the device driver

Freescale_CDC.inf. (this driver file can be downloaded from the net).

And the settings for bits per second, data bits...etc should be made in the microsoft's hyperterminal program. You cannot do it in the device manager.

The printf() results will be seen in the hyper terminal window after you run your program.

0 件の賞賛
897件の閲覧回数
lander
Contributor IV

I tried looking for the Freescale_CDC.inf on the net and I was not successful.  In my research for looking for the Freescale_CDC.inf, I came across some discussions on the USB CDC is not compatible yet with Windows 8.  I am running a Windows 8 - 64 bit machine, do you have any advice?  If Windows 8 is not compatible, do you know when they might me?

You have been of great help, thank you a lot!

Lander

0 件の賞賛
897件の閲覧回数
Champaka
Contributor III

The procedure what i have mentioned in the previous discussions has worked fine for my board ( TWRMPC5125).

Am not very sure about windows 8 - 64 bit machine.

If you need further clarifications you can always raise a technical request.

0 件の賞賛
897件の閲覧回数
Freshman
Contributor III

hi

champaka

  I am working on mpc8313 board and code warrior v8.8. when I run the example program say hello world program, the program compiles, gets downloaded to the board and executes. But I  saw something incorrect output  on my hyper-terminal. what’s wrong??

I have made the Serial port setting both on the terminal and the Freescale CW the same :

1[7GUB07RR({)EQX3~]DR.jpg

the output on the terminal:

23`NF[KONT]34%4PIDMO)}A.jpg

the programe is just a helloworld:

printf("Hello World !\r\n");

can you what's wrong ?

thank you

bin

0 件の賞賛
897件の閲覧回数
CrasyCat
Specialist III

Hello

Did you check the file 8313_RDB_Readme.txt located in the Documentation folder?

The settings required for the serial port on your Host PC are described in this file..

CrasyCat

0 件の賞賛
897件の閲覧回数
Freshman
Contributor III

hello

i have just done as the 8313_RDB_Readme.txt:

Data rate :115200bps

Number of Data bits :8

Parity : None

Number of Stop bits :1

Flow Control : Hardware / None

bin 

0 件の賞賛
897件の閲覧回数
CrasyCat
Specialist III

Hello

That is strange.

I created a project for 8313 RDB board and the connection settings are as follows:

    Baud Rate: 57600

    Data Bits: 8

    Parity: None

    Stop Bits: 1

    Flow Control: None


I am running CodeWarrior for Power Architecture V8.8.5.


Can you try with this configuration?


CrasyCat

897件の閲覧回数
Freshman
Contributor III

Pefect ! it is so strange ! thank you , CrasyCat ! The output is right !

bin

0 件の賞賛
897件の閲覧回数
Champaka
Contributor III

When u get this, just press the reset button on your board and do it all over again.. ( close ur hyper terminal window n open a new connection, debug ur program using J- Tag once again )

0 件の賞賛
897件の閲覧回数
lander
Contributor IV

Rookie mistake.  I got it now!

0 件の賞賛
897件の閲覧回数
Freshman
Contributor III

hi

i have just tried it again and again , but i still just get some messy code .

bin

0 件の賞賛