www.mikrocontroller.net

Forum: Mikrocontroller und Digitale Elektronik Codesize mit 44kb zu groß, woher kommen die lib_a sections ?


Autor: Lukas Simma (lsimma)
Datum:

Bewertung
0 lesenswert
nicht lesenswert
Hallo,

ich bin immer noch dran mit eclipse + plugin + codesourcery lite g++ + 
startupcode + linkerscript. Ich kann nun den stm3210C_EVAL Democode (LCD 
Touchpanel) kompilieren und auch meinen Code.
Der Democode ist ok, hat 13kB Size so ähnlich wie mit dem IAR. Bei 
meinem Code jedoch ist die Codegröße mit 44kB (statt erwarteten ca. 13kB 
bei IAR) etwas zu groß. Die Compiler und Linkerflags um unbenutzte 
Sections zu entfernen sind aktivert. Bei meinem Code musste ich auch 
eine syscalls.c einbinden (hab das aus einen Projekt von Martin Thomas 
entnommen) um Fehler nach den Symbolen _sbrk, _read, _lseek usw. zu 
eliminieren.

Im .map File sind lib_a....Einträge drin die ich nicht verstehe wo die 
herkommen und die den Code so aufblasen.

Kann mir wer bitte einen Tipp gegen wo ich ansetzen muss um diesen 
lib_a... Code zu eliminieren ?

Meine Toolchain:
* Eclipse Helios
* Eclipse ARM Toolchain Plugin von 
http://sourceforge.net/projects/gnuarmeclipse/
* codesourcery g++ lite 2010
* Gesamte Projektumgebung aus STM3210C_EVAL Democode entnommen
  Startupcode und Likerscript ist jenes von Truestudio aus dem 
STM3210C_EVAL Democode (diese haben ohne Modifikationen gepasst)

Auszug aus dem .map file:

.isr_vector     0x08000000      0x1e4
                0x08000000                . = ALIGN (0x4)
 *(.isr_vector)
 .isr_vector    0x08000000      0x1e4 
./library/CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/TrueSTUDIO/startu 
p_stm32f10x_cl.o
                0x08000000                g_pfnVectors
                0x080001e4                . = ALIGN (0x4)

