public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Application loading from hyper terminal
@ 2001-07-26  9:03 Ashutosh Sharma
  2001-07-27  1:48 ` Jesper Skov
  0 siblings, 1 reply; 9+ messages in thread
From: Ashutosh Sharma @ 2001-07-26  9:03 UTC (permalink / raw)
  To: ecos-discuss

Hi All
	I am working with the PC target. I have built RedBoot
for the same. I am trying to download my RAM build
application through Hyper Terminal, but not able to do
so. In the Hyper Terminal I am getting RedBoot prompt.
At the prompt, I am giving following commands:

RedBoot> load -m xmodem

After that lot of C's are coming up in the hyper
terminal window. Before receiving the time out
message, I am also sending the application file, using
the Send File Option. After sending  3 packets hyper
terminal stops sending data.

With the same RedBoot build, I am able to load and run
the same application to the target hardware using
debugger (i386-elf-gdb).

I have also read lot of mails, related to such
problem. But I don't find any solution for mine one. I
am also not able to execute commands like "fconf -1"
at redboot prompt. May be configuration problem. Is it
possible to set these at the build time? 

	I am using latest CVS repository of the eCos. I have
downloaded this last day i.e. 25th July 2001. What
should I do to solve these problem?


Thanks in advance.

Ashutosh


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ECOS] Application loading from hyper terminal
  2001-07-26  9:03 [ECOS] Application loading from hyper terminal Ashutosh Sharma
@ 2001-07-27  1:48 ` Jesper Skov
  2001-07-27  9:14   ` Ashutosh Sharma
  0 siblings, 1 reply; 9+ messages in thread
From: Jesper Skov @ 2001-07-27  1:48 UTC (permalink / raw)
  To: Ashutosh Sharma; +Cc: ecos-discuss

>>>>> "Ashutosh" == Ashutosh Sharma <ashutosh_hpm@yahoo.com> writes:

Ashutosh> Hi All I am working with the PC target. I have built RedBoot
Ashutosh> for the same. I am trying to download my RAM build
Ashutosh> application through Hyper Terminal, but not able to do
Ashutosh> so. In the Hyper Terminal I am getting RedBoot prompt.  At
Ashutosh> the prompt, I am giving following commands:

RedBoot> load -m xmodem

Please try Y-modem instead.

Jesper

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ECOS] Application loading from hyper terminal
  2001-07-27  1:48 ` Jesper Skov
@ 2001-07-27  9:14   ` Ashutosh Sharma
  2001-07-27  9:22     ` Gary Thomas
  0 siblings, 1 reply; 9+ messages in thread
From: Ashutosh Sharma @ 2001-07-27  9:14 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Jesper Skov

I have tried with all, X Y Z modems but I am not able
to upload the file to the target hardware. :-( I have
also downloaded the pre built software but same
problem is there. I am using the default
configuration. What should I do now.

Ashutosh

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ECOS] Application loading from hyper terminal
  2001-07-27  9:14   ` Ashutosh Sharma
@ 2001-07-27  9:22     ` Gary Thomas
  2001-07-27  9:41       ` Ashutosh Sharma
  0 siblings, 1 reply; 9+ messages in thread
From: Gary Thomas @ 2001-07-27  9:22 UTC (permalink / raw)
  To: Ashutosh Sharma; +Cc: Jesper Skov, ecos-discuss

On 27-Jul-2001 Ashutosh Sharma wrote:
> I have tried with all, X Y Z modems but I am not able
> to upload the file to the target hardware. :-( I have
> also downloaded the pre built software but same
> problem is there. I am using the default
> configuration. What should I do now.

What format is the data file in?  Remember that RedBoot's "load"
command only handles S-record files unless the '-r' flag is used.

If you try sending some other sort of file, e.g. an ELF binary,
to the "load" command, it will fail, but the error message most
likely will be lost (consumed) by the communications program (HyperTerm).
Bottom line - all you'll see is that it failed, without any real
indication of why.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ECOS] Application loading from hyper terminal
  2001-07-27  9:22     ` Gary Thomas
@ 2001-07-27  9:41       ` Ashutosh Sharma
  2001-07-27  9:45         ` Gary Thomas
  0 siblings, 1 reply; 9+ messages in thread
From: Ashutosh Sharma @ 2001-07-27  9:41 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Gary Thomas

