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, WEIRD_QUOTING autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.167.140 with SMTP id q134mr8757238ioe.22.1510427930711; Sat, 11 Nov 2017 11:18:50 -0800 (PST) X-Received: by 10.157.0.7 with SMTP id 7mr541375ota.14.1510427930567; Sat, 11 Nov 2017 11:18:50 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!l196no1262721itl.0!news-out.google.com!193ni4686iti.0!nntp.google.com!l196no1262720itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 11 Nov 2017 11:18:50 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.255.112.230; posting-account=NT38RwoAAAB4_OO_uw8yHtNaa9Hkjukk NNTP-Posting-Host: 83.255.112.230 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <16ddffcb-6ee7-418e-a61a-fe8ef1c583c2@googlegroups.com> Subject: How to create a GPR project for ARM Cortex? From: =?UTF-8?B?Sm9oYW4gU8O2ZGVybGluZCDDhXN0csO2bQ==?= Injection-Date: Sat, 11 Nov 2017 19:18:50 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: feeder.eternal-september.org comp.lang.ada:48823 Date: 2017-11-11T11:18:50-08:00 List-Id: I build programs on my stm32l0 using this script: arm-none-eabi-gcc -c -mcpu=3Dcortex-m0plus -mthumb -Og -Wall -fdata-section= s -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/main.d" -MT"build/mai= n.d" -Wa,-a,-ad,-alms=3Dbuild/main.lst src/main.c -o build/main.o arm-none-eabi-gcc -x assembler-with-cpp -c -mcpu=3Dcortex-m0plus -mthumb -O= g -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build= /startup_stm32l072xx.d" -MT"build/startup_stm32l072xx.d" src/startup_stm32l= 072xx.s -o build/startup_stm32l072xx.o arm-none-eabi-gcc build/startup_stm32l072xx.o build/main.o -mcpu=3Dcortex-m= 0plus -mthumb -specs=3Dnano.specs -Tsrc/STM32L072CZEx_FLASH.ld -lc -lm -ln= osys -Wl,-Map=3Dbuild/main.map,--cref -Wl,--gc-sections -o build/main.elf arm-none-eabi-objcopy -O ihex build/main.elf build/main.hex arm-none-eabi-objcopy -O binary -S build/main.elf build/main.bin cp build/main.bin E:/ I want to convert it to a GPR project so I created this: project Default is for Languages use ("c"); --for Languages use ("c, s"); for Source_Dirs use ("src"); for Object_Dir use "obj"; for Exec_Dir use "bin"; for Main use ("main.c"); for Target use "arm-eabi"; for Library_Support use "none"; =20 package Ide is for Gnat use "arm-eabi-gnat"; for Gnatlist use "arm-eabi-gnatls"; for Debugger_Command use "arm-eabi-gdb"; end Ide; =20 package Builder is for Default_Switches ("c") use ("-mcpu=3Dcortex-m0", "-mthumb", "-Og"= , "-Wall", "-fdata-sections", "-ffunction-sections", "-g", "-gdwarf-2", "-M= MD", "-MP", "-MF""build/main.d""", "-MT""build/main.d""", "-Wa,-a,-ad,-alms= =3Dbuild/main.lst"); end Builder; =20 package Compiler is for Default_Switches ("c") use ("-mcpu=3Dcortex-m0", "-mthumb", "-Og"= , "-Wall", "-fdata-sections", "-ffunction-sections", "-g", "-gdwarf-2", "-M= MD", "-MP", "-MF""build/main.d""", "-MT""build/main.d""", "-Wa,-a,-ad,-alms= =3Dbuild/main.lst"); end Compiler; =20 package Linker is for Linker_Options use ("-mcpu=3Dcortex-m0plus", "-mthumb", "-specs= =3Dnano.specs", "-Tsrc/STM32L072CZEx_FLASH.ld", "-lc", "-lm", "-lnosys", "-= Wl,-Map=3Dbuild/main.map,--cref", "-Wl,--gc-sections"); end Linker; =20 end Default; I got following result: c:/gnat/2017/bin/../lib/gcc/arm-eabi/6.3.1/../../../../arm-eabi/bin/ld.exe:= cannot find crt0.o: No such file or directory I got following result by using assembly language s: no compiler specified for language "s" I do not need crt0.o, how to remove that? Is it even possible to use ".s" or ".ld" files in a GPR project?