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,WEIRD_PORT autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ravenscar and context switching for Cortex-M4 Date: Fri, 20 Feb 2015 13:05:46 +0000 Organization: A noiseless patient Spider Message-ID: References: <27492d6c-3bf8-4eb9-8ebb-4d9f621235eb@googlegroups.com> <247a5033-337c-4bf9-8b37-c82759d8a2dd@googlegroups.com> <87ioexzk9b.fsf@theworld.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="4eba6dd55c03f4a8d448cad2a88d67ef"; logging-data="19758"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Nxds4WGw5WPId656GPdSEUVO30tWsJYo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) Cancel-Lock: sha1:WLMgUiSqam+dnT5Pn0+KALuluUU= sha1:iprzXsCtQLQl27xil2z+Xm0el/Q= Xref: number.nntp.giganews.com comp.lang.ada:192300 Date: 2015-02-20T13:05:46+00:00 List-Id: Bob Duff writes: > Patrick Noffke writes: > >> Thank you for all this! It helps a lot. I didn't know about -gnatdg >> -- very useful. > > Also try -gnatDG. -gnatG ? According to gnatmake -h, -gnatD Debug expanded generated code (max line length = 72) -gnatDnn Debug expanded generated code (max line length = nn) and (GCC 4.9.1; not GNAT GPL 2014 or GCC 5.0.0) both -gnatD and -gnatDG resulted in buttons.adb:1071:07: violation of restriction "No_Implicit_Heap_Allocations" buttons.adb:1071:07: from profile "Ravenscar" at system.ads:41 where (a) buttons.adb is nowhere like that long, and (b) I don't see anything at that line in the output of -gnatdg or -gnatG to trigger the error. Mind you, there is something very odd about that restriction; I had to restate the restriction at the start of buttons.adb to prevent GCC 4.9.1 and GNAT GPL 2014 thinking that it was violated. https://sourceforge.net/p/stm32f4-gnat-rts/tickets/11/