2013-04-09 03:23 AM
Hi all,
When I build my application, the output .hex file indicates that the FLASH data footprint (.text) is 0xBB04, but according to the .map file it should only be 0xB How is this possible? I am using the YAGARTO toolchain on a STM3240G-EVAL. As seen here below, the map file indicates .text to be 0xB220.text 0x08000000 0xb220
*(.isr_vector)
.isr_vector 0x08000000 0x188 startup_stm32f4xx.o
0x08000000 __isr_vector
Here are the compiler and linker options I am using:
MCFLAGS = -mthumb -mcpu=$(MCU)
ASFLAGS = $(MCFLAGS) -g -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
CPFLAGS = $(MCFLAGS) $(OPT) -g -Wall -ffunction-sections -Wa,-ahlms=$(<:.c=.lst) $(DEFS)
LDFLAGS = $(MCFLAGS) -pedantic -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(FULL_PRJ).map,--cref,--gc-sections,--no-warn-mismatch $(LIBDIR)
LDFLAGS += -Wl,--start-group $(ULIBS) -Wl,--end-group
# Generate dependency information
CPFLAGS += -MD -MP -MF .dep/$(@F).d
I also attached the output .hex file, .map file and makefile.
Any suggestions as to what might be wrong?
Thanks,
H
#stm32f4 #linker #map-file
2013-04-09 03:36 AM
Add 0x8e4 of .data initializer.
This has nothing to do with STM32 as such, btw., although I admit I know of no good GNU-tools-user forum.JW2013-04-09 03:55 AM
This has nothing to do with STM32 as such, btw., although I admit I know of no good GNU-tools-user forum.
Yes I know, but most of the time I don't even get responses from GNU forums. Won't post such questions under STM32 again. SorryAdd 0x8e4 of .data initializer.
Can you please explain a bit more what you mean by this?Thanks,H2013-04-09 04:19 AM
''.data'' initializer are constants stored in Flash, and are used to initialize RAM variables which do not remain constant during runtime.
2013-04-09 04:22 AM
The values which go to the initialized global and static variables (which are stored in the .data segment in RAM) have to be in FLASH somewhere, and they are just above .text. The startup code then copies this into RAM after reset.
[politically incorrect personal view] Belittling of the mere user is a general plague of much of the GNU developer community.[/politically incorrect personal view] The avr-gcc subforum of avrfreaks.net forum is the only forum I know of which is very responsive and friendly to user-grade questions like this; however, its' AVR-specific and non-AVR (and non-Atmel-related) questions would be frowned upon there, too. JW2013-04-09 04:36 AM
[politically incorrect personal view] Belittling of the mere user is a general plague of much of the GNU developer community.[/politically incorrect personal view]
I would extend this to some other communities in the Unix/Linux world (but not to all).
2013-04-09 05:41 AM
Thanks, now I understand