From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.221.165 with SMTP id qf5mr32640703pac.30.1425402928252; Tue, 03 Mar 2015 09:15:28 -0800 (PST) X-Received: by 10.182.33.165 with SMTP id s5mr238723obi.0.1425402927956; Tue, 03 Mar 2015 09:15:27 -0800 (PST) Path: border1.nntp.dca1.giganews.com!nntp.giganews.com!hl2no3471375igb.0!news-out.google.com!qk8ni45613igc.0!nntp.google.com!hl2no3471368igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 3 Mar 2015 09:15:27 -0800 (PST) In-Reply-To: <07330c00-0317-4bb2-8ffb-67bff98dc9eb@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=74.203.194.21; posting-account=bXcJoAoAAAAWI5APBG37o4XwnD4kTuQQ NNTP-Posting-Host: 74.203.194.21 References: <07330c00-0317-4bb2-8ffb-67bff98dc9eb@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: GNAT stm34f4 zfp question. From: Patrick Noffke Injection-Date: Tue, 03 Mar 2015 17:15:28 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.giganews.com comp.lang.ada:192400 Date: 2015-03-03T09:15:27-08:00 List-Id: On Tuesday, March 3, 2015 at 3:20:16 AM UTC-6, jan.de...@gmail.com wrote: > On Tuesday, March 3, 2015 at 9:45:30 AM UTC+2, jan.de...@gmail.com wrote: >=20 > And I did find another anomaly: >=20 > /usr/gnat-arm/lib/gcc/arm-eabi/4.7.4/rts-zfp//adalib/libgnat.a(s-secsta.o= ): In function `system__secondary_stack__ss_allocate': > s-secsta.adb:(.text+0x8): undefined reference to `__gnat_get_secondary_st= ack' >=20 > I can alleviate the symptoms by employing a local s-secsta.adb from the a= uxiliary zfp tar file. >=20 >=20 >=20 > Without that the linker is looking for 'crt0.o'. I know what it is, but I= do not know where on earth it is to be found in the ravenscar profile. > There is a crti.o in the zfp profile. >=20 I had a linking issue with the ravenscar-sfp runtime. The linker was findi= ng the wrong libgnat.a or libgnarl.a (not the one from the specific RTS I w= as using). Once I specified the fully qualified path to those two librarie= s the linking problems were fixed. Here is my final linking command in my own Makefile: @$(CC) --RTS=3D$(RTS) $(LD_FLAGS) -Wl,--gc-sections -nostdinc -nodefaultli= bs -nostartfiles -T$(LINKER_SCRIPT) -L$(RTS_INSTALL_DIR) $(OBJS) $(RTS_INST= ALL_DIR)/libgnat.a $(RTS_INSTALL_DIR)/libgnarl.a -lgcc -o $@ where LD_FLAGS :=3D -fmessage-length=3D0 -gnatA -mcpu=3Dcortex-m4 -mlittle-endian= -mfpu=3Dfpv4-sp-d16 -march=3Darmv7e-m -mfloat-abi=3Dhard -mthumb (This was for a Cortex-M4 MCU.) Pat