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]

RE: Modifying memory layout, possible?


hello,

While trying to build a new gdbstub the following error occurred.

# First build version with no checksum.

arm-elf-gcc -c  -I//D/ecos-work/aeb/config2_expanded_install/include
-I//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1
-I//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/src
-I//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/tests -I.
-Wp,-MD,deps.tmp
-I//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/src/ -mcpu=arm7di
-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti
-fno-exceptions -fvtable-gc -finit-priority -o src/gdb_module_ncs.o
//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/src/gdb_module.c

arm-elf-gcc -mcpu=arm7di -Wl,--gc-sections -Wl,-static -g -nostdlib
-L//D/ecos-work/aeb/config2_expanded_install/lib -Ttarget.ld -o
src/gdb_module_ncs.tmp src/gdb_module_ncs.o

arm-elf-objcopy --strip-debug --change-addresses=0xFBFF4000
src/gdb_module_ncs.tmp src/gdb_module_ncs.img

arm-elf-objcopy -O binary src/gdb_module_ncs.img src/gdb_module_ncs.bin

# Prepare dependency file

# Then build version with checksum from previously built image.

arm-elf-gcc -c
-DCHECKSUM=`//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/src/flash
_cksum.tcl src/gdb_module_ncs.bin`
-I//D/ecos-work/aeb/config2_expanded_install/include
-I//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1
-I//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/src
-I//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/tests -I.
-I//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/src/ -mcpu=arm7di
-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti
-fno-exceptions -fvtable-gc -finit-priority -o src/gdb_module.o
//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/src/gdb_module.c

exec: tclsh: not found

//D/PROGRA~1/REDHAT~1/eCos/packages/hal/arm/aeb/v1_3_1/src/gdb_module.c:89:
parse error before `,'

make[1]: *** [//D/ecos-work/aeb/config2_expanded_install/bin/gdb_module.bin]
Error 1

make[1]: Leaving directory
`/d/ecos-work/aeb/config2_expanded_build/hal/arm/aeb/v1_3_1'

make: *** [build] Error 2





The area in gdb_module.c looks like this, row 89 is the one with CHECKSUM.
What have I done wrong?



const static struct ModuleHeader __hdr = {

    0x4D484944,                     // MHID

    2,                              // flags = auto start

    1,                              // major

    0,                              // minor

    CHECKSUM,                       // checksum

    (cyg_uint32) &__exception_handlers,         // start of module
(read-only) image

    (cyg_uint32) &__rom_data_end,    // end of image

    0,                              // r/w base - unused

    0,                              // bss base - unused

    0,                              // bss limit - unused

    (cyg_uint32) &__hdr,            // self (for module identification)

    (cyg_uint32) &__exception_handlers,         // startup 

    0,                              // init - unused

    0,                              // final - unused

    0,                              // service - unused

    (cyg_uint32) &__title,          // title

    (cyg_uint32) &__help,           // help string

    0,                              // command table - unused

    0,                              // SWI table - unused

    0                               // SWI handler - unused

};


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