[En-Nut-Discussion] CM4: Linking external (crypto) library

Philipp Burch phip at hb9etc.ch
Fri Mar 8 21:51:25 CET 2019

Hi Uwe!

On 04.03.19 12:48, bon at elektron.ikp.physik.tu-darmstadt.de wrote:
> [...]
> ...
>>> /usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc.a(lib_a-fflush.o):
>>> In function `fflush':
> Hallo Philip,
> the exact command line of the offending programs could help. For cortexm, there are 4 gcc options in the tool qnutconf tree:
> - GCC (no libc)
> -  GCC debug (no libc)
> - GCC newlib
> - GCC nanolib.
> Whta options did you try. As probably flash space is not that tight
> for yout application, perhaps  with new- or nanolib.

The command line for compiler and linker is like this:

arm-none-eabi-gcc -c -I/.../ethernut/nutbld-fpm_01b/include
-I/.../ethernut/devnut_tiva/nut/include/contrib  -DFPM_01B  -MD -MP
-mcpu=cortex-m4 -mthumb -D__CORTEX__ -mfloat-abi=hard -mfpu=fpv4-sp-d16
-ffunction-sections -fdata-sections -fomit-frame-pointer  -Os -Wall
-Wstrict-prototypes -Wa,-a=crc32crcgen.lst   -DBOOTLOADER_OFFSET=0x8000
-I../../libsodium/include -DREPOVERSION="\"4a34f184ec49 tip Thu Jan 31
14:33:37 2019 +0100\"" -o crc32crcgen.o crc32crcgen.c

arm-none-eabi-gcc main.o crc32crcgen.o -mcpu=cortex-m4 -mthumb
-D__CORTEX__ -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles
-L/.../ethernut/nutinstall-fpm_01b -Wl,--defsym=ccm_length=0
-Wl,--defsym=ram1_length=0 -Wl,--defsym=ram2_length=0 -Wl,--trace
-Wl,--defsym=flash0_size=0x8000 -L../../libsodium/lib -Wl,--start-group
/.../ethernut/nutinstall-fpm_01b/nutinit.o -lnutpro -lnutnet -lnutfs
-lnutos -lnutgorp -lnutcrt -lnutdev -lnutarch -lm -lsodium -lnutc
-Wl,--end-group -o tiva_ethloader.elf

I tried all library options, but with no change. In fact, I can't even
see a difference in the command lines. What are these settings supposed
to do? Except for the debug option of course, this works and causes an
increase in code size.



More information about the En-Nut-Discussion mailing list