public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Help with CYGSEM_HAL_USE_ROM_MONITOR
@ 2011-05-13 10:32 Elad Yosef
  2011-05-13 11:14 ` Gary Thomas
  2011-05-16 19:44 ` Yurij Grechishhev
  0 siblings, 2 replies; 3+ messages in thread
From: Elad Yosef @ 2011-05-13 10:32 UTC (permalink / raw)
  To: ecos-discuss

Hi,
I have 1 UART on my target and whenever I have some crash in the
system I get some strings to the serial

something like:
$O4D6172732D4170706C69636174696F6E20666C6173682076616C69642072616E67652069732030
786231303030303030202D20307862313033666666660A#15

OR (for CYGSEM_HAL_USE_ROM_MONITOR = generic):

$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d
:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b2
5:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b
40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e48
50080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;

What I don't understand is how to parse this error string
It looks like some GDB stuff so my direction is that my
CYGSEM_HAL_USE_ROM_MONITOR is wrong.

What should I configure in the RedBoot and in the application?

Thanks

Elad

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Help with CYGSEM_HAL_USE_ROM_MONITOR
  2011-05-13 10:32 [ECOS] Help with CYGSEM_HAL_USE_ROM_MONITOR Elad Yosef
@ 2011-05-13 11:14 ` Gary Thomas
  2011-05-16 19:44 ` Yurij Grechishhev
  1 sibling, 0 replies; 3+ messages in thread
From: Gary Thomas @ 2011-05-13 11:14 UTC (permalink / raw)
  To: Elad Yosef; +Cc: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]

On 05/13/2011 03:30 AM, Elad Yosef wrote:
> Hi,
> I have 1 UART on my target and whenever I have some crash in the
> system I get some strings to the serial
>
> something like:
> $O4D6172732D4170706C69636174696F6E20666C6173682076616C69642072616E67652069732030
> 786231303030303030202D20307862313033666666660A#15

Use the attached program to decode this:

$ decode_gdb.py '$O4D6172732D4170706C69636174696F6E20666C6173682076616C69642072616E67652069732030786231303030303030202D20307862313033666666660A#15'
Mars-Application flash valid range is 0xb1000000 - 0xb103ffff

>
> OR (for CYGSEM_HAL_USE_ROM_MONITOR = generic):
>
> $T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d
> :104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b2
> 5:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b
> 40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;#86$T0b25:e48
> 50080;1d:104b40a0;#86$T0b25:e4850080;1d:104b40a0;
>
> What I don't understand is how to parse this error string
> It looks like some GDB stuff so my direction is that my
> CYGSEM_HAL_USE_ROM_MONITOR is wrong.
>
> What should I configure in the RedBoot and in the application?

If you're using RedBoot, I think you are probably configured correctly.
The problem is that some messages may be printed _before_ RedBoot takes
over the printing channel.  This is such a message.

Better to just fix the problem :-)

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

[-- Attachment #2: decode_gdb.py --]
[-- Type: text/plain, Size: 1030 bytes --]

#! /usr/bin/env python

import sys, os

def hex_chr(ch):
    if ((ch >= '0') & (ch <= '9')):
        return ord(ch) - ord('0')
    if ((ch >= 'a') & (ch <= 'f')):
        return ord(ch) - ord('a') + 0x0a
    if ((ch >= 'A') & (ch <= 'F')):
        return ord(ch) - ord('A') + 0x0A
    
def gdb_char(str):
    _hex = (hex_chr(str[0]) << 4) | hex_chr(str[1])
    return chr(_hex)

if len(sys.argv) == 1:
    gdb_string = "$O5B6379675F6E65745F696E69745D20496E69743A206D62696E69742830783030303030303030290A#60"
    gdb_string = "$O464C4153482049443A2030312032323765203232313320323230310A#98"
    gdb_string = "$O68616C5F6D7063383378785F6932635F7075745F62797465732E3333370A#33"
else:
    gdb_string = sys.argv[1]
    
human_string = ""

if gdb_string.find("$") < 0:
    print "*** incomplete string '%s': try using \"'\" to quote it" % gdb_string
    os._exit(1)
    
gdb_string = gdb_string[2:] # Strip $O

while gdb_string[0] != '#':
    human_string += gdb_char(gdb_string[0:2])
    gdb_string = gdb_string[2:]

print human_string


[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Help with CYGSEM_HAL_USE_ROM_MONITOR
  2011-05-13 10:32 [ECOS] Help with CYGSEM_HAL_USE_ROM_MONITOR Elad Yosef
  2011-05-13 11:14 ` Gary Thomas
@ 2011-05-16 19:44 ` Yurij Grechishhev
  1 sibling, 0 replies; 3+ messages in thread
From: Yurij Grechishhev @ 2011-05-16 19:44 UTC (permalink / raw)
  To: ecos-discuss

> What I don't understand is how to parse this error string
Try to set the option CYGSEM_HAL_DIAG_MANGLER to "None" in
application. In this case you application will send raw ASCII text.

> It looks like some GDB stuff so my direction is that my
> CYGSEM_HAL_USE_ROM_MONITOR is wrong.
>
> What should I configure in the RedBoot and in the application?

If you debug application using GDB, set CYGSEM_HAL_DIAG_MANGLER to "GDB".


--
With best regards!
____________________________

Yurij Grechishhev
Bauman State Technical University,
Department of Computer Systems and Networks

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2011-05-16 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-13 10:32 [ECOS] Help with CYGSEM_HAL_USE_ROM_MONITOR Elad Yosef
2011-05-13 11:14 ` Gary Thomas
2011-05-16 19:44 ` Yurij Grechishhev

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).