pragma CODE_SEG of __EntryPoint function Issue

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

pragma CODE_SEG of __EntryPoint function Issue

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

Hello,

 

I have created a demo project in Code Warrior 10.6 with Processor Expert for S12ZVC micro controller.

 

Function __EntryPoint is the initialisation function for the project which is defined as

INIT _EntryPoint  in the Linker Command File.

 

In file CPU.c function __EntryPoint is defined under

#pragma CODE_SEG __NEAR_SEG NON_BANKED

 

But map file shows this function lies in

 

OBJECT-ALLOCATION SECTION

     Name               Module                 Addr   hSize   dSize     Ref    Section   RLIB

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

MODULE:                 -- Cpu_c.obj --

- PROCEDURES:

     _EntryPoint                             FD0003      59      89       1   .init

 

 

Now I created another function Cpu_Test_func in CPU.c under the same segment #pragma CODE_SEG __NEAR_SEG NON_BANKED in which __EntryPoint function is placed.

 

Then map file shows Cpu_Test_func lies in

 

OBJECT-ALLOCATION SECTION

     Name               Module                 Addr   hSize   dSize     Ref    Section   RLIB

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

MODULE:                 -- Cpu_c.obj --

- PROCEDURES:

          Cpu_Test_func                       FD005C      33      51       1   .init

 

My Observations are

1) Function created in the file where the init function is defined and also under same segment then the function goes into .init segment.

2) Function created in different file where the init function is not defined and also under same segment then the function goes into the correct segment.

 

Now my question is why this happens like that. Is it a bug of CodeWarrior 10.6 for S12ZVC. How can I resolve them.

 

Thanks,

Amit Dhand

ラベル(1)
0 件の賞賛
返信
1 解決策
818件の閲覧回数
trytohelp
NXP Employee
NXP Employee

Hi all,

This is may be linked to the Thread:

    Problem with S12ZVC startup code


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
819件の閲覧回数
trytohelp
NXP Employee
NXP Employee

Hi all,

This is may be linked to the Thread:

    Problem with S12ZVC startup code


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
818件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

please upload your demo code including Cpu_Test_func() functions.

please also mention the CW version: Start the IDE and click on Help | About CodeWarrior Development Studio. Send me the version and build id.

thanks!


Have a great day,
Zhang Jun

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

0 件の賞賛
返信
818件の閲覧回数
amit_dhand
Contributor III

Hello Jennie,

thank you for your support.

I am using CodeWarrior for MCU S12ZVC

    Version: 10.6

    Build Id:140329

Thank you

Regards,

Amit Dhand

0 件の賞賛
返信