I am using SREC format. Using following command, I am
converting the file

i386-elf-objcopy --target=srec source.exe target.hex
or
i386-elf-objcopy -O source.exe target.hex

on cygwin source file is source.exe and on linux
source only

Ashutosh

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ECOS] Application loading from hyper terminal
  2001-07-27  9:41       ` Ashutosh Sharma
@ 2001-07-27  9:45         ` Gary Thomas
  0 siblings, 0 replies; 9+ messages in thread
From: Gary Thomas @ 2001-07-27  9:45 UTC (permalink / raw)
  To: Ashutosh Sharma; +Cc: ecos-discuss

On 27-Jul-2001 Ashutosh Sharma wrote:
> I am using SREC format. Using following command, I am
> converting the file
> 
> i386-elf-objcopy --target=srec source.exe target.hex
> or
> i386-elf-objcopy -O source.exe target.hex
> 
> on cygwin source file is source.exe and on linux
> source only

Fair enough.  You're sure that the locations being used by the file
are writable by RedBoot?  It's quite careful, only allowing you to
load into "safe" memory locations.  Use the 'version' command to
show which memory locations will be allowed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ECOS] Application loading from hyper terminal
  2001-07-27 10:19 ` Gary Thomas
  2001-07-27 11:17   ` Ashutosh Sharma
@ 2001-07-27 12:47   ` Jonathan Larmour
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Larmour @ 2001-07-27 12:47 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Ashutosh Sharma, eCos Discussion

Gary Thomas wrote:
> 
> You're problem is an artifact of the PC system which we don't have a
> perfect solution for (at the moment).  RedBoot will currently insist on
> verifying that the memory you are trying to load into is "available".  On
> this platform, RedBoot only knows about RAM up to 0xa0000 (see above).

Well, that's sort of what the verify action is for, but that doesn't make
sense for X/Y modem uploads I suppose. I don't have a spec for the X/Y
modem protocol, but presumably there is a way to tell the other end to
abort the upload? Then we could display the message and require a "-f" for
"force" argument? This would also make sense for the other points in the
function where we abort it with an error message. Otherwise there is no way
to ever see any problems until you cancel the upload on the host.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ECOS] Application loading from hyper terminal
  2001-07-27 10:19 ` Gary Thomas
@ 2001-07-27 11:17   ` Ashutosh Sharma
  2001-07-27 12:47   ` Jonathan Larmour
  1 sibling, 0 replies; 9+ messages in thread
From: Ashutosh Sharma @ 2001-07-27 11:17 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Gary Thomas

Thanks for the patch. I have also disabled the option
for RAM validation. Now I am able to execute my
application using redboot.

Many Many ....... thanks

Ashutosh

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ECOS] Application loading from hyper terminal
       [not found] <20010727165611.16418.qmail@web3901.mail.yahoo.com>
