leon3 broken for hello

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Feb 19 09:24:36 UTC 2014


On 2014-02-19 08:48, Sebastian Huber wrote:
> Hello Joel,
>
> since you don't provide much information (e.g. at least a stack trace would
>  have been helpful) I can only guess.  You probably configured only one
> GPTIMER instance in the simulators.  Since the LEON processors lacks a
> free-running CPU counter I had to use a second GPTIMER instance for this.
>
> You should end up in _Internal_error_Occurred() with the_source ==
> RTEMS_FATAL_SOURCE_BSP_SPECIFIC.  Now you can look at the <bsp.h> of the
> LEON3 BSP and find this:
>
> typedef enum { LEON3_FATAL_CPU_COUNTER_INIT } leon3_fatal_code;
>
> If you search for LEON3_FATAL_CPU_COUNTER_INIT you will find this:
>
> adev = (void *) ambapp_for_each( &ambapp_plb, OPTIONS_ALL |
> OPTIONS_APB_SLVS, VENDOR_GAISLER, GAISLER_GPTIMER, ambapp_find_by_idx, &idx
> ); if (adev == NULL) { rtems_fatal(RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
> LEON3_FATAL_CPU_COUNTER_INIT); }

With this change

http://git.rtems.org/rtems/commit/?id=33cb8bf64d7b7551ea3a2e7ced5d4b56cd32d6db

it is now easier to figure out what cased a BSP specific fatal error:

Breakpoint 2, _Internal_error_Occurred (the_source=RTEMS_FATAL_SOURCE_BSP, 
is_internal=false, the_error=512) at 
../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:36
36      {
(gdb) where
#0  _Internal_error_Occurred (the_source=RTEMS_FATAL_SOURCE_BSP, 
is_internal=false, the_error=512) at 
../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:36
#1  0x4000239c in leon3_cpu_counter_initialize () at 
../../../../../.././leon3/lib/include/bsp/fatal.h:108
#2  0x40001c80 in bsp_start () at 
../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c:72
#3  0x40001b34 in boot_card (cmdline=0x0) at 
../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../shared/bootcard.c:82
#4  0x400010c8 in zerobss () at 
../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../sparc/shared/start/start.S:362
#5  0x400010c8 in zerobss () at 
../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../sparc/shared/start/start.S:362
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) p (bsp_fatal_code) the_error
$4 = LEON3_FATAL_CPU_COUNTER_INIT
(gdb)

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list