i386-gdb-stub compile error And rtems_shell _init error
Chris Johns
chrisj at rtems.org
Wed Jul 1 12:01:44 UTC 2009
lee wrote:
> Hi...
>
> Excuse all the questions all two of them...
>
> 1.) When I try to start the rtems shell with:
>
> rtems_shell_init("SHLL",RTEMS_MINIMUM_STACK_SIZE *
> 4,100,"/dev/console",0,1);
>
> the compiler gives me this warning:
>
> test.c:195: error: too few arguments to function 'rtems_shell_init'
>
> I've checked rtems/shell.h for the correct usage, and this is from a
> exact example again... not sure what the problem is... clearly compiling
> is using something else as rtems_shell_init or not?
>
I use:
/**
* Start the RTEMS Shell.
*/
void
shell_start ()
{
rtems_status_code sc;
printf ("Starting shell....\n\n");
sc = rtems_shell_init ("fstst", 60 * 1024, 150, "/dev/console", 0, 1, NULL);
if (sc != RTEMS_SUCCESSFUL)
printf ("error: starting shell: %s (%d)\n", rtems_status_text (sc), sc);
}
I suspect something has changed and the documentation is not up to date.
>
> 2.) When I try to compile the gdb debugging example given in
> i386/shared/comm/GDB-HOWTO , the compiler gives me this error :
>
> opt/rtems-4.10/i386-rtems4.10/pc386/lib/librtemsbsp.a(i386-stub.o): In
> function `debug_error':
> /opt/rtems/c/src/lib/libbsp/i386/pc386/../../i386/shared/comm/i386-stub.c:575: undefined reference to `remote_debug'
> /opt/rtems-4.10/i386-rtems4.10/pc386/lib/librtemsbsp.a(i386-stub.o): In
> function `getpacket':
> /opt/rtems/c/src/lib/libbsp/i386/pc386/../../i386/shared/comm/i386-stub.c:504: undefined reference to `remote_debug'
> /opt/rtems/c/src/lib/libbsp/i386/pc386/../../i386/shared/comm/i386-stub.c:504: undefined reference to `remote_debug'
> /opt/rtems-4.10/i386-rtems4.10/pc386/lib/librtemsbsp.a(i386-stub.o): In
> function `handle_exception':
> /opt/rtems/c/src/lib/libbsp/i386/pc386/../../i386/shared/comm/i386-stub.c:758: undefined reference to `remote_debug'
> /opt/rtems/c/src/lib/libbsp/i386/pc386/../../i386/shared/comm/i386-stub.c:808: undefined reference to `remote_debug'
>
> Im busy figuring out what this means... not having much luck... anyone
> got any ideas... "extern int remote_debug"?? what is the use for this
> variable....
>
Not sure. I attach the file I use with this code in main:
#if pc586
int arg;
for (arg = 1; arg < argc; arg++)
if (strcmp (argv[arg], "--gdb") == 0)
pc386_gdb_init ();
#endif
This from the file system test code you can find here:
http://www.rtems.org/ftp/pub/rtems/people/chrisj/file-system/rfs-20090612.tar.gz
Regards
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc386-gdb.c
Type: text/x-csrc
Size: 558 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20090701/e2639d29/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc386-gdb.h
Type: text/x-chdr
Size: 228 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20090701/e2639d29/attachment-0003.bin>
More information about the users
mailing list