avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] I thought I understood malloc


From: Steve Franks
Subject: [avr-libc-dev] I thought I understood malloc
Date: Wed, 28 Mar 2007 21:59:56 -0700

until just now.

have:
override LDFLAGS        =
-Wl,--section-start,.data=0x802100,--defsym=__heap_end=0x80A0ff,-Map=$(PRG).map,--cref
-lm -u vfprintf -u vfscanf -lprintf_flt -lscanf_flt -lm -lc

On a mega2561 w/ 8k internal, and 32k external.  Been chasing apparent
memory corruption for a couple weeks.

Ran avr-nm -n today, to find:

...
00803c0c D CommandSystemParamsSize
00803c0e D __thenan_sf
00803c16 D __malloc_margin
00803c18 D __malloc_heap_start
00803c1a D __malloc_heap_end
00803c1c b ResetSrc
00803c1c B __bss_start
00803c1c D __data_end
00803c1c D _edata
00803c1d b Disp3Ct
00803c1f b LimitStateArray
...
00805ddc B _FF_ScanAddr
00805de0 B __iob
00805de6 B __brkval
00805de8 B __flp
00805dea B __bss_end
00805dea A __heap_start
00805dea A _end
0080a0ff A __heap_end
00810000 A __eeprom_end

I'm looking at the avrlibc docs right now, and they seem to indicate that my
makefile should be instructing both heap_end and malloc_heap_end to be at
0x80A0FF.

Thoughts? Suggestions?

Thanks,
Steve


reply via email to

[Prev in Thread] Current Thread [Next in Thread]