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
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
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