.text           0x080001e8     0x9008
                0x080001e8                . = ALIGN (0x4)
 *(.text)
 .text          0x080001e8       0x30 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2/crtbegin.o
 .text          0x08000218       0x10 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-abort.o)
                0x08000218                abort
 .text          0x08000228       0x50 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-init.o)
                0x08000228                __libc_init_array
 .text          0x08000278       0x64 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-printf.o)
                0x08000278                printf
                0x080002b0                _printf_r
 .text          0x080002dc      0x14c 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-signal.o)
                0x080002dc                _raise_r
                0x08000334                raise
                0x08000344                _init_signal_r
                0x0800036c                _init_signal
                0x08000378                __sigtramp_r
                0x080003cc                __sigtramp
                0x080003dc                _signal_r
                0x08000418                signal
 .text          0x08000428       0x30 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-signalr.o)
                0x08000428                _getpid_r
                0x0800042c                _kill_r
 .text          0x08000458     0x1940 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-vfprintf.o)
                0x08000474                _vfprintf_r
                0x08001d7c                vfprintf
 .text          0x08001d98      0x104 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-wsetup.o)
                0x08001d98                __swsetup_r
 fill         0x08001e9c        0x4 00
 .text          0x08001ea0      0xfb8 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-dtoa.o)
                0x08001fc0                _dtoa_r
 .text          0x08002e58      0x178 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-fflush.o)
                0x08002e58                _fflush_r
                0x08002fa8                fflush
 .text          0x08002fd0      0x1c8 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-findfp.o)
                0x08002fd0                __sfp_lock_acquire
                0x08002fd4                __sfp_lock_release
                0x08002fd8                __sinit_lock_acquire
                0x08002fdc                __sinit_lock_release
                0x08002fe8                __fp_unlock_all
                0x08003000                __fp_lock_all
                0x08003018                _cleanup_r
                0x08003024                _cleanup
                0x08003080                __sfmoreglue
                0x080030b0                __sfp
                0x08003138                __sinit
 .text          0x08003198      0x268 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-freer.o)
                0x08003198                _malloc_trim_r
                0x08003240                _free_r
 .text          0x08003400      0x334 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-fvwrite.o)
                0x08003400                __sfvwrite_r
 .text          0x08003734       0xa0 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-fwalk.o)
                0x08003734                _fwalk_reent
                0x08003788                _fwalk
 .text          0x080037d4       0x74 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-locale.o)
                0x080037d4                __locale_charset
                0x080037e0                _localeconv_r
                0x080037e8                localeconv
                0x080037f0                _setlocale_r
                0x08003838                setlocale
 .text          0x08003848       0xdc 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-makebuf.o)
                0x08003848                __smakebuf_r
 .text          0x08003924       0x20 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-malloc.o)
                0x08003924                free
                0x08003934                malloc
 .text          0x08003944      0x5a4 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-mallocr.o)
                0x08003944                _malloc_r
 .text          0x08003ee8       0x74 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-memchr.o)
                0x08003ee8                memchr
 .text          0x08003f5c      0x190 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-memcpy.o)
                0x08003f5c                memcpy
 .text          0x080040ec       0xb8 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-memmove.o)
                0x080040ec                memmove
 .text          0x080041a4       0xd4 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-memset.o)
                0x080041a4                memset
 .text          0x08004278        0x8 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-mlock.o)
                0x08004278                __malloc_lock
                0x0800427c                __malloc_unlock
 .text          0x08004280      0x958 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-mprec.o)
                0x08004280                __hi0bits
                0x080042c0                __lo0bits
                0x08004324                __mcmp
                0x08004364                __ulp
                0x080043b0                __b2d
                0x08004458                __ratio
                0x080044b8                _mprec_log10
                0x080044f0                __copybits
                0x08004540                __any_on
                0x08004598                _Bfree
                0x080045d0                _Balloc
                0x0800463c                __d2b
                0x0800470c                __mdiff
                0x08004804                __lshift
                0x080048c0                __multiply
                0x080049f4                __i2b
                0x08004a08                __multadd
                0x08004a90                __pow5mult
                0x08004b3c                __s2b
 .text          0x08004bd8      0x3b4 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-reallocr.o)
                0x08004bd8                _realloc_r
 .text          0x08004f8c       0x24 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-s_isinfd.o)
                0x08004f8c                __isinfd
 .text          0x08004fb0       0x1c 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-s_isnand.o)
                0x08004fb0                __isnand
 .text          0x08004fcc       0x28 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-sbrkr.o)
                0x08004fcc                _sbrk_r
 .text          0x08004ff4       0x90 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-stdio.o)
                0x08004ff4                __sclose
                0x08004ffc                __sseek
                0x08005024                __swrite
                0x08005060                __sread
 .text          0x08005084      0x1dc 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-strcmp.o)
                0x08005084                strcmp
 .text          0x08005260       0x60 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-strlen.o)
                0x08005260                strlen
 .text          0x080052c0       0x2c 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-writer.o)
                0x080052c0                _write_r
 .text          0x080052ec       0x5c 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-callocr.o)
                0x080052ec                _calloc_r
 .text          0x08005348       0x28 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-closer.o)
                0x08005348                _close_r
 .text          0x08005370       0xcc 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-fclose.o)
                0x08005370                _fclose_r
                0x0800542c                fclose
 .text          0x0800543c       0x2c 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-fstatr.o)
                0x0800543c                _fstat_r
 .text          0x08005468       0x28 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-isattyr.o)
                0x08005468                _isatty_r
 .text          0x08005490       0x2c 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-lseekr.o)
                0x08005490                _lseek_r
 .text          0x080054bc       0x2c 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/thumb2\libc.a(li 
b_a-readr.o)
                0x080054bc                _read_r
 .text          0x080054e8      0x278 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_udivsi3.o)
                0x080054e8                __aeabi_uidiv
                0x080054e8                __udivsi3
                0x08005744                __aeabi_uidivmod
 .text          0x08005760        0x4 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_dvmd_tls.o)
                0x08005760                __aeabi_idiv0
                0x08005760                __aeabi_ldiv0
 .text          0x08005764      0x370 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_arm_addsubdf3.o)
                0x08005764                __aeabi_drsub
                0x0800576c                __aeabi_dsub
                0x0800576c                __subdf3
                0x08005770                __aeabi_dadd
                0x08005770                __adddf3
                0x080059e8                __floatunsidf
                0x080059e8                __aeabi_ui2d
                0x08005a08                __floatsidf
                0x08005a08                __aeabi_i2d
                0x08005a2c                __aeabi_f2d
                0x08005a2c                __extendsfdf2
                0x08005a68                __floatundidf
                0x08005a68                __aeabi_ul2d
                0x08005a78                __floatdidf
                0x08005a78                __aeabi_l2d
 .text          0x08005ad4      0x424 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_arm_muldivdf3.o)
                0x08005ad4                __aeabi_dmul
                0x08005ad4                __muldf3
                0x08005d28                __divdf3
                0x08005d28                __aeabi_ddiv
 .text          0x08005ef8      0x110 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_arm_cmpdf2.o)
                0x08005ef8                __gtdf2
                0x08005ef8                __gedf2
                0x08005f00                __ltdf2
                0x08005f00                __ledf2
                0x08005f08                __nedf2
                0x08005f08                __eqdf2
                0x08005f08                __cmpdf2
                0x08005f84                __aeabi_cdrcmple
                0x08005f94                __aeabi_cdcmpeq
                0x08005f94                __aeabi_cdcmple
                0x08005fa4                __aeabi_dcmpeq
                0x08005fb8                __aeabi_dcmplt
                0x08005fcc                __aeabi_dcmple
                0x08005fe0                __aeabi_dcmpge
                0x08005ff4                __aeabi_dcmpgt
 .text          0x08006008       0x50 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_arm_fixdfsi.o)
                0x08006008                __aeabi_d2iz
                0x08006008                __fixdfsi
 .text          0x08006058       0x2c 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_aeabi_uldivmod.o)
                0x08006058                __aeabi_uldivmod
 .text          0x08006084       0x58 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(bpabi.o)
                0x08006084                __gnu_uldivmod_helper
                0x080060b0                __gnu_ldivmod_helper
 .text          0x080060dc      0x364 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_divdi3.o)
                0x080060dc                __divdi3
 .text          0x08006440      0x300 
