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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Inspirels Ada on cortex tutorial linker issue Date: Mon, 22 Aug 2016 11:37:22 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <24d4ffc3-3915-4102-96ae-68d11d881443@googlegroups.com> <2efe4d01-4cd4-4aea-bc54-98ea5f26ec8a@googlegroups.com> <2cf07aa6-9cbb-44bc-8042-601c57c85457@googlegroups.com> <328fa4a3-6215-4101-835a-7eaf7ed72a8c@googlegroups.com> <1d62cc93-324a-4c87-b9d3-67c24cb54c5f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 22 Aug 2016 11:37:22 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="da745e888d4a5182b5fda6212bbb0a63"; logging-data="32016"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8yCGZH6oN/tLwCNbqjszKbkKoy/+92n4=" User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT b8fc14e git.gnome.org/git/pan2) Cancel-Lock: sha1:u2AY6hEgABY2B7GJA/X5c12uEUY= Xref: news.eternal-september.org comp.lang.ada:31499 Date: 2016-08-22T11:37:22+00:00 List-Id: On Sun, 21 Aug 2016 21:00:46 -0700, Devin wrote: > On Sunday, August 21, 2016 at 10:38:12 AM UTC-4, Maciej Sobczak wrote: >> > I just added the code you provided directly after the Run procedure, >> > and it linked without error. I am confused as to why it would be >> > different from including it in a different file the way I did. >> >> Let me guess - you did not compile the noexceptionhandling.adb file ... > Ah, you knew the issue exactly, I did not even compile it. Now after > compiling, I was able to link and load it onto the board properly. > > It is nice to see the solution come from a pure Ada perspective as well. > I am very early in learning to write embedded firmware, and any > software in general, so I greatly appreciate your help. > > Devin It's not QUITE a pure Ada perspective (IMO) ... that would involve the Ada compiler system tracking and automatically compiling all necessary dependencies. That's what gnatmake or gprbuild do - where some languages require Makefiles or other out-of-the-language means to manage the dependencies. However in this case the dependency is injected by specific versions of the compiler, behind Ada's back so to speak, so the Ada compiler can't track it for you. Even if it's written in pure Ada, the separate compile and linking steps are still just a workaround until the compiler gets fixed. -- Brian