Does MC9S08RN60 support mktime?

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

Does MC9S08RN60 support mktime?

663件の閲覧回数
lakeleteasywood
Contributor I

hi,
Using CodeWarrior 10.7 Evaluation Edition, I have built a project for MC9S08RN60, calling the mktime function. When building the project, an error occurred, show "Symbol mktime is undefined". But isn't mktime a system library function? I have included time.h in the c source file. Has the mktime function been implemented for MC9S08RN60?

ラベル(1)
0 件の賞賛
返信
1 返信

587件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

hi.

Unfortunately the time functions are not implemented for HCS08 - This header file (time.h) is provided for compatibility only, the implementation is fully hardware dependent.

As mentioned in Compiler manual(in your CW6.3 install\Help\PDF\Compiler_HC08.pdf), search keyword with "Time Functions", in page 454: "The ANSI library provides several functions to get the current time. In an embedded systems environment, implementations for these functions cannot be provided because different targets may use different ways to count the time."

If you need it, you have to write your own functions (if you have some Real Time Clock component on your board).


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信