l:/programme/arm/eclipse_cs3_stlink_toolchain/codesourcery_gcc/bin/../li 
b/gcc/arm-none-eabi/4.4.1/thumb2\libgcc.a(_udivdi3.o)
                0x08006440                __udivdi3
 *(.text*)


Danke,
Lukas

Antwort schreiben

Die Angabe einer E-Mail-Adresse ist freiwillig. Wenn Sie automatisch per E-Mail über Antworten auf Ihren Beitrag informiert werden möchten, melden Sie sich bitte an.

Wichtige Regeln - erst lesen, dann posten!

  • Groß- und Kleinschreibung verwenden
  • Längeren Sourcecode nicht im Text einfügen, sondern als Dateianhang

Formatierung (mehr Informationen...)

  • [c]C-Code[/c]
  • [avrasm]AVR-Assembler-Code[/avrasm]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] - Link zu Artikel
  • Verweis auf anderen Beitrag einfügen: Rechtsklick auf Beitragstitel,
    "Adresse kopieren", und in den Text einfügen




Bild automatisch verkleinern, falls nötig
Bitte das JPG-Format nur für Fotos und Scans verwenden!
Zeichnungen und Screenshots im PNG- oder
GIF-Format hochladen. Siehe Bildformate.
Hinweis: der ursprüngliche Beitrag ist mehr als 6 Monate alt.
Bitte hier nur auf die ursprüngliche Frage antworten,
für neue Fragen einen neuen Beitrag erstellen.

Mit dem Abschicken bestätigst du, die Nutzungsbedingungen anzuerkennen.