This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problems to get started


On Sun, 2004-08-22 at 13:00, luna wrote:
> Hello,
> 
> I've build the simple-sample application from chapter 13. in the ecos-
> documentation
> with a printf("Hello, eCos world!\n");. I chosed the default configuration.
> 
> I compiled this and tried to run it with gdb/insight. I use also a BDI2000 with 
> an ec555
> board from wuerz (mpc555). 
> 
> --------------------------------------
>  I configured the bdi2000 like this:
> --------------------------------------
> 
> ; bdiGDB configuration file for ec555
> ; -----------------------------------------------
> ;
> [INIT]
> ; init core register
> WREG	MSR		0x00003002	;MSR: set FP,ME,RI
> WSPR	27		0x00003002	;SRR1: set FP,ME,RI
> WSPR	149		0xFFE7400F	;DER  : set debug enable register
> WSPR	158		0x00000007	;ICTRL: not serialized, no show cycles, 
> normal mode
> WSPR	638		0x0000080E	;IMMR: InternalRegs to 0x01C00000, 
> Flash enabled

Did you also change your eCos configuration to match this?  You not only
have to set this value in the CDL, but also take care that the address
space which contains the IMMR gets mapped in when the MMU takes over.

> 
> ; init memory controller
> WM32	0x01EFC000      0x00410400	;SIUMCR
> WM32	0x01EFC004	0xFFFFFF8F	;SYPCR : disable watchdog
> WM32	0x01EFC100	0x02000003	;BR0: AMD Flash, single read, 32-bit,
> WM32	0x01EFC104	0xFF800530	;OR0: AMD Flash, 5 wait, 8M block ...
> WM32	0x01EFC108	0x01000003	;BR1: SRAM, single read, 32-bit burst, 
> @0x01000000
> WM32	0x01EFC10C	0xFFC00000	;OR1: SRAM 0 wait, 4M block
> 
> 
> [TARGET]
> CPUTYPE		MPC500      ;CPU type (MPC800 | MPC500)
> CPUCLOCK	40000000    ;the CPU clock rate after processing the init list
> BDIMODE		AGENT       ;the BDI working mode (LOADONLY | AGENT)
> BREAKMODE	SOFT        ;SOFT or HARD, HARD uses PPC hardware breakpoints
> REGLIST		STD FPR     ;select register to transfer to GDB
> WORKSPACE	0x01000008  ;workspace in target RAM for FPR access
> 
> [HOST]
> IP          192.168.2.2
> FILE        G:\cygwin\home\ecos\ec555_workspace\ecos2\a.out
> FORMAT      ELF
> LOAD        MANUAL	;load code MANUAL or AUTO after reset
> DEBUGPORT   2001
> PROMPT      EC555>
> 
> [FLASH]
> CHIPTYPE    AM29BX16    ;Select MPC555 internal CDR MoneT Flash [MPC555 | 
> AM29BX16]
> WORKSPACE   0x01000000  ;use RAM for workspace
> CHIPSIZE    0x00200000	;The size of one flash chip in bytes
> BUSWIDTH    32
> FILE        G:\cygwin\home\ecos\ec555_workspace\ecos2\a.bin
> FORMAT      BIN
> ERASE       0x02000000 CHIP; Erase whole CHIP
> 
> [REGS]
> DMM1 	0x01C00000
> FILE    G:\cygwin\home\ecos\ec555_workspace\bdi2000_configfiles\reg555.def
> 
> ------------------------------------------------------------
>  Insight stopped at line 164 in  clist.hxx with a sigabrt.
> ------------------------------------------------------------
> 	public:
>  	162	
>  	163	    Cyg_CList()
>  	164	    {
> 	165	        head = NULL;
>  	166	    };
> 
> -----------------------------
>  Powerpc-eabi-gdb breaks so:
> -----------------------------
> 
> $ powerpc-eabi-gdb a.out
> GNU gdb 5.3 (eCosCentric)
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "--host=i686-pc-cygwin --target=powerpc-eabi"...
> 0x00000100 in ?? ()
> Loading section .text, size 0x13908 lma 0x1010000
> Loading section .rodata, size 0x17a4 lma 0x1023908
> Loading section .data, size 0x980 lma 0x10250b0
> Start address 0x1010000, load size 88620
> Transfer rate: 118160 bits/sec, 509 bytes/write.
> Breakpoint 1 at 0x1010464: file application/hello.c, line 6.
> (gdb) c
> Continuing.
> 
> Program received signal SIGABRT, Aborted.
> hal_hardware_init ()
>     at /opt/ecos/ecos-2.0-
> snapshot/packages/hal/powerpc/ec555/current/src/ec555.S:216
> 216             sth     r4, (CYGARC_REG_IMM_RTCSC-CYGARC_REG_IMM_BASE)(r3)
> Current language:  auto; currently asm
> (gdb)
> 
> 
> ----
>  or
> ----
> 
> 
> $ /gnutools/bin/powerpc-eabi-gdb a.out
> GNU gdb 6.1
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "--host=i686-pc-cygwin --target=powerpc-eabi"...
> 0x00000100 in ?? ()
> warning: no shared library support for this OS / ABI
> Loading section .text, size 0x13908 lma 0x1010000
> Loading section .rodata, size 0x17a4 lma 0x1023908
> Loading section .data, size 0x980 lma 0x10250b0
> Start address 0x1010000, load size 88620
> Transfer rate: 236320 bits/sec, 509 bytes/write.
> Breakpoint 1 at 0x1010464: file application/hello.c, line 6.
> (gdb) c
> Continuing.
> 
> Program received signal SIGABRT, Aborted.
> 0x0101e4f0 in hal_hardware_init () at /ecos-
> g/cygwin/home/ecos/ec555_workspace/ecos2/ecos_kernel/ecos2_install/include/cyg/i
> nfra/clist.hxx:164
> 164         {
> Current language:  auto; currently c++
> (gdb)
> 
> What did i configured false?
> 
> Greez Patrick Baumgartner
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]