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.152.196 with SMTP id a187mr9520925ioe.38.1510437956594; Sat, 11 Nov 2017 14:05:56 -0800 (PST) X-Received: by 10.157.51.119 with SMTP id u52mr555078otd.6.1510437956472; Sat, 11 Nov 2017 14:05:56 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!m191no791776itg.0!news-out.google.com!x87ni2514ita.0!nntp.google.com!m191no791774itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 11 Nov 2017 14:05:56 -0800 (PST) In-Reply-To: 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 References: <16ddffcb-6ee7-418e-a61a-fe8ef1c583c2@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to create a GPR project for ARM Cortex? From: =?UTF-8?B?Sm9oYW4gU8O2ZGVybGluZCDDhXN0csO2bQ==?= Injection-Date: Sat, 11 Nov 2017 22:05:56 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 3588 X-Received-Body-CRC: 2808666297 Xref: feeder.eternal-september.org comp.lang.ada:48826 Date: 2017-11-11T14:05:56-08:00 List-Id: Thanks it is working now. project Default is for Languages use ("c", "asm"); 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"; package Naming is for Spec_Suffix ("c") use ".h"; for Body_Suffix ("c") use ".c"; for Body_Suffix ("asm") use ".s"; end Naming; package Ide is for Gnat use "arm-eabi-gnat"; for Gnatlist use "arm-eabi-gnatls"; for Debugger_Command use "arm-eabi-gdb"; end Ide; package Builder is for Default_Switches ("c") use ( "-lm", "-lgcc", "-lc", "-mcpu=cortex-m0", "-mthumb", "-Og", "-Wall", "-fdata-sections", "-ffunction-sections", "-g", "-gdwarf-2", "-MMD", "-MP", "-f", "-MF""build/main.d""", "-MT""build/main.d""", --"-Wa,-a,-ad,-alms=""build/main.lst""", "" ); for Default_Switches ("asm") use ( "-x", "-lnosys", "-lm", "-lgcc", "-lc", "-mcpu=cortex-m0", "-mthumb", "-Og", "-Wall", "-fdata-sections", "-ffunction-sections", "-g", "-gdwarf-2", "-MMD", "-MP", "-f" ); end Builder; package Compiler is end Compiler; package Linker is for Default_Switches ("c") use ( "-nostartfiles", "-nodefaultlibs", "-TC:/Users/Johan/Documents/B-L072Z-LRWAN1_Ada/src/STM32L072CZEx_FLASH.ld", --"-Tsrc/STM32L072CZEx_FLASH.ld", --"-Wl,-Map=build/main.map,--cref", "-Wl,--gc-sections", --"-o main.elf", "" ); end Linker; end Default; I have this shell script: set -x #echo on gprbuild default.gpr arm-eabi-objcopy -O binary -S bin/main bin/main.bin cp bin/main.bin E:/ My board can run a simple blink program. "-nostartfiles" removes "crt0.o". "-Tsrc/STM32L072CZEx_FLASH.ld" relative path does not work. "-Wl,-Map=build/main.map,--cref" does not work. "-Wa,-a,-ad,-alms=""build/main.lst""" does not work. "-o main.elf" does not work. I have not tried gdb debugger or language Ada yet.