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.13.204.198 with SMTP id o189mr14995343ywd.35.1471838446375; Sun, 21 Aug 2016 21:00:46 -0700 (PDT) X-Received: by 10.157.19.69 with SMTP id q5mr1047134otq.0.1471838446338; Sun, 21 Aug 2016 21:00:46 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!c52no10159291qte.1!news-out.google.com!d130ni42829ith.0!nntp.google.com!f6no11895194ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 21 Aug 2016 21:00:46 -0700 (PDT) In-Reply-To: <328fa4a3-6215-4101-835a-7eaf7ed72a8c@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:187:8100:ea06:416a:cd13:66f6:4131; posting-account=bO_2BwoAAACOSVlJSmplhh_hzrBSzyOY NNTP-Posting-Host: 2601:187:8100:ea06:416a:cd13:66f6:4131 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1d62cc93-324a-4c87-b9d3-67c24cb54c5f@googlegroups.com> Subject: Re: Inspirels Ada on cortex tutorial linker issue From: Devin Injection-Date: Mon, 22 Aug 2016 04:00:46 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:31493 Date: 2016-08-21T21:00:46-07:00 List-Id: 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 or you did not add the resulting noexceptionhandling.o to the linker invocation. > > Note that this is a symbol linking problem, not an Ada problem. That's why language tricks are not a proper solution. Interestingly, you might as well solve it outside of Ada, for example by compiling and linking in the following C code: > > void __aeabi_unwind_cpp_pr0(void) {} > void __aeabi_unwind_cpp_pr1(void) {} > > But the point of the tutorial was to demonstrate pure-Ada programming. :-) > > In any case, the *proper* solution is not to have these useless injections in the first place. The compiler should have an option for this. > > -- > Maciej Sobczak * http://www.inspirel.com 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