console on CW10.x, S08

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

console on CW10.x, S08

2,240 次查看
grzegorzK
Contributor III

Dear

 

I am trying use MC9S08DZ60CLH with CW10.x and Ful Chip simulator.

I would like to use printf() methods in order to print string on console, I have added termio.c to project, but it hangs on TERMIO_Init().

any hints?

 

Regards

/Greg

标签 (1)
0 项奖励
回复
6 回复数

1,970 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Grzegorz Konopko,

I ever made printf sample to SCI under QG8. please refer it to your project. see attached

CW_QG8_Printf_on_Hardware_example

Uart1

4800 bauds

==================================

this answer is for you. if it helps, please click on "Correct Answer" button. thanks!

Best Regards,

ZhangJun

0 项奖励
回复

1,970 次查看
grzegorzK
Contributor III

Hi

I have compiled your project, use debug target: "CW_QG8_Printf_on_Hardware_example_CW10_6_FLASH_PnE Full Chip Simulator" but do not see any chars on terminal. Mayby doind something wrong, I do not know. May you show me screenshot of your results?

I need console under simulator (Full Chip Simulator), not real hardware, do we understand each other?

Regards

/Greg

0 项奖励
回复

1,970 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Grzegorz Konopko,

I understand your question. however CW10.x for HCS08 doesn't have feature to print to console, it is not possible since there is NO "standard output" to console  in CW10.x for HCS08.

so User has to implement their own "pseudo" prinf() function, i.e. to format the output in memory and then print out through SCI.

==================================

this answer is for you. if it helps, please click on "Correct Answer" button. thanks!

Best Regards,

ZhangJun

0 项奖励
回复

1,970 次查看
grzegorzK
Contributor III

Hi

In fact I do not need printf(). I just need send single char e.g.:   TERMIO_PutChar('a');

See my attachment based on your example, nothing is printed out

Regards

/Greg

Debug - CW_QG8_Printf_on_Hardware_example_CW10_6Sourcesmain.c - CodeWarrior Development Studio.jpg

0 项奖励
回复

1,970 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

hi Greg,

I just tested TERMIO_PutChar('A') base on this sample on my side it works. the baud rate is 4800.  please make sure if you SCI is normal.

screenshot.JPG.jpg

==================================

this answer is for you. if it helps, please click on "Correct Answer" button. thanks!

Best Regards,

ZhangJun

0 项奖励
回复

1,970 次查看
grzegorzK
Contributor III

any hints?

0 项奖励
回复