To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3814
3813  |  3815
Subject: 
Re: compiling problmes 2
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 7 Oct 2004 09:23:52 GMT
Viewed: 
8755 times
  
In lugnet.robotics.rcx.legos, Jochen Hoenicke wrote:
On Monday 27 September 2004 14:13, ruessel wrote:

I looked for some of those references and all of them are defined as extern in
some header-files. So they must be declared in an assembler-file , isn't it? And
by the way, I searched the whole directory - even the header files - so those
unresolved references are defined nowhere in the whole BrickOS-folder.

Where can I get some information how to define these macros?

Some of the functions are inline functions, that are *defined* in the
header files, e.g.cputc_hex is defined in include/conio.h.  With gcc you need
to compile with optimization on, so that it will inline these functions correctly.
Another possibility is to replace extern keyword with static, which AFAIK has the
same effect with optimization on, but includes the functions if compiled without
optimizations.

Some others are defined in h8300.rcx.  This is a linker script that maps theses
variables to hard-coded addresses used by the ROM.  E.g. AD_D is a unsigned
byte whose address is 0xffe6.

HTH,
  Jochen

Hello Jochen, hello everybody,

thank you very much. Both of your hints helped a lot. As it were 271
linker-errors before your help, there are just 40 left now.
Maybe someone can help me and tell me where the other references are defined and
how I can resolve this overlapping problem:


Phase Linker starting
h8300-elf-ld.exe: section .text.hi [0000b3f0 -> 0000b437] overlaps section .bss
[0000b3f0 -> 0000b671]
h8300-elf-ld.exe: warning: cannot find entry symbol _start; defaulting to
00008000
..\critsec.o(.text+0x89): In function `enter_critical_section':
..\critsec.c:98: undefined reference to `wait_event'
..\dkey.o(.text+0x9d): In function `getchar':
..\dkey.c:125: undefined reference to `wait_event'
..\dkey.o(.text+0xad):..\dkey.c:129: undefined reference to `wait_event'
..\kmain.o(.text+0x89): In function `kmain':
..\kmain.c:193: undefined reference to `tm_init'
..\kmain.o(.text+0xc7):..\kmain.c:225: undefined reference to `tm_start'
..\lnp-logical.o(.text+0x2a9): In function `lnp_logical_write':
..\lnp-logical.c:278: undefined reference to `wait_event'
..\lnp-logical.o(.text+0x2e3):..\lnp-logical.c:289: undefined reference to
`wait_event'
..\program.o(.text+0x97): In function `program_run':
..\program.c:133: undefined reference to `execi'
..\program.o(.text+0x111): In function `program_stop':
..\program.c:320: undefined reference to `shutdown_tasks'
..\program.o(.text+0x135):..\program.c:325: undefined reference to `msleep'
..\program.o(.text+0x15f):..\program.c:335: undefined reference to `killall'
..\program.o(.text+0x4a9): In function `key_handler':
..\program.c:384: undefined reference to `shutdown_tasks'
..\program.o(.text+0x4cb):..\program.c:390: undefined reference to `msleep'
..\program.o(.text+0x4f5):..\program.c:393: undefined reference to `killall'
..\program.o(.text+0x6dd):..\program.c:488: undefined reference to `wait_event'
..\program.o(.text+0x919): In function `program_init':
..\program.c:641: undefined reference to `execi'
..\program.o(.text+0x929):..\program.c:642: undefined reference to `execi'
..\remote.o(.text+0x10b): In function `lr_thread':
..\remote.c:122: undefined reference to `wait_event'
..\remote.o(.text+0x175): In function `lr_startup':
..\remote.c:152: undefined reference to `execi'
..\semaphore.o(.text+0x53): In function `sem_wait':
..\semaphore.c:70: undefined reference to `wait_event'
..\semaphore.o(.text+0xe9): In function `sem_timedwait':
..\semaphore.c:106: undefined reference to `wait_event'
..\tm.o(.text+0xcf): In function `msleep':
..\tm.c:299: undefined reference to `MSECS_TO_TICKS'
..\tm.o(.text+0xdf):..\tm.c:299: undefined reference to `wait_event'
..\tm.o(.text+0xeb):..\tm.c:300: undefined reference to `MSECS_TO_TICKS'
..\tm.o(.text+0x1e1): In function `exit':
..\tm.c:580: undefined reference to `yield'
Phase Linker finished

Thanks
Rudolf



Message has 1 Reply:
  Re: compiling problmes 2
 
(...) I had the same problem when going to newer binutils and gcc. Look at the patch brickos-gcc33.diff at (URL) first part of that patch changes the linker script slightly to avoid this error. (...) I think with the default linker-script the (...) (20 years ago, 7-Oct-04, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: compiling problmes 2
 
(...) Some of the functions are inline functions, that are *defined* in the header files, e.g.cputc_hex is defined in include/conio.h. With gcc you need to compile with optimization on, so that it will inline these functions correctly. Another (...) (20 years ago, 27-Sep-04, to lugnet.robotics.rcx.legos)

7 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR