Discussion Forum

CANNOT DETERMINE ROOT SEGMENT

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Jerry Woo
Posted
14-Oct-2002 06:21 GMT
Toolset
C51
New! CANNOT DETERMINE ROOT SEGMENT
when i compile a programe in V6.12,the compiler gives L10 Warning:CANNOT DETERMINE ROOT SEGMENT,how to solve this problem?
Read-Only
Author
Andrew Neil
Posted
14-Oct-2002 09:31 GMT
Toolset
C51
New! RE: CANNOT DETERMINE ROOT SEGMENT
does you 'C' have a main() function?
Read-Only
Author
Jerry Woo
Posted
14-Oct-2002 15:06 GMT
Toolset
C51
New! RE: CANNOT DETERMINE ROOT SEGMENT
Thanks for your reply.Yes,my program has
main() function.How to resolve this problem?
Read-Only
Author
Jon Ward
Posted
14-Oct-2002 18:59 GMT
Toolset
C51
New! RE: CANNOT DETERMINE ROOT SEGMENT
Is your main C function written in assembly or was it compiled with the SRC directive?

Jon
Read-Only
Author
Jerry Woo
Posted
15-Oct-2002 04:34 GMT
Toolset
C51
New! RE: CANNOT DETERMINE ROOT SEGMENT
Thanks.My main C function is written in C and it was not compiled with the SRC directive.
Read-Only
Author
Keil Support Intl.
Posted
15-Oct-2002 06:33 GMT
Toolset
C51
New! RE: CANNOT DETERMINE ROOT SEGMENT
Do you have a modified STARTUP.A51 file?

Can you re-crate the problem also with example programs?
Read-Only
Author
Jerry Woo
Posted
15-Oct-2002 15:32 GMT
Toolset
C51
New! RE: CANNOT DETERMINE ROOT SEGMENT
The compiler always gives the warning whether
i have a modified STARTUP.A51 file or not.It gives no warning when compiling example programs.
Read-Only
Author
Keil Support Intl.
Posted
16-Oct-2002 12:41 GMT
Toolset
C51
New! RE: CANNOT DETERMINE ROOT SEGMENT
So this brings it to the point: what is the difference between your application and the example programs (or other user applications).
Read-Only
Author
Daniel Schoene
Posted
4-Nov-2003 17:19 GMT
Toolset
C51
New! RE: CANNOT DETERMINE ROOT SEGMENT
Hi Jerry,

I just faced the same problem. Maybe the reason I found is applicable for you, too. When passing parameters to main() the segment name changes from ?PR?MAIN?SRC_MODULE to ?PR?_MAIN?SRC_MODULE. The problem is that the linker does not parse for this segment name -> CANNOT DETERMINE ROOT SEGMENT.

One could state that it does not make sense to pass paramters to main() in a uController application but we efford to change the linker to parse for both segment names should be acceptable. (The same amount of time to guess that the cause of this problem is ;-)

Next Thread | Thread List | Previous Thread Start a Thread | Settings