Groups | Search | Server Info | Login | Register
Groups > comp.arch.embedded > #32420
| From | Stefan Reuther <stefan.news@arcor.de> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: Improving build system |
| Date | 2025-05-14 18:06 +0200 |
| Message-ID | <1002m2a.2hg.1@stefan.msgid.phost.de> (permalink) |
| References | <vvvq5j$1lml0$1@dont-email.me> |
Am 13.05.2025 um 17:57 schrieb pozz: > How do you choose toolchain in Makefile? I think one trick is using the > prefix. Usually arm-gcc is arm-none-eabi-gcc.exe, with "arm-none-eabi-" > prefix. Is there other approach? One idea that I found useful to get out of Makefile madness is to generate the build scripts. When you have your build scripts in another language that supports proper conditionals and subroutines, you have much more freedom in decisions you make. Also, things like out-of-tree builds are much easier to control; just spit out a list of "build $objdir/$file.o from $srcdir/$file.c" instead of making a pattern rule and hoping for the best. This is the idea behind Make replacements such as ninja, which has basically no decisionmaking logic built in (unlike Make, which has some that is awkward). If you overdo the concept of generating Makefiles, you probably end up with CMake. But normally, such a generator can be a simple, one-file script. But if the structure and feature-set of all your compilers is the same, just the names and options are different, you could also do something like: put all your build rules into 'rules.mk', make a 'atmel-arm-gnu-debug.mk' that sets all the variables and then does 'include rules.mk', and then build with 'make -f <config>.mk'. > I don't know if I could install arm-gcc in msys2 (I'm quite sure I can > install it in WSL), but for legacy projects I need to use the Atmel > Studio toolchain. How to call Atmel Studio arm toolchain installed in > > C:\Program Files > (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin > > from msys shell? Should I change the PATH and use arm-none-eabi- prefix? That would be personal preference. I have a slight preference of setting PATH and using a prefix, if I'm reasonably sure that the tools I'm going to use do not exist anywhere else on my path by accident. Stefan
Back to comp.arch.embedded | Previous | Next — Previous in thread | Find similar
Improving build system pozz <pozzugno@gmail.com> - 2025-05-13 17:57 +0200
Re: Improving build system Nicolas Paul Colin de Glocester <Spamassassin@irrt.De> - 2025-05-13 22:48 +0200
Re: Improving build system David Brown <david.brown@hesbynett.no> - 2025-05-14 11:03 +0200
Re: Improving build system George Neuner <gneuner2@comcast.net> - 2025-05-14 15:21 -0400
Re: Improving build system David Brown <david.brown@hesbynett.no> - 2025-05-15 09:48 +0200
Re: Improving build system Nioclás Pól Caileán de Ghloucester <Spamassassin@irrt.De> - 2025-07-04 18:38 +0200
Re: Improving build system pozz <pozzugno@gmail.com> - 2025-05-14 23:51 +0200
Re: Improving build system Nicolas Paul Colin de Glocester <Spamassassin@irrt.De> - 2025-05-15 01:00 +0200
Re: Improving build system David Brown <david.brown@hesbynett.no> - 2025-05-15 11:17 +0200
Re: Improving build system Nicolas Paul Colin de Glocester <Spamassassin@irrt.De> - 2025-05-16 12:21 +0200
Re: Improving build system David Brown <david.brown@hesbynett.no> - 2025-05-16 14:42 +0200
Re: Improving build system David Brown <david.brown@hesbynett.no> - 2025-05-15 11:03 +0200
Re: Improving build system pozz <pozzugno@gmail.com> - 2025-05-15 23:25 +0200
Re: Improving build system David Brown <david.brown@hesbynett.no> - 2025-05-16 11:12 +0200
Re: Improving build system pozz <pozzugno@gmail.com> - 2025-05-16 12:46 +0200
Re: Improving build system David Brown <david.brown@hesbynett.no> - 2025-05-16 15:30 +0200
Re: Improving build system pozz <pozzugno@gmail.com> - 2025-05-16 16:17 +0200
Re: Improving build system pozz <pozzugno@gmail.com> - 2025-05-16 15:45 +0200
Re: Improving build system David Brown <david.brown@hesbynett.no> - 2025-05-16 17:20 +0200
Re: Improving build system pozz <pozzugno@gmail.com> - 2025-05-17 10:56 +0200
Re: Improving build system Stefan Reuther <stefan.news@arcor.de> - 2025-05-14 18:06 +0200
csiph-web