This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi all! I'm not sure that this is the right mailing group to send this to but i'll try anyway ;-) I'm working with Atmels AT91EB01 board in a RedHat 6.2 Linux enviorment using crosscompiler for ARM ELF: arm-elf-gcc version 2.96 20000501 (experimental) arm-elf-ld version 2.10 (with BFD 000606) newlib version 1.9.0 arm-elf-gdb version 5.0 The problem is malloc() and free(), they cause a SWI during runtime. I think this has something to do with that the stack and heap are defined to some default value that isn't supported by EB01. If i'll write programs that don't use malloc() and free() they work fine! The make file looks for example like this for those programs: CC=arm-elf-gcc LD=arm-elf-ld RM=rm CFLAGS= -g -mcpu=arm7tdmi -I/usr/local/arm/newlib-arm-elf/arm-elf/include LDFLAGS= -Ttext 0x2000000 -e 0x2000000 -nostdlib -Map mapfil.txt LDLIB=/usr/local/arm/newlib-arm-elf/arm-elf/lib/libc.a /tools/H-i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.96/libgcc.a RMFLAGS=-f all: program program: serial.o pio.o lib_usart.o lib_aic.o lib_pio.o $(LD) $(LDFLAGS) -o serial.elf serial.o pio.o $(LDLIB) ..... and so on.. NOTE: 0x2000000 is the lowest adress in SRAM I read that you can use a crt0.o file for setting upp the different sections (.text .data ...). Any one know how to solve the problem is with malloc() and free()? Is a crt0.o file the only solution or can I tell the linker where to put the stack and heap? Thanks for your time! /Jimmy Halmstad University, Sweden ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |