From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jochen Hagemann To: Christian Plessl Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] i386 target crashes after download Date: Fri, 19 Jan 2001 07:40:00 -0000 Message-id: <3A6856A6.F024D9B5@genologic.de> References: <3A672375.DDC0E752@genologic.de> <3A673E8A.6296AF1D@redhat.com> <5.0.2.1.0.20010119105711.00a90510@imap.ee.ethz.ch> X-SW-Source: 2001-01/msg00340.html Christian Plessl wrote: > Just to make this sure. > > How did you link your executable? Did you make 2 seperate ecos trees, one > for building the ecos loader with gdb-stubs and another tree for building > the ecos library which is linked with your application > > ecosconfig new pc stubs > ecosconfig tree > make > > --> this gives you the loader > > than, in a different directory > > ecosconfig new pc (note! no stubs here) > ecosconfig tree > make > > this gives you the library to link your application with > > Chris Hi Chris, I built the gdb-stubs and the library in different directories. But perhaps I made another mistake. Here is a detailed description of what I did: I built the loader with the following script in a directory named "stub" -- export ECOS_REPOSITORY=/opt/ecos/ecos-1.3.1/packages export PATH=/tools/H-i686-pc-linux-gnu/bin:$PATH ECOS_TOOLS=/opt/ecos-1.3.1/tools/bin $ECOS_TOOLS/ecosconfig new pc stubs $ECOS_TOOLS/ecosconfig check $ECOS_TOOLS/ecosconfig tree make -- ...and got those messages: 7 conflict(s) resolved: CYGBLD_BUILD_GDB_STUBS: Requires constraint not satisfied: CYG_HAL_STARTUP == "FLOPPY" CYGSEM_HAL_ROM_MONITOR: Requires constraint not satisfied: !CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT CYGBLD_BUILD_GDB_STUBS: Requires constraint not satisfied: CYGSEM_HAL_ROM_MONITOR CYGBLD_BUILD_COMMON_GDB_STUBS: Requires constraint not satisfied: CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS CYGBLD_BUILD_GDB_STUBS: Requires constraint not satisfied: CYGBLD_BUILD_COMMON_GDB_STUBS CYGBLD_BUILD_GDB_STUBS: Requires constraint not satisfied: ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT CYGBLD_BUILD_GDB_STUBS: Requires constraint not satisfied: ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM Target: pc Template: stubs No conflicts ... (finally :-) build finished To create the boot disk, I typed: dd conv=sync if=install/bin/gdb_module.bin of=/dev/fd0 When I built the library in a different directory named "target" with -- export ECOS_REPOSITORY=/opt/ecos/ecos-1.3.1/packages export PATH=/tools/H-i686-pc-linux-gnu/bin:$PATH ECOS_TOOLS=/opt/ecos-1.3.1/tools/bin $ECOS_TOOLS/ecosconfig new pc $ECOS_TOOLS/ecosconfig check $ECOS_TOOLS/ecosconfig tree make -- ...I got those messages: 1 conflict(s) resolved: CYGSEM_HAL_I386_PC_STARTUP_RAM: Requires constraint not satisfied: !CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT Target: pc Template: default 2 conflict(s): CYGSEM_HAL_I386_PC_STARTUP_RAM: Requires constraint not satisfied: CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS CYGSEM_HAL_I386_PC_STARTUP_RAM: Requires constraint not satisfied: CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT 5 conflict(s) resolved: CYGSEM_HAL_I386_PC_STARTUP_RAM: Requires constraint not satisfied: CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT: Requires constraint not satisfied: !CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT CYGSEM_HAL_I386_PC_STARTUP_RAM: Requires constraint not satisfied: CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT: Requires constraint not satisfied: !CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT CYGSEM_HAL_I386_PC_STARTUP_RAM: Requires constraint not satisfied: CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT ... (finally :-) build finished I could get rid of the conflicts by editing the ecos.ecc file. My Makefile for the simplest program you can imagine looks like this: -- PATH := /tools/H-i686-pc-linux-gnu/bin:$(PATH) CC = i386-elf-gcc CXX = i386-elf-g++ INCLUDE = -I ../target/install/include LIB = -L ../target/install/lib CFLAGS = $(INCLUDE) -g -O2 -fno-rtti -fno-exceptions -ffunction-sections \ -fdata-sections -fvtable-gc -finit-priority LDFLAGS = $(LIB) -g -Ttarget.ld -nostdlib hello: hello.o -- Any ideas ? -- Jochen Hagemann GenoLogic GmbH Emil-Figge-Str. 80 D-44227 Dortmund