where does these add-on codes came from?

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi,

I'm writing my RF bootloader and found that my final binary code got a lot of stuff like:

8000263c <__avr32_f64_sub_from_add>:

80002640 <__avr32_f64_sub>:

where do they came from?

here is my makefile:

# C source files
CSRCS = \
  $(DRVR_PATH)/INTC/intc.c \
  $(DRVR_PATH)/PM/pm.c \
  $(DRVR_PATH)/SPI/spi.c \
  $(DRVR_PATH)/GPIO/gpio.c \
  $(DRVR_PATH)/FLASHC/flashc.c \
  $(DRVR_PATH)/PDCA/pdca.c \
  $(DRVR_PATH)/EIC/eic.c \
  $(DRVR_PATH)/TC/tc.c \
  $(DRVR_PATH)/RTC/rtc.c \
  ../../bin_file_bootloader_V2.c

I can't see any of these f64 operations. All I want is a small bootloader but now it's almost 41KB...

Anyone knows?[/code]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have to do --nostdlib and/or --nostdinc (IIRC). Downside is that you have to provide your own linker script. Upside is that you will not include the about 30 kB newlib :)

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, wow, 30KB..., thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so you mean if i do like you said, then

# Linker script file if any
LINKER_SCRIPT = $(UTIL_PATH)/LINKER_SCRIPTS/AT32UC3B/0256/GCC/link_uc3b0256.lds

will not work anymore and i have to provide another of my own?

can i use

# Linker script file if any
LINKER_SCRIPT = ./link_at32uc3b-isp.lds

??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, got it.

I use -nostartfiles and add:

$(UTIL_PATH)/STARTUP_FILES/GCC/crt0.S

then the 30KB is gone.