@ 2001-07-27 10:19 ` Gary Thomas
  2001-07-27 11:17   ` Ashutosh Sharma
  2001-07-27 12:47   ` Jonathan Larmour
  0 siblings, 2 replies; 9+ messages in thread
From: Gary Thomas @ 2001-07-27 10:19 UTC (permalink / raw)
  To: Ashutosh Sharma; +Cc: eCos Discussion

Note: email sent directly to Red Hat engineers can and will be ignored.
Please copy all email to the eCos discussion list ecos-discuss.

On 27-Jul-2001 Ashutosh Sharma wrote:
> Following is the result from version command:
> 
> RedBoot(tm) bootstrap and debug environment - built
> 05:37:52, Jun  8 2001
> 
> Platform: PC (I386)
> Copyright (C) 2000, 2001, Red Hat, Inc.
> 
> RAM: 0x00000000-0x000a0000, 0x0007c080-0x000a0000
> available
> RedBoot>
> 
> This is the small part of the objdump of the file
> 
> twothreads.exe:     file format elf32-i386
> 
> Disassembly of section .text:
> 
> 00108000 <_start>:
>   108000: e4 64       in     $0x64,%al
>   108002: a8 02        test   $0x2,%al
>   108004: 75 fa        jne    108000 <_start>
>   108006: e4 64       in     $0x64,%al
>   108008: a8 01       test   $0x1,%al
>   10800a: 74 04       je     108010 <_start+0x10>
>   10800c: e4 60       in     $0x60,%al
> 
> 
> These results are form the default configuration of
> the eCos build. Should I change the memory location in
> the RAM build of my application.

You're problem is an artifact of the PC system which we don't have a
perfect solution for (at the moment).  RedBoot will currently insist on
verifying that the memory you are trying to load into is "available".  On
this platform, RedBoot only knows about RAM up to 0xa0000 (see above).

If you want to rebuild RedBoot, you can apply this patch and disable the
CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS option which should fix the problem 
you're seeing.

Don't forget, next time, copy to the list.

================ <cut-here>  =============================================

Index: redboot/current/src/load.c
===================================================================
RCS file: /home/cvs/ecc/ecc/redboot/current/src/load.c,v
retrieving revision 1.32
diff -u -5 -p -r1.32 load.c
--- redboot/current/src/load.c  2001/07/25 18:27:49     1.32
+++ redboot/current/src/load.c  2001/07/27 17:12:05
@@ -160,15 +160,17 @@ load_srec_image(int (*getc)(void), unsig
             }
             addr += addr_offset;
             if ((unsigned long)(addr-addr_offset) < lowest_address) {
                 lowest_address = (unsigned long)(addr - addr_offset);
             }
+#ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
             if ((addr < user_ram_start) || (addr > user_ram_end)) {
                 if (!verify_action("Attempt to load S-record data to address: %p\n"
                                    "RedBoot does not believe this is in RAM", (void*)addr))
                     return 0;
             }
+#endif
             count -= ((type-'1'+2)+1);
             offset += count;
             while (count-- > 0) {
                 val = _hex2(getc, 1, &sum);
                 *addr++ = val;
@@ -368,16 +370,18 @@ do_load(int argc, char *argv[])
         printf("File name missing\n");
         printf("usage: load %s\n", usage);
         return;
     }
 #endif
+#ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS
     if (base_addr_set &&
         ((base < (unsigned long)user_ram_start) ||
          (base > (unsigned long)user_ram_end))) {
         if (!verify_action("Specified address (%p) is not believed to be in RAM", (void*)base))
             return;
     }
+#endif
     if (raw && !base_addr_set) {
         printf("Raw load requires a memory address\n");
         return;
     }
 #ifdef CYGPKG_REDBOOT_NETWORKING
Index: redboot/current/cdl/redboot.cdl
===================================================================
RCS file: /home/cvs/ecc/ecc/redboot/current/cdl/redboot.cdl,v
retrieving revision 1.55
diff -u -5 -p -r1.55 redboot.cdl
--- redboot/current/cdl/redboot.cdl     2001/07/27 15:13:45     1.55
+++ redboot/current/cdl/redboot.cdl     2001/07/27 17:12:03
@@ -217,10 +217,22 @@ cdl_package CYGPKG_REDBOOT {
             processors it may be necessary to reduce the size to
             avoid serial overruns. zlib appears to bail out if less than
             five bytes are available initially so this is the minimum."
     }
 
+    cdl_option CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS {
+        display       "Validate RAM addresses during load"
+        flavor        bool
+        default_value 1
+        description   "
+          This option controls whether or not RedBoot will make sure that
+          memory being used by the \"load\" command is in fact in user RAM.
+          Leaving the option enabled makes for a safer environment, but this
+          check may not be valid on all platforms, thus the ability to
+          disable it.  ** Disable this only with great care **"
+    }
+
     cdl_component CYGPKG_REDBOOT_FLASH {
         display       "Allow RedBoot to support FLASH programming"
         flavor        bool
         default_value 1
         active_if     CYGPKG_IO_FLASH

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-07-27 12:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-26  9:03 [ECOS] Application loading from hyper terminal Ashutosh Sharma
2001-07-27  1:48 ` Jesper Skov
2001-07-27  9:14   ` Ashutosh Sharma
2001-07-27  9:22     ` Gary Thomas
2001-07-27  9:41       ` Ashutosh Sharma
2001-07-27  9:45         ` Gary Thomas
     [not found] <20010727165611.16418.qmail@web3901.mail.yahoo.com>
2001-07-27 10:19 ` Gary Thomas
2001-07-27 11:17   ` Ashutosh Sharma
2001-07-27 12:47   ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).