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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada in command / control systems Date: Tue, 26 Feb 2019 23:09:19 +0000 Organization: A noiseless patient Spider Message-ID: References: <2199b15b-d704-403f-a6c4-00fab29792d5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="0489db2086a5caf8946d45a2d36b2371"; logging-data="19012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z6PgcuyzfAHkwDMzR8I8Gx8ppERjMeAg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cancel-Lock: sha1:LYotGZ0FzuEtIOQ/g00Z8YMeoIQ= sha1:fhByFY7FP/A7hkY6fb8I6gtR+yg= Xref: reader01.eternal-september.org comp.lang.ada:55681 Date: 2019-02-26T23:09:19+00:00 List-Id: lyttlec writes: > The "use linker script" part is where I am having difficulty with gnat > targeting a PC. Haven't tried the STM32F4 yet. > All I've found so far, including tutorial on AdaCore, apply only to > Windows and produce errors in Linux. For example the advice to use > "-Xlinker -Wl --stack = ..." is Windows only. gnatbind (try --help to get the full set of options) has these, which might help. Bad idea to use these in a small MCU. -dnn[k|m] Default primary stack size = nn [kilo|mega] bytes -Dnn[k|m] Default secondary stack size = nn [kilo|mega] bytes > We may have to give up and switch back to using Makefile, which > probably isn't such a bad idea anyway. Don't see how this will help, you need to work out how to get the compiler, binder and linker to cooperate. I'm having a bit of trouble working out what you're trying to do. You seem to be targeting a wide range of platforms, from Linux to embedded MCUs. The need to control sizes etc is much less in a Unix-like environment, and I doubt very much you'd want to use EEPROM (do you mean that, by the way? MCUs seem to use Flash) or even bother to think about how the linker arranges things so that the program starts up properly. The same applies to more capable boards on the lines of the Raspberry Pi - just another Unix-like platform. But when it comes to MCUs like the STM32F4 with a megabyte of Flash and 128K of RAM (actually, there's another 64K of close-coupled RAM, I see) more care is needed. A lot of this will have been looked after by whoever provides your runtime.