• Improving build system

    From pozz@pozzugno@gmail.com to comp.arch.embedded on Tue May 13 17:57:40 2025
    From Newsgroup: comp.arch.embedded

    As some of you remember, some weeks ago we had a discussion on the build system of an embedded project. I declared I usually use the graphical
    IDE released by silicon manufacturer (in my case, Atmel Studio and
    MCUXpresso IDE) and some of you suggested to improve this build system
    using a command line tool, such as the universal make. Better if used
    in Linux or Linux-based system, such as msys or WSL.

    I also declared I had many issues fine tuning a cross-platform Makefile
    that works in Windows and Linux-like shells at the same time and some of
    you suggested to use only WSL or msys, not Windows CMD shell.

    Recently I found some time to try again and I wrote a decent Makefile as
    a starting point. Now the command make, launched in a msys/mingw32
    shell, is able to build my project, at least a specific build
    configuration, what I name "simulator".

    My projects usually have multiple build configurations. A few for
    different models of the same device, such as LITE, NORMAL and FULL.
    Moreover, I have at least two different targets: embedded and simulator.
    The embedded target is the normal product, usually running on a Cortex-M
    or AVR8 MCU. The simulator target runs directly on Windows. I use it
    very often, because I found it's much faster and simpler to build native binaries and debug such processes. Of course, building a simulator needs
    a different compilers, such as msys2/mingw32 or WSL/gcc.
    I also have a DEBUG build configuration (target=embedded) useful for
    some debugging directly on the target (no watchdog, uart logging enabled
    and so on).

    So I could have 7 different build configurations: LITE|NORMAL|FULL for EMBEDDED|SIMULATOR plus DEBUG.

    I think it isn't difficult to change my Makefile to process commands of
    type:

    make CONFIG=LITE TARGET=embedded
    make CONFIG=FULL TARGET=simulator
    make CONFIG=DEBUG

    There are many compiler options that are common to all builds (-Wall,
    -std=c99 and so on). Some options are target specific (for example -DQUARTZ_FREQ_MHZ=16 -Isrc/ports/avr8 for embedded or
    -Isrc/ports/mingw32 for simulator).

    I could generate the correct options by using ifeq() in Makefile.

    How to choose the correct toolchain? Embedded target needs arm-gcc
    toolchain, for example in

    C:\Program Files
    (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin

    while simulator targets needs simply gcc.

    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?

    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?

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Nicolas Paul Colin de Glocester@Spamassassin@irrt.De to comp.arch.embedded on Tue May 13 22:48:37 2025
    From Newsgroup: comp.arch.embedded

    On Tue, 13 May 2025, pozz wrote:
    "[. . .]

    How to choose the correct toolchain? Embedded target needs arm-gcc toolchain, for example in

    C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin

    while simulator targets needs simply gcc.

    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?

    [. . .]
    [. . .] Should I change the PATH and use arm-none-eabi- prefix?"


    Buona sera!

    Did you consider the technique of assigning a concrete compiler to an
    abstract compiler varaible in a Makefile like many projects do? For
    example from
    checkmate-0.20/libgnugetopt-1.2/Makefile
    . . .

    # Makefile.in generated by automake 1.15 from Makefile.am.
    # libgnugetopt-1.2/Makefile. Generated from Makefile.in by configure.

    # Copyright (C) 1994-2014 Free Software Foundation, Inc.

    # This Makefile.in is free software; the Free Software Foundation
    # gives unlimited permission to copy and/or distribute it,
    # with or without modifications, as long as this notice is preserved.

    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
    # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    # PARTICULAR PURPOSE.

    [. . .]

    [. . .]
    COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    [. . .]
    CC = gcc
    [. . .]
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Wed May 14 11:03:56 2025
    From Newsgroup: comp.arch.embedded

    On 13/05/2025 17:57, pozz wrote:
    As some of you remember, some weeks ago we had a discussion on the build system of an embedded project.  I declared I usually use the graphical
    IDE released by silicon manufacturer (in my case, Atmel Studio and MCUXpresso IDE) and some of you suggested to improve this build system
    using a command line tool, such as the universal make.  Better if used
    in Linux or Linux-based system, such as msys or WSL.

    I also declared I had many issues fine tuning a cross-platform Makefile
    that works in Windows and Linux-like shells at the same time and some of
    you suggested to use only WSL or msys, not Windows CMD shell.

    Recently I found some time to try again and I wrote a decent Makefile as
    a starting point.  Now the command make, launched in a msys/mingw32
    shell, is able to build my project, at least a specific build
    configuration, what I name "simulator".

    My projects usually have multiple build configurations. A few for
    different models of the same device, such as LITE, NORMAL and FULL.
    Moreover, I have at least two different targets: embedded and simulator.
    The embedded target is the normal product, usually running on a Cortex-M
    or AVR8 MCU. The simulator target runs directly on Windows. I use it
    very often, because I found it's much faster and simpler to build native binaries and debug such processes. Of course, building a simulator needs
    a different compilers, such as msys2/mingw32 or WSL/gcc.
    I also have a DEBUG build configuration (target=embedded) useful for
    some debugging directly on the target (no watchdog, uart logging enabled
    and so on).

    So I could have 7 different build configurations: LITE|NORMAL|FULL for EMBEDDED|SIMULATOR plus DEBUG.

    I think it isn't difficult to change my Makefile to process commands of type:

       make CONFIG=LITE TARGET=embedded
       make CONFIG=FULL TARGET=simulator
       make CONFIG=DEBUG

    There are many compiler options that are common to all builds (-Wall, -std=c99 and so on).  Some options are target specific (for example -DQUARTZ_FREQ_MHZ=16 -Isrc/ports/avr8 for embedded or
    -Isrc/ports/mingw32 for simulator).

    I could generate the correct options by using ifeq() in Makefile.

    How to choose the correct toolchain? Embedded target needs arm-gcc toolchain, for example in

      C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin

    while simulator targets needs simply gcc.

    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?

    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?


    You are asking a lot of questions here. They are good questions, but it
    would be a very long post if I tried to answer them all fully. So
    instead, I will try to give a few hints and suggestions that you can
    take further. I'll put numbers on them in case you want to reference
    them in replies.

    1.

    Windows path naming is insane. Fortunately, you can almost always
    override it. Whenever you install any serious program in Windows,
    especially if you ever want to refer to it from the command line, batch
    files, makefiles, etc., avoid names with spaces or "awkward" characters.
    I recommend making top-level directories like "progs" or "compilers"
    and putting the tools in there as appropriate. This also makes it
    vastly easier to copy tools to other machines. And since you should
    never upgrade your toolchains - merely add new versions to your
    collection, in separate directories - it is easier if they are better organised.


    2.

    You don't need to use bash or other *nix shells for makefile or other
    tools if you don't want to. When I do builds on Windows, I run "make"
    from a normal command line (or from an editor / IDE). It is helpful to
    have msys2's usr/bin on your path so that make can use *nix command-line utilities like cp, mv, sed, etc. But if you want to make a minimal
    build system, you don't need a full msys2 installation - you only need
    the utilities you want to use, and they can be copied directly (unlike
    with Cygwin or WSL).

    Of course you /can/ use fuller shells if you want. But don't make your makefiles depend on that, as it will be harder to use them from IDEs,
    editors, or any other automation.

    And of course you will want an msys2/mingw64 (/not/ old mingw32) for
    native gcc compilation. Don't bother with WSL unless you actually need
    a fuller Linux system - and if you /do/ need that, dump the wasteful
    crap that is Windows and use Linux for your development. Build speeds
    will double on the same hardware. (In my testing, done a good while
    back, I did some comparisons of a larger build on different setups on
    the same PC, using native Windows build as the baseline. Native Linux
    builds were twice the speed. Running VirtualBox on Windows host, with a
    Linux virtual machine, or running VirtualBox on Linux with a Windows
    virtual machine, both beat native Windows solidly.)


    3.

    Makefiles can be split up. Use "include" - and remember that you can do
    so using macros. In my makefile setups, I have a file "host.mk" that is
    used to identify the build host, then pull in a file that is specific to
    the host:

    # This is is for identifying host computer to get the paths right

    ifeq ($(OS),Windows_NT)
    # We are on a Windows machine
    host_os := windows
    host := $(COMPUTERNAME)
    else
    # Linux machine
    host_os := linux
    host := $(shell hostname)
    endif

    ifeq "$(call file-exists,makes/host_$(host).mk)" "1"
    include makes/host_$(host).mk
    else
    $(error No host makefile host_$(host).mk found)
    endif

    Then I have files like "host_xxx.mk" for a computer named "xxx",
    containing things like :

    toolchain_path := /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/

    or

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/


    All paths to compilers and other build-related programs are specified in
    these files. The only things that are taken from the OS path are
    standard and common programs that do not affect the resulting binary files.


    Then I have a "commands.mk" file with things like :

    ATDEP := @

    toolchain_prefix := arm-none-eabi-

    CCDEP := $(ATDEP)$(toolchain_path)$(toolchain_prefix)gcc
    CC := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)gcc
    LD := $(AT)$(toolchain_path)$(toolchain_prefix)gcc
    OBJCOPY := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)objcopy
    OBJDUMP := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)dump
    SIZE := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)size


    Put CONFIG dependent stuff in "config_full.mk" and similar files. Put
    TARGET specific stuff in "target_simulator.mk". And so on. It makes it
    much easier to keep track of things, and you only need a few high-level "ifeq".


    Keep your various makefiles in a separate directory. Your project
    makefile is then clear and simple - much of it will be comments about
    usage (parameters like CONFIG).


    4.

    Generate dependency files, using the same compiler and the same include
    flags and -D flags as you have for the normal compilation, but with
    flags like -MM -MP -MT and -MF to make .d dependency files. Include
    them all in the makefile, using "-include" so that your makefile does
    not stop before they are generated.


    5.

    Keep your build directories neat, separate from all source directories,
    and mirroring the tree structure of the source files. So if you have a
    file "src/gui/main_window.c", and you are building with CONFIG=FULL TARGET=embedded, the object file generated should go in something akin
    to "builds/FULL/embedded/obj/src/gui/main_window.o". I like to have
    separate parts for obj (.o files), dep (.d files), and bin (linked
    binaries, map files, etc.). You could also mix .d and .o files in the
    same directory if you prefer.

    This means you can happily do incremental builds for all your
    configurations and targets, and don't risk mixing object files from
    different setups.


    6.

    Learn to use submakes. When you use plain "make" (or, more
    realistically, "make -j") to build multiple configurations, have each configuration spawned off in a separate submake. Then you don't need to
    track multiple copies of your "TARGET" macro in the same build - each
    submake has just one target, and one config.



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Stefan Reuther@stefan.news@arcor.de to comp.arch.embedded on Wed May 14 18:06:02 2025
    From Newsgroup: comp.arch.embedded

    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
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From George Neuner@gneuner2@comcast.net to comp.arch.embedded on Wed May 14 15:21:18 2025
    From Newsgroup: comp.arch.embedded

    On Wed, 14 May 2025 11:03:56 +0200, David Brown
    <david.brown@hesbynett.no> wrote:


    1.

    Windows path naming is insane. Fortunately, you can almost always
    override it. Whenever you install any serious program in Windows, >especially if you ever want to refer to it from the command line, batch >files, makefiles, etc., avoid names with spaces or "awkward" characters.
    I recommend making top-level directories like "progs" or "compilers"
    and putting the tools in there as appropriate. This also makes it
    vastly easier to copy tools to other machines. And since you should
    never upgrade your toolchains - merely add new versions to your
    collection, in separate directories - it is easier if they are better >organised.


    Just note that NTFS *does* have a limit on the number of entries in
    the root directory of the drive. Offhand, I don't recall what is the
    limit [for some reason 127 is stuck in my head] but note that the
    typical Windows installation has only about ~20 folders in C:\.

    Subdirectories, however, effectively are unlimited.

    A handful of extra folders in the drive root certainly will not cause
    any problem, but just don't try to install lots of software to
    separate folders directly under the drive root.



    2.

    You don't need to use bash or other *nix shells for makefile or other
    tools if you don't want to. When I do builds on Windows, I run "make"
    from a normal command line (or from an editor / IDE). It is helpful to
    have msys2's usr/bin on your path so that make can use *nix command-line >utilities like cp, mv, sed, etc. But if you want to make a minimal
    build system, you don't need a full msys2 installation - you only need
    the utilities you want to use, and they can be copied directly (unlike
    with Cygwin or WSL).

    A number of common Unix utilities are available as native Windows
    executables, so a POSIX environment like msys2 or mingw is not even
    needed [unless you want it for some other purpose, 8-) ].

    https://sourceforge.net/projects/unxutils/



    Of course you /can/ use fuller shells if you want. But don't make your >makefiles depend on that, as it will be harder to use them from IDEs, >editors, or any other automation.

    Also note that, on Windows, Powershell is able to launch programs much
    faster than CMD. [I don't know why, just that it does.]

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Wed May 14 23:51:26 2025
    From Newsgroup: comp.arch.embedded

    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]

    You are asking a lot of questions here.  They are good questions, but it would be a very long post if I tried to answer them all fully.  So
    instead, I will try to give a few hints and suggestions that you can
    take further.  I'll put numbers on them in case you want to reference
    them in replies.

    Ok, thank you very much for your time.


    1.

    Windows path naming is insane.  Fortunately, you can almost always
    override it.  Whenever you install any serious program in Windows, especially if you ever want to refer to it from the command line, batch files, makefiles, etc., avoid names with spaces or "awkward" characters.
     I recommend making top-level directories like "progs" or "compilers"
    and putting the tools in there as appropriate.  This also makes it
    vastly easier to copy tools to other machines.  And since you should
    never upgrade your toolchains - merely add new versions to your
    collection, in separate directories - it is easier if they are better organised.

    I know, but not all software installers work well if you change their
    default installation path. When it comes to stupid and big IDEs (such
    as Atmel/Microchip Studio), I prefer to avoid changing the default installation path (C:\Program Files (x86)\Atmel...) to avoid other
    obscure issues.
    It is already a miracle if that software runs without problems with the default installation path. I don't want to imagine what happens if I
    changed it.

    Anyway until now I didn't find issues with spaces. Even in msys2 shell
    I can use "/c/Program\ Files\ (x86)/...".

    The other IDE I use is MCUXpresso. It is Eclipse based so I installed
    it in c:\ without any temptations.


    2.

    You don't need to use bash or other *nix shells for makefile or other
    tools if you don't want to.  When I do builds on Windows, I run "make"
    from a normal command line (or from an editor / IDE).  It is helpful to have msys2's usr/bin on your path so that make can use *nix command-line utilities like cp, mv, sed, etc.  But if you want to make a minimal
    build system, you don't need a full msys2 installation - you only need
    the utilities you want to use, and they can be copied directly (unlike
    with Cygwin or WSL).

    Of course you /can/ use fuller shells if you want.  But don't make your makefiles depend on that, as it will be harder to use them from IDEs, editors, or any other automation.

    In the beginning (some years ago) I started installing GNU Make for
    Windows, putting it in c:\tools\make. Then I created a simple Makefile
    and tried to process it on a standard Windows command line. It was a
    mess! I remember there were many issues regarding: slash/backslash on
    file paths, lack of Unix commands (rm, mv, ...) and so on. Native
    Windows tools need backslash in the paths, but some unix tools need
    slash. It was a mess to transform the paths between the two forms.

    After this attempt, I gave up. I thought it was much better to use the
    IDE and build system suggested by the MCU manufacturer.

    Now I'm trying a Unix shell in Windows (msys, WSL or even the bash
    installed with git) and it seems many issues I had are disappearing.


    And of course you will want an msys2/mingw64 (/not/ old mingw32) for
    native gcc compilation.

    The goal of the simulator is to detect problems on the software that
    runs directly on Windows, without flashing, debug probes and so on. I increased my productivity a lot when I started this approach.

    Obviously, the software running on Windows (the simulator) should be
    very similar to the sofware running on the embedded target. Cortex-M
    MCUs are 32-bits so I thought it should be better to use a 32-bits
    compiler even for the simulator.

    Moreover, I think many issues aries on a 64-bits compilation, for
    example static allocated buffers that would be too small on a 64-bits platforms. Or some issues on serializers.


    Don't bother with WSL unless you actually need
    a fuller Linux system - and if you /do/ need that, dump the wasteful
    crap that is Windows and use Linux for your development.  Build speeds
    will double on the same hardware.  (In my testing, done a good while
    back, I did some comparisons of a larger build on different setups on
    the same PC, using native Windows build as the baseline.  Native Linux builds were twice the speed.  Running VirtualBox on Windows host, with a Linux virtual machine, or running VirtualBox on Linux with a Windows
    virtual machine, both beat native Windows solidly.)

    I completely agree with you. At the moment msys2 seems ok.


    3.

    Makefiles can be split up.  Use "include" - and remember that you can do
    so using macros.  In my makefile setups, I have a file "host.mk" that is used to identify the build host, then pull in a file that is specific to
    the host:

    # This is is for identifying host computer to get the paths right

    ifeq ($(OS),Windows_NT)
      # We are on a Windows machine
      host_os := windows
      host := $(COMPUTERNAME)
    else
      # Linux machine
      host_os := linux
      host := $(shell hostname)
    endif

    ifeq "$(call file-exists,makes/host_$(host).mk)" "1"
      include makes/host_$(host).mk
    else
      $(error No host makefile host_$(host).mk found)
    endif

    Then I have files like "host_xxx.mk" for a computer named "xxx",
    containing things like :

    toolchain_path := /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/

    or

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/


    All paths to compilers and other build-related programs are specified in these files.  The only things that are taken from the OS path are
    standard and common programs that do not affect the resulting binary files.

    It is an interesting and uncommon (at least for me) approach.

    What happens if multiple developers work on the same repository? Are
    they forced to create a host_xxx.mk for all their development machines?
    Should the host_xxx.mk files be added to the repository?

    I guess the only goal of host_xxx.mk is to avoid changing PATH before
    make. Why don't you like setting the PATH according to the project
    you're working on?


    Then I have a "commands.mk" file with things like :

    ATDEP := @

    toolchain_prefix := arm-none-eabi-

    CCDEP := $(ATDEP)$(toolchain_path)$(toolchain_prefix)gcc
    CC := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)gcc
    LD := $(AT)$(toolchain_path)$(toolchain_prefix)gcc
    OBJCOPY := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)objcopy
    OBJDUMP := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)dump
    SIZE := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)size


    Put CONFIG dependent stuff in "config_full.mk" and similar files.  Put TARGET specific stuff in "target_simulator.mk".  And so on.  It makes it much easier to keep track of things, and you only need a few high-level "ifeq".


    Keep your various makefiles in a separate directory.  Your project
    makefile is then clear and simple - much of it will be comments about
    usage (parameters like CONFIG).

    Yes, splitting makefiles is a good suggestion.


    4.

    Generate dependency files, using the same compiler and the same include flags and -D flags as you have for the normal compilation, but with
    flags like -MM -MP -MT and -MF to make .d dependency files.  Include
    them all in the makefile, using "-include" so that your makefile does
    not stop before they are generated.

    I have to admit that ChatGPT helped me to create the Makefile. The
    CFLAGS include -MMD and -MP and at the end I have

    -include $(DEP_FILES)

    Of course, DEP_FILES are:

    DEP_FILES := $(OBJ_FILES:.o=.d)

    Sincerely I don't know if it is good, but I tried to change an include
    file and related C files are compiled again as expected (so I think the dependency are correctly managed).

    There's a thing that doesn't work. If I change the Makefile itsel, for example changing CFLAGS adding a new compiler option, I need to manually invoke a clean.


    5.

    Keep your build directories neat, separate from all source directories,
    and mirroring the tree structure of the source files.  So if you have a file "src/gui/main_window.c", and you are building with CONFIG=FULL TARGET=embedded, the object file generated should go in something akin
    to "builds/FULL/embedded/obj/src/gui/main_window.o".  I like to have separate parts for obj (.o files), dep (.d files), and bin (linked
    binaries, map files, etc.).  You could also mix .d and .o files in the
    same directory if you prefer.

    This means you can happily do incremental builds for all your
    configurations and targets, and don't risk mixing object files from different setups.

    Yes, perfectly agreed.


    6.

    Learn to use submakes.  When you use plain "make" (or, more
    realistically, "make -j") to build multiple configurations, have each configuration spawned off in a separate submake.  Then you don't need to track multiple copies of your "TARGET" macro in the same build - each submake has just one target, and one config.

    I don't think I got the point. Now I invoke the build of a single build configuration. Are you talking about running make to build multiple configurations at the same time?
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Nicolas Paul Colin de Glocester@Spamassassin@irrt.De to comp.arch.embedded on Thu May 15 01:00:52 2025
    From Newsgroup: comp.arch.embedded

    Buona sera!

    On Wed, 14 May 2025, pozz wrote:
    "[. . .] When it comes to stupid and big IDEs [. . .]
    [. . .]
    It is already a miracle if that software runs without problems with the default installation path. I don't want to imagine what happens if I changed it."


    If these IDEs would not be trustworthy, then you would need to buy good alternatives.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Thu May 15 09:48:01 2025
    From Newsgroup: comp.arch.embedded

    On 14/05/2025 21:21, George Neuner wrote:
    On Wed, 14 May 2025 11:03:56 +0200, David Brown
    <david.brown@hesbynett.no> wrote:


    1.

    Windows path naming is insane. Fortunately, you can almost always
    override it. Whenever you install any serious program in Windows,
    especially if you ever want to refer to it from the command line, batch
    files, makefiles, etc., avoid names with spaces or "awkward" characters.
    I recommend making top-level directories like "progs" or "compilers"
    and putting the tools in there as appropriate. This also makes it
    vastly easier to copy tools to other machines. And since you should
    never upgrade your toolchains - merely add new versions to your
    collection, in separate directories - it is easier if they are better
    organised.


    Just note that NTFS *does* have a limit on the number of entries in
    the root directory of the drive. Offhand, I don't recall what is the
    limit [for some reason 127 is stuck in my head] but note that the
    typical Windows installation has only about ~20 folders in C:\.

    Subdirectories, however, effectively are unlimited.

    A handful of extra folders in the drive root certainly will not cause
    any problem, but just don't try to install lots of software to
    separate folders directly under the drive root.


    I am not suggesting that he put all the tools directly in the root
    folder! But it is a good idea to put programs you want to find in a
    sane hierarchy. Exactly how any one person wants to organise this will
    vary - you might want to have IDE's separate from compiler toolchains,
    and you might want "c:\compilers" to have subdirectories for "arm",
    "avr", "msp430", or whatever - that's all up to the individual to find
    the best solution for them.



    2.

    You don't need to use bash or other *nix shells for makefile or other
    tools if you don't want to. When I do builds on Windows, I run "make" >>from a normal command line (or from an editor / IDE). It is helpful to
    have msys2's usr/bin on your path so that make can use *nix command-line
    utilities like cp, mv, sed, etc. But if you want to make a minimal
    build system, you don't need a full msys2 installation - you only need
    the utilities you want to use, and they can be copied directly (unlike
    with Cygwin or WSL).

    A number of common Unix utilities are available as native Windows executables, so a POSIX environment like msys2 or mingw is not even
    needed [unless you want it for some other purpose, 8-) ].

    https://sourceforge.net/projects/unxutils/


    Indeed, there have been many sources of that kind of program over the
    years. Most are made as mingw or mingw64 compilations, just like you
    get in msys or msys2. These days, however, I would recommend msys2 as
    the easiest and best solution - it has the most flexibility, and you
    rarely need to be concerned about using more disk space than absolutely necessary.



    Of course you /can/ use fuller shells if you want. But don't make your
    makefiles depend on that, as it will be harder to use them from IDEs,
    editors, or any other automation.

    Also note that, on Windows, Powershell is able to launch programs much
    faster than CMD. [I don't know why, just that it does.]


    Powershell can definitely do some things better than the old command
    shell. My intention is that a makefile should not be dependent on the
    shell or environment to run correctly.

    (My guess about the speed difference is that the old command shell is
    probably slower at IO for displaying the output, especially if you have "noisy" builds.)


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Thu May 15 11:03:48 2025
    From Newsgroup: comp.arch.embedded

    On 14/05/2025 23:51, pozz wrote:
    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]

    You are asking a lot of questions here.  They are good questions, but
    it would be a very long post if I tried to answer them all fully.  So
    instead, I will try to give a few hints and suggestions that you can
    take further.  I'll put numbers on them in case you want to reference
    them in replies.

    Ok, thank you very much for your time.


    1.

    Windows path naming is insane.  Fortunately, you can almost always
    override it.  Whenever you install any serious program in Windows,
    especially if you ever want to refer to it from the command line,
    batch files, makefiles, etc., avoid names with spaces or "awkward"
    characters.   I recommend making top-level directories like "progs" or
    "compilers" and putting the tools in there as appropriate.  This also
    makes it vastly easier to copy tools to other machines.  And since you
    should never upgrade your toolchains - merely add new versions to your
    collection, in separate directories - it is easier if they are better
    organised.

    I know, but not all software installers work well if you change their default installation path.  When it comes to stupid and big IDEs (such
    as Atmel/Microchip Studio), I prefer to avoid changing the default installation path (C:\Program Files (x86)\Atmel...) to avoid other
    obscure issues.

    Almost all of them work fine in different directories (and indeed
    different drives). First assume they work - only fall back on the
    crappy defaults if there is no other option.

    Of course, the best answer is to avoid any tool made by Microchip - they
    are the worst of the bunch. (Atmel was always a bit behind in second
    place for the title of worst toolchain supplier, but Microchip has
    gradually integrated them.) I have many fine things to say about
    Microchip and Atmel as hardware suppliers, but I make a point of
    avoiding their microcontrollers because of their tools.

    My strong preference - regardless of the manufacturer - is to use the ARM-supplied gcc toolchains (for ARM microcontrollers, obviously) rather
    than the usually older tools supplied by manufacturers.

    It is already a miracle if that software runs without problems with the default installation path.  I don't want to imagine what happens if I changed it.

    Anyway until now I didn't find issues with spaces.  Even in msys2 shell
    I can use "/c/Program\ Files\ (x86)/...".

    It usually works - but that does not stop it being a PITA and an insane
    choice of pathnames.

    Still, you have to find what works best for you - I am giving
    recommendations and suggestions, not a unique solution or single
    "correct" answer.


    The other IDE I use is MCUXpresso.  It is Eclipse based so I installed
    it in c:\ without any temptations.


    Yes, that has always worked for me.

    (Of course I normally have it on Linux, rather than Windows, and most manufacturer-supplied software uses a sensible default path - in /opt or
    in /usr/local.)



    2.

    You don't need to use bash or other *nix shells for makefile or other
    tools if you don't want to.  When I do builds on Windows, I run "make"
    from a normal command line (or from an editor / IDE).  It is helpful
    to have msys2's usr/bin on your path so that make can use *nix
    command-line utilities like cp, mv, sed, etc.  But if you want to make
    a minimal build system, you don't need a full msys2 installation - you
    only need the utilities you want to use, and they can be copied
    directly (unlike with Cygwin or WSL).

    Of course you /can/ use fuller shells if you want.  But don't make
    your makefiles depend on that, as it will be harder to use them from
    IDEs, editors, or any other automation.

    In the beginning (some years ago) I started installing GNU Make for
    Windows, putting it in c:\tools\make.  Then I created a simple Makefile
    and tried to process it on a standard Windows command line.  It was a mess!  I remember there were many issues regarding: slash/backslash on
    file paths, lack of Unix commands (rm, mv, ...) and so on.  Native
    Windows tools need backslash in the paths, but some unix tools need
    slash.  It was a mess to transform the paths between the two forms.


    Most tools on Windows are happy with forward slash for path separators
    as well. Certainly everything that is originally a *nix tool will be
    fine with that.

    Of course if you have a makefile that uses commands like "rm" and you
    don't have them on your path, and don't specify the path in the
    makefile, then it won't work. This is why the norm in advanced
    makefiles is to use macros for these things :

    # Put this in the host-specific file, with blank for no path needed
    bin_path :=

    # Use this instead of "rm".
    RM := $(bin_path) rm


    After this attempt, I gave up.  I thought it was much better to use the
    IDE and build system suggested by the MCU manufacturer.


    For most IDEs, the build system is "make". But the IDE generates the makefiles - slowly for big projects, and usually overly simplistic with
    far too limited options.

    But IDE's are certainly much easier for getting started. On new
    projects, or new devices, I will often use the IDE to get going and then
    move it over to an independent makefile. (And I'll often continue to
    use the IDE after that as a solid editor and debugger - IDE's are
    generally happy with external makefiles.)

    Now I'm trying a Unix shell in Windows (msys, WSL or even the bash
    installed with git) and it seems many issues I had are disappearing.


    And of course you will want an msys2/mingw64 (/not/ old mingw32) for
    native gcc compilation.

    The goal of the simulator is to detect problems on the software that
    runs directly on Windows, without flashing, debug probes and so on.  I increased my productivity a lot when I started this approach.

    Obviously, the software running on Windows (the simulator) should be
    very similar to the sofware running on the embedded target.  Cortex-M
    MCUs are 32-bits so I thought it should be better to use a 32-bits
    compiler even for the simulator.


    mingw-w64 can happily generate 32-bit Windows executables. IIRC you
    just use the "-m32" flag. It is significantly better than old mingw in
    a number of ways - in particular it has vastly better standard C library support.

    Moreover, I think many issues aries on a 64-bits compilation, for
    example static allocated buffers that would be too small on a 64-bits platforms.  Or some issues on serializers.


    Don't bother with WSL unless you actually need a fuller Linux system -
    and if you /do/ need that, dump the wasteful crap that is Windows and
    use Linux for your development.  Build speeds will double on the same
    hardware.  (In my testing, done a good while back, I did some
    comparisons of a larger build on different setups on the same PC,
    using native Windows build as the baseline.  Native Linux builds were
    twice the speed.  Running VirtualBox on Windows host, with a Linux
    virtual machine, or running VirtualBox on Linux with a Windows virtual
    machine, both beat native Windows solidly.)

    I completely agree with you.  At the moment msys2 seems ok.


    3.

    Makefiles can be split up.  Use "include" - and remember that you can
    do so using macros.  In my makefile setups, I have a file "host.mk"
    that is used to identify the build host, then pull in a file that is
    specific to the host:

    # This is is for identifying host computer to get the paths right

    ifeq ($(OS),Windows_NT)
       # We are on a Windows machine
       host_os := windows
       host := $(COMPUTERNAME)
    else
       # Linux machine
       host_os := linux
       host := $(shell hostname)
    endif

    ifeq "$(call file-exists,makes/host_$(host).mk)" "1"
       include makes/host_$(host).mk
    else
       $(error No host makefile host_$(host).mk found)
    endif

    Then I have files like "host_xxx.mk" for a computer named "xxx",
    containing things like :

    toolchain_path := /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/

    or

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/


    All paths to compilers and other build-related programs are specified
    in these files.  The only things that are taken from the OS path are
    standard and common programs that do not affect the resulting binary
    files.

    It is an interesting and uncommon (at least for me) approach.

    What happens if multiple developers work on the same repository?  Are
    they forced to create a host_xxx.mk for all their development machines? Should the host_xxx.mk files be added to the repository?

    Yes, that is /exactly/ what you do. It also applies to a single
    developer using multiple different machines. For any long-term project,
    you want to be sure you can check out the repository, do a clean build,
    and get an identical binary from more than one machine. Having
    individual "host_XXX.mk" files means that the build adapts automatically
    to the machine. What you don't want is each developer making changes to
    a single makefile so that it works on their machine - and then either
    not checking in the changes, or checking them in and messing things up
    for someone else.


    I guess the only goal of host_xxx.mk is to avoid changing PATH before make.  Why don't you like setting the PATH according to the project
    you're working on?


    No, that is not the only goal - there can be many differences between machines. For example, I usually have ccache on my Linux systems but it
    is rare to have it on (native) Windows systems - thus that can be
    enabled or disabled in a host_xxx.mk file. Some machines might also
    support building the documentation, or running a simulator, or signing binaries.

    Setting the path would be an extra complication of no benefit, but a significant source of risk or error. How do you make sure your IDE is
    using the right PATH settings before it runs "make"? How do you deal
    with multiple projects - do you keep swapping PATHs? (I usually have a half-dozen projects "open" at a time, in different workspaces on my
    Linux machine.) Do you now have a makefile and a separate path-setting
    batch file or shell script that you need to run before doing a project
    build? How do you handle things when you install some new Windows
    program that messes with your path?

    It is /vastly/ simpler and safer to put the paths to the binaries in a
    couple of macros in your makefile(s). It also gives clear and
    unequivocal documentation of the tools you need - if your makefile has
    this line :

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/

    then there is never any doubt as to exactly which toolchain is used for
    the project.


    Then I have a "commands.mk" file with things like :

    ATDEP := @

    toolchain_prefix := arm-none-eabi-

    CCDEP := $(ATDEP)$(toolchain_path)$(toolchain_prefix)gcc
    CC := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)gcc
    LD := $(AT)$(toolchain_path)$(toolchain_prefix)gcc
    OBJCOPY := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)objcopy
    OBJDUMP := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)dump
    SIZE := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)size


    Put CONFIG dependent stuff in "config_full.mk" and similar files.  Put
    TARGET specific stuff in "target_simulator.mk".  And so on.  It makes
    it much easier to keep track of things, and you only need a few
    high-level "ifeq".


    Keep your various makefiles in a separate directory.  Your project
    makefile is then clear and simple - much of it will be comments about
    usage (parameters like CONFIG).

    Yes, splitting makefiles is a good suggestion.


    4.

    Generate dependency files, using the same compiler and the same
    include flags and -D flags as you have for the normal compilation, but
    with flags like -MM -MP -MT and -MF to make .d dependency files.
    Include them all in the makefile, using "-include" so that your
    makefile does not stop before they are generated.

    I have to admit that ChatGPT helped me to create the Makefile.  The
    CFLAGS include -MMD and -MP and at the end I have

      -include $(DEP_FILES)

    Of course, DEP_FILES are:

      DEP_FILES := $(OBJ_FILES:.o=.d)


    That's a good start. There are quite a few articles and blog posts
    about automatic generation of makefile dependencies that can be worth
    reading.

    Sincerely I don't know if it is good, but I tried to change an include
    file and related C files are compiled again as expected (so I think the dependency are correctly managed).

    There's a thing that doesn't work.  If I change the Makefile itsel, for example changing CFLAGS adding a new compiler option, I need to manually invoke a clean.


    depfiles_src := $(cfiles:.c=.d) $(cppfiles:.cpp=.d)
    depfiles := $(addprefix $(dep_dir),$(patsubst ../%,%,$(depfiles_src)))

    -include $(depfiles)

    alldepends := makefile $(wildcard makes/*.mk)
    all : $(alldepends) $(depfiles)
    depends : $(alldepends)

    # "depends" target just makes dep files
    depends : $(depfiles)
    @echo Updated dependencies


    Vary according to your needs. But basically, if something has
    $(alldepends) in its dependency list, it will be rebuild if one of your makefiles changes.


    5.

    Keep your build directories neat, separate from all source
    directories, and mirroring the tree structure of the source files.  So
    if you have a file "src/gui/main_window.c", and you are building with
    CONFIG=FULL TARGET=embedded, the object file generated should go in
    something akin to "builds/FULL/embedded/obj/src/gui/main_window.o".  I
    like to have separate parts for obj (.o files), dep (.d files), and
    bin (linked binaries, map files, etc.).  You could also mix .d and .o
    files in the same directory if you prefer.

    This means you can happily do incremental builds for all your
    configurations and targets, and don't risk mixing object files from
    different setups.

    Yes, perfectly agreed.


    6.

    Learn to use submakes.  When you use plain "make" (or, more
    realistically, "make -j") to build multiple configurations, have each
    configuration spawned off in a separate submake.  Then you don't need
    to track multiple copies of your "TARGET" macro in the same build -
    each submake has just one target, and one config.

    I don't think I got the point.  Now I invoke the build of a single build configuration.  Are you talking about running make to build multiple configurations at the same time?

    Yes.

    Obviously it depends on the stage you are in development and the kind of project - much of the time, you will want to build just one
    configuration. But sometimes you will also want to make multiple builds
    to check that a small change has not caused trouble elsewhere, or for different kinds of testing? Why run multiple "make" commands when you
    can do a full project build from one "make" ?



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Thu May 15 11:17:52 2025
    From Newsgroup: comp.arch.embedded

    On 15/05/2025 01:00, Nicolas Paul Colin de Glocester wrote:
    Buona sera!

    On Wed, 14 May 2025, pozz wrote:
    "[. . .] When it comes to stupid and big IDEs [. . .]
    [. . .]
    It is already a miracle if that software runs without problems with the default
    installation path. I don't want to imagine what happens if I changed it."


    If these IDEs would not be trustworthy, then you would need to buy good alternatives.

    Don't be silly. There /are/ no alternatives that are more trustworthy -
    they just have different failure or risk points. There can be benefits
    in buying a commercial IDE, and/or a commercial toolchain, but lower
    risk of bugs, quirks or installation issues is most certainly not one of
    them.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Thu May 15 23:25:03 2025
    From Newsgroup: comp.arch.embedded

    Il 15/05/2025 11:03, David Brown ha scritto:
    On 14/05/2025 23:51, pozz wrote:
    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]

    You are asking a lot of questions here.  They are good questions, but
    it would be a very long post if I tried to answer them all fully.  So
    instead, I will try to give a few hints and suggestions that you can
    take further.  I'll put numbers on them in case you want to reference
    them in replies.

    Ok, thank you very much for your time.


    1.

    Windows path naming is insane.  Fortunately, you can almost always
    override it.  Whenever you install any serious program in Windows,
    especially if you ever want to refer to it from the command line,
    batch files, makefiles, etc., avoid names with spaces or "awkward"
    characters.   I recommend making top-level directories like "progs"
    or "compilers" and putting the tools in there as appropriate.  This
    also makes it vastly easier to copy tools to other machines.  And
    since you should never upgrade your toolchains - merely add new
    versions to your collection, in separate directories - it is easier
    if they are better organised.

    I know, but not all software installers work well if you change their
    default installation path.  When it comes to stupid and big IDEs (such
    as Atmel/Microchip Studio), I prefer to avoid changing the default
    installation path (C:\Program Files (x86)\Atmel...) to avoid other
    obscure issues.

    Almost all of them work fine in different directories (and indeed
    different drives).  First assume they work - only fall back on the
    crappy defaults if there is no other option.

    Yes, you are right. However I don't think it would be simple to
    understand if a problem is caused by the installation path or other
    obscure reason. I'm talking about an installation of an IDE (Atmel
    Studio) that takes a very long time to finish. The installation process
    is a nightmare.


    Of course, the best answer is to avoid any tool made by Microchip - they
    are the worst of the bunch.  (Atmel was always a bit behind in second
    place for the title of worst toolchain supplier, but Microchip has
    gradually integrated them.)  I have many fine things to say about
    Microchip and Atmel as hardware suppliers, but I make a point of
    avoiding their microcontrollers because of their tools.

    :-)

    I worked on PIC8 and AVR8 and IMHO AVR8 is much better then PIC8.
    Regarding Cortex-M, SAM devices are fine for me.


    My strong preference - regardless of the manufacturer - is to use the ARM-supplied gcc toolchains (for ARM microcontrollers, obviously) rather than the usually older tools supplied by manufacturers.

    It is something I learned.


    It is already a miracle if that software runs without problems with
    the default installation path.  I don't want to imagine what happens
    if I changed it.

    Anyway until now I didn't find issues with spaces.  Even in msys2
    shell I can use "/c/Program\ Files\ (x86)/...".

    It usually works - but that does not stop it being a PITA and an insane choice of pathnames.

    Sure.


    Still, you have to find what works best for you - I am giving recommendations and suggestions, not a unique solution or single
    "correct" answer.


    The other IDE I use is MCUXpresso.  It is Eclipse based so I installed
    it in c:\ without any temptations.


    Yes, that has always worked for me.

    (Of course I normally have it on Linux, rather than Windows, and most manufacturer-supplied software uses a sensible default path - in /opt or
    in /usr/local.)



    2.

    You don't need to use bash or other *nix shells for makefile or other
    tools if you don't want to.  When I do builds on Windows, I run
    "make" from a normal command line (or from an editor / IDE).  It is
    helpful to have msys2's usr/bin on your path so that make can use
    *nix command-line utilities like cp, mv, sed, etc.  But if you want
    to make a minimal build system, you don't need a full msys2
    installation - you only need the utilities you want to use, and they
    can be copied directly (unlike with Cygwin or WSL).

    Of course you /can/ use fuller shells if you want.  But don't make
    your makefiles depend on that, as it will be harder to use them from
    IDEs, editors, or any other automation.

    In the beginning (some years ago) I started installing GNU Make for
    Windows, putting it in c:\tools\make.  Then I created a simple
    Makefile and tried to process it on a standard Windows command line.
    It was a mess!  I remember there were many issues regarding:
    slash/backslash on file paths, lack of Unix commands (rm, mv, ...) and
    so on.  Native Windows tools need backslash in the paths, but some
    unix tools need slash.  It was a mess to transform the paths between
    the two forms.


    Most tools on Windows are happy with forward slash for path separators
    as well.

    mkdir, just to name one? And you need mkdir in a Makefile.


    Certainly everything that is originally a *nix tool will be
    fine with that.

    Of course if you have a makefile that uses commands like "rm" and you
    don't have them on your path, and don't specify the path in the
    makefile, then it won't work.  This is why the norm in advanced
    makefiles is to use macros for these things :

    # Put this in the host-specific file, with blank for no path needed
    bin_path :=

    # Use this instead of "rm".
    RM := $(bin_path) rm

    Initially I insisted using native Windows commands: DEL, MKDIR, COPY and
    so on. Finally I gave up.



    After this attempt, I gave up.  I thought it was much better to use
    the IDE and build system suggested by the MCU manufacturer.


    For most IDEs, the build system is "make".  But the IDE generates the makefiles - slowly for big projects, and usually overly simplistic with
    far too limited options.

    But IDE's are certainly much easier for getting started.  On new
    projects, or new devices, I will often use the IDE to get going and then move it over to an independent makefile.  (And I'll often continue to
    use the IDE after that as a solid editor and debugger - IDE's are
    generally happy with external makefiles.)

    I'm going to create a new post regarding editors and debugger... stay
    tuned :-D


    Now I'm trying a Unix shell in Windows (msys, WSL or even the bash
    installed with git) and it seems many issues I had are disappearing.


    And of course you will want an msys2/mingw64 (/not/ old mingw32) for
    native gcc compilation.

    The goal of the simulator is to detect problems on the software that
    runs directly on Windows, without flashing, debug probes and so on.  I
    increased my productivity a lot when I started this approach.

    Obviously, the software running on Windows (the simulator) should be
    very similar to the sofware running on the embedded target.  Cortex-M
    MCUs are 32-bits so I thought it should be better to use a 32-bits
    compiler even for the simulator.


    mingw-w64 can happily generate 32-bit Windows executables.  IIRC you
    just use the "-m32" flag.  It is significantly better than old mingw in
    a number of ways - in particular it has vastly better standard C library support.

    Why doesn't it work for me? I open a Msys2/mingw64 shell and...

    $ gcc -m32 -o main.exe main.c C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
    skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/libmingw32.a
    when searching for -lmingw32 C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
    skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib\libmingw32.a
    when searching for -lmingw32
    ...
    ... and much more



    Moreover, I think many issues aries on a 64-bits compilation, for
    example static allocated buffers that would be too small on a 64-bits
    platforms.  Or some issues on serializers.


    Don't bother with WSL unless you actually need a fuller Linux system
    - and if you /do/ need that, dump the wasteful crap that is Windows
    and use Linux for your development.  Build speeds will double on the
    same hardware.  (In my testing, done a good while back, I did some
    comparisons of a larger build on different setups on the same PC,
    using native Windows build as the baseline.  Native Linux builds were
    twice the speed.  Running VirtualBox on Windows host, with a Linux
    virtual machine, or running VirtualBox on Linux with a Windows
    virtual machine, both beat native Windows solidly.)

    I completely agree with you.  At the moment msys2 seems ok.


    3.

    Makefiles can be split up.  Use "include" - and remember that you can
    do so using macros.  In my makefile setups, I have a file "host.mk"
    that is used to identify the build host, then pull in a file that is
    specific to the host:

    # This is is for identifying host computer to get the paths right

    ifeq ($(OS),Windows_NT)
       # We are on a Windows machine
       host_os := windows
       host := $(COMPUTERNAME)
    else
       # Linux machine
       host_os := linux
       host := $(shell hostname)
    endif

    ifeq "$(call file-exists,makes/host_$(host).mk)" "1"
       include makes/host_$(host).mk
    else
       $(error No host makefile host_$(host).mk found)
    endif

    Then I have files like "host_xxx.mk" for a computer named "xxx",
    containing things like :

    toolchain_path := /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/

    or

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/


    All paths to compilers and other build-related programs are specified
    in these files.  The only things that are taken from the OS path are
    standard and common programs that do not affect the resulting binary
    files.

    It is an interesting and uncommon (at least for me) approach.

    What happens if multiple developers work on the same repository?  Are
    they forced to create a host_xxx.mk for all their development
    machines? Should the host_xxx.mk files be added to the repository?

    Yes, that is /exactly/ what you do.  It also applies to a single
    developer using multiple different machines.  For any long-term project, you want to be sure you can check out the repository, do a clean build,
    and get an identical binary from more than one machine.  Having
    individual "host_XXX.mk" files means that the build adapts automatically
    to the machine.  What you don't want is each developer making changes to
    a single makefile so that it works on their machine - and then either
    not checking in the changes, or checking them in and messing things up
    for someone else.


    I guess the only goal of host_xxx.mk is to avoid changing PATH before
    make.  Why don't you like setting the PATH according to the project
    you're working on?


    No, that is not the only goal - there can be many differences between machines.  For example, I usually have ccache on my Linux systems but it
    is rare to have it on (native) Windows systems - thus that can be
    enabled or disabled in a host_xxx.mk file.  Some machines might also support building the documentation, or running a simulator, or signing binaries.

    Setting the path would be an extra complication of no benefit, but a significant source of risk or error.  How do you make sure your IDE is using the right PATH settings before it runs "make"?  How do you deal
    with multiple projects - do you keep swapping PATHs?  (I usually have a half-dozen projects "open" at a time, in different workspaces on my
    Linux machine.)  Do you now have a makefile and a separate path-setting batch file or shell script that you need to run before doing a project build?  How do you handle things when you install some new Windows
    program that messes with your path?

    It is /vastly/ simpler and safer to put the paths to the binaries in a couple of macros in your makefile(s).  It also gives clear and
    unequivocal documentation of the tools you need -  if your makefile has this line :

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/

    then there is never any doubt as to exactly which toolchain is used for
    the project.

    I see your points. The only drawback seems putting a bunch of
    host_xxx.mk files in the repository. If the developer team and their development machines are well defined and static, everything goes well.

    However what happens when a new developer pulls your repository and want
    to build? At first, he must create his host_xxx.mk and starting
    polluting the original repository. Instead, by using the PATH, it could
    build without touching any files in the repo.

    Maybe this isn't our situation, but a public open-source repository
    can't use your approach. It's impossible to include in the public
    repository tenths or hundreds host_xxx.mk.

    Moreover, what happens if two developers like astronomy and set the
    hostname of their development machine JUPITER? Maybe one uses Linux,
    the other Windows.
    In your make, it seems you include the correct host_xxx.mk file
    automatically from the hostname.


    Then I have a "commands.mk" file with things like :

    ATDEP := @

    toolchain_prefix := arm-none-eabi-

    CCDEP := $(ATDEP)$(toolchain_path)$(toolchain_prefix)gcc
    CC := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)gcc
    LD := $(AT)$(toolchain_path)$(toolchain_prefix)gcc
    OBJCOPY := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)objcopy
    OBJDUMP := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)dump
    SIZE := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)size


    Put CONFIG dependent stuff in "config_full.mk" and similar files.
    Put TARGET specific stuff in "target_simulator.mk".  And so on.  It
    makes it much easier to keep track of things, and you only need a few
    high-level "ifeq".


    Keep your various makefiles in a separate directory.  Your project
    makefile is then clear and simple - much of it will be comments about
    usage (parameters like CONFIG).

    Yes, splitting makefiles is a good suggestion.


    4.

    Generate dependency files, using the same compiler and the same
    include flags and -D flags as you have for the normal compilation,
    but with flags like -MM -MP -MT and -MF to make .d dependency files.
    Include them all in the makefile, using "-include" so that your
    makefile does not stop before they are generated.

    I have to admit that ChatGPT helped me to create the Makefile.  The
    CFLAGS include -MMD and -MP and at the end I have

       -include $(DEP_FILES)

    Of course, DEP_FILES are:

       DEP_FILES := $(OBJ_FILES:.o=.d)

    That's a good start.  There are quite a few articles and blog posts
    about automatic generation of makefile dependencies that can be worth reading.

    Sincerely I don't know if it is good, but I tried to change an include
    file and related C files are compiled again as expected (so I think
    the dependency are correctly managed).

    There's a thing that doesn't work.  If I change the Makefile itsel,
    for example changing CFLAGS adding a new compiler option, I need to
    manually invoke a clean.

    depfiles_src := $(cfiles:.c=.d) $(cppfiles:.cpp=.d)
    depfiles := $(addprefix $(dep_dir),$(patsubst ../%,%,$(depfiles_src)))

    -include $(depfiles)

    alldepends := makefile $(wildcard makes/*.mk)
    all : $(alldepends) $(depfiles)
    depends : $(alldepends)

    # "depends" target just makes dep files
    depends : $(depfiles)
            @echo Updated dependencies


    Vary according to your needs.  But basically, if something has $(alldepends) in its dependency list, it will be rebuild if one of your makefiles changes.


    5.

    Keep your build directories neat, separate from all source
    directories, and mirroring the tree structure of the source files.
    So if you have a file "src/gui/main_window.c", and you are building
    with CONFIG=FULL TARGET=embedded, the object file generated should go
    in something akin to
    "builds/FULL/embedded/obj/src/gui/main_window.o".  I like to have
    separate parts for obj (.o files), dep (.d files), and bin (linked
    binaries, map files, etc.).  You could also mix .d and .o files in
    the same directory if you prefer.

    This means you can happily do incremental builds for all your
    configurations and targets, and don't risk mixing object files from
    different setups.

    Yes, perfectly agreed.


    6.

    Learn to use submakes.  When you use plain "make" (or, more
    realistically, "make -j") to build multiple configurations, have each
    configuration spawned off in a separate submake.  Then you don't need
    to track multiple copies of your "TARGET" macro in the same build -
    each submake has just one target, and one config.

    I don't think I got the point.  Now I invoke the build of a single
    build configuration.  Are you talking about running make to build
    multiple configurations at the same time?

    Yes.

    Obviously it depends on the stage you are in development and the kind of project - much of the time, you will want to build just one
    configuration.  But sometimes you will also want to make multiple builds
    to check that a small change has not caused trouble elsewhere, or for different kinds of testing?  Why run multiple "make" commands when you
    can do a full project build from one "make" ?

    Are you thinking something similar to:

    all_configs:
    $(MAKE) -j 4 CONFIG=FULL
    $(MAKE) -j 4 CONFIG=STANDARD
    $(MAKE) -j 4 CONFIG=LITE


    With my actual Makefile, "make all_configs" returns an errore because
    CONFIG is not specified.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Fri May 16 11:12:23 2025
    From Newsgroup: comp.arch.embedded

    On 15/05/2025 23:25, pozz wrote:
    Il 15/05/2025 11:03, David Brown ha scritto:
    On 14/05/2025 23:51, pozz wrote:
    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]


    I worked on PIC8 and AVR8 and IMHO AVR8 is much better then PIC8.
    Regarding Cortex-M, SAM devices are fine for me.

    The 8-bit PIC's are extraordinarily robust microcontrollers - I've seen devices rated for 85 °C happily running at 180 °C, and tolerating short-circuits, over-current, and many types of abuse. But the
    processor core is very limited, and the development tools have always
    been horrendous. The AVR is a much nicer core - it is one of the best
    8-bit cores around. But you are still stuck working in a highly device-specific form of coding instead of normal C or C++. And you are
    still stuck with Microchip's attitude to development tools. (You can
    probably tell that I find this very frustrating - I would like to be
    able to use more of Microchip / Atmel's devices.)



    2.

    You don't need to use bash or other *nix shells for makefile or
    other tools if you don't want to.  When I do builds on Windows, I
    run "make" from a normal command line (or from an editor / IDE).  It >>>> is helpful to have msys2's usr/bin on your path so that make can use
    *nix command-line utilities like cp, mv, sed, etc.  But if you want
    to make a minimal build system, you don't need a full msys2
    installation - you only need the utilities you want to use, and they
    can be copied directly (unlike with Cygwin or WSL).

    Of course you /can/ use fuller shells if you want.  But don't make
    your makefiles depend on that, as it will be harder to use them from
    IDEs, editors, or any other automation.

    In the beginning (some years ago) I started installing GNU Make for
    Windows, putting it in c:\tools\make.  Then I created a simple
    Makefile and tried to process it on a standard Windows command line.
    It was a mess!  I remember there were many issues regarding:
    slash/backslash on file paths, lack of Unix commands (rm, mv, ...)
    and so on.  Native Windows tools need backslash in the paths, but
    some unix tools need slash.  It was a mess to transform the paths
    between the two forms.


    Most tools on Windows are happy with forward slash for path separators
    as well.

    mkdir, just to name one?  And you need mkdir in a Makefile.


    Don't use the crappy Windows-native one - use msys2's mkdir. As I said:

    bin_path :=
    RM := $(bin_path) rm
    MKDIR := $(bin_path) mkdir

    and so on.

    Now your makefile can use "mkdir" happily - with forward slashes, with
    "-p" to make a whole chain of directories, and so on.

    Once you have left the limitations of the Windows default command shell builtins behind, it is all much easier. For utilities like "cp" and
    "rm" it is a little more obvious since the names are different from the
    DOS leftovers "copy" and "del" - unfortunately "mkdir" is the same name
    in both cases.


    Certainly everything that is originally a *nix tool will be fine with
    that.

    Of course if you have a makefile that uses commands like "rm" and you
    don't have them on your path, and don't specify the path in the
    makefile, then it won't work.  This is why the norm in advanced
    makefiles is to use macros for these things :

    # Put this in the host-specific file, with blank for no path needed
    bin_path :=

    # Use this instead of "rm".
    RM := $(bin_path) rm

    Initially I insisted using native Windows commands: DEL, MKDIR, COPY and
    so on.  Finally I gave up.


    Excellent decision.



    After this attempt, I gave up.  I thought it was much better to use
    the IDE and build system suggested by the MCU manufacturer.


    For most IDEs, the build system is "make".  But the IDE generates the
    makefiles - slowly for big projects, and usually overly simplistic
    with far too limited options.

    But IDE's are certainly much easier for getting started.  On new
    projects, or new devices, I will often use the IDE to get going and
    then move it over to an independent makefile.  (And I'll often
    continue to use the IDE after that as a solid editor and debugger -
    IDE's are generally happy with external makefiles.)

    I'm going to create a new post regarding editors and debugger... stay
    tuned :-D

    You are keeping this group alive almost single-handedly :-) Many of us
    read and answer posts, but few start new threads.



    Now I'm trying a Unix shell in Windows (msys, WSL or even the bash
    installed with git) and it seems many issues I had are disappearing.


    And of course you will want an msys2/mingw64 (/not/ old mingw32) for
    native gcc compilation.

    The goal of the simulator is to detect problems on the software that
    runs directly on Windows, without flashing, debug probes and so on.
    I increased my productivity a lot when I started this approach.

    Obviously, the software running on Windows (the simulator) should be
    very similar to the sofware running on the embedded target.  Cortex-M
    MCUs are 32-bits so I thought it should be better to use a 32-bits
    compiler even for the simulator.


    mingw-w64 can happily generate 32-bit Windows executables.  IIRC you
    just use the "-m32" flag.  It is significantly better than old mingw
    in a number of ways - in particular it has vastly better standard C
    library support.

    Why doesn't it work for me?  I open a Msys2/mingw64 shell and...

    $ gcc -m32 -o main.exe main.c C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib\libmingw32.a when searching for -lmingw32
    ...
    ... and much more


    It looks like you don't have the 32-bit static libraries included in
    your msys2/mingw64 installation - these things are often optional. (It
    might be referred to as "multi-lib support".) I haven't used gcc on
    Windows for a long time - most of my work is on Linux. But I'm sure
    that you'll find the answer easily now you know it is the 32-bit static libraries (libmingw32.a) that you are missing.


    I guess the only goal of host_xxx.mk is to avoid changing PATH before
    make.  Why don't you like setting the PATH according to the project
    you're working on?


    No, that is not the only goal - there can be many differences between
    machines.  For example, I usually have ccache on my Linux systems but
    it is rare to have it on (native) Windows systems - thus that can be
    enabled or disabled in a host_xxx.mk file.  Some machines might also
    support building the documentation, or running a simulator, or signing
    binaries.

    Setting the path would be an extra complication of no benefit, but a
    significant source of risk or error.  How do you make sure your IDE is
    using the right PATH settings before it runs "make"?  How do you deal
    with multiple projects - do you keep swapping PATHs?  (I usually have
    a half-dozen projects "open" at a time, in different workspaces on my
    Linux machine.)  Do you now have a makefile and a separate
    path-setting batch file or shell script that you need to run before
    doing a project build?  How do you handle things when you install some
    new Windows program that messes with your path?

    It is /vastly/ simpler and safer to put the paths to the binaries in a
    couple of macros in your makefile(s).  It also gives clear and
    unequivocal documentation of the tools you need -  if your makefile
    has this line :

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/

    then there is never any doubt as to exactly which toolchain is used
    for the project.

    I see your points.  The only drawback seems putting a bunch of
    host_xxx.mk files in the repository.  If the developer team and their development machines are well defined and static, everything goes well.


    Typically the host_xxx.mk files will be pretty much the same for each
    Windows system and each Linux system. You might find it simpler to just
    have a single file that checks for the OS and sets the paths
    specifically, without bothering about host details.

    However what happens when a new developer pulls your repository and want
    to build?  At first, he must create his host_xxx.mk and starting
    polluting the original repository.  Instead, by using the PATH, it could build without touching any files in the repo.

    How often does a new developer join the team - or how often do you add a
    new host? If it is once every few years, it doesn't matter. If it
    happens regularly, then this will be a pain and you might want to have a different scheme (such as common setups on all Linux systems and all
    Windows systems). But using the PATH is much worse IME.


    Maybe this isn't our situation, but a public open-source repository
    can't use your approach.  It's impossible to include in the public repository tenths or hundreds host_xxx.mk.

    Sure.

    That's a completely different kind of project, however. In open source projects you'll want to make the system compilable with a wide range of
    tools, versions and options, and you expect a lot of varied changes to
    the code. That's entirely different from a serious commercial embedded
    system where you want to be able to make a release of the project and
    check it in, then ten years later check it out on a different machine
    and OS, do a rebuild, and get bit-perfect identical binaries. I am not suggesting a one-size-fits-all solution.


    Moreover, what happens if two developers like astronomy and set the
    hostname of their development machine JUPITER?  Maybe one uses Linux,
    the other Windows.

    Use your imagination :-)

    In your make, it seems you include the correct host_xxx.mk file automatically from the hostname.


    6.

    Learn to use submakes.  When you use plain "make" (or, more
    realistically, "make -j") to build multiple configurations, have
    each configuration spawned off in a separate submake.  Then you
    don't need to track multiple copies of your "TARGET" macro in the
    same build - each submake has just one target, and one config.

    I don't think I got the point.  Now I invoke the build of a single
    build configuration.  Are you talking about running make to build
    multiple configurations at the same time?

    Yes.

    Obviously it depends on the stage you are in development and the kind
    of project - much of the time, you will want to build just one
    configuration.  But sometimes you will also want to make multiple
    builds to check that a small change has not caused trouble elsewhere,
    or for different kinds of testing?  Why run multiple "make" commands
    when you can do a full project build from one "make" ?

    Are you thinking something similar to:

    all_configs:
        $(MAKE) -j 4 CONFIG=FULL
        $(MAKE) -j 4 CONFIG=STANDARD
        $(MAKE) -j 4 CONFIG=LITE


    Don't use "-j" on the submakes - just use "$(MAKE)" and it will inherit
    the job count from the first instance, which acts as a the jobserver.


    With my actual Makefile, "make all_configs" returns an errore because
    CONFIG is not specified.

    You could put something like :

    CONFIG ?= FULL

    to give a default configuration.

    I actually have something like :

    ifneq "$(submake)" "1"
    # This is the original main make, used only to start the sub-makes
    # "progs" is a list of the programs, or configurations, to build

    # Get any non-prog goals
    goals := $(filter-out $(all_progs),$(MAKECMDGOALS))

    define submake_template
    # $(1) = prg
    .PHONY : $(1)
    $(1) :
    @echo Spawning submake for $(1)
    +$(MAKE) --no-builtin-rules $(goals) prog=$(1) submake=1
    endef
    $(foreach prg,$(prog),$(eval $(call submake_template,$(prg))))
    else
    # We are in the sub-make for a configuration
    include makes/main.mk
    endif

    Thus the only thing that is done from the original instance of "make" is
    to start as many submakes as appropriate, each with a specific CONFIG
    and with the submake variable set.




    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Nicolas Paul Colin de Glocester@Spamassassin@irrt.De to comp.arch.embedded on Fri May 16 12:21:31 2025
    From Newsgroup: comp.arch.embedded

    On Thu, 15 May 2025, David Brown wrote:
    "There /are/ no alternatives that are more trustworthy - they
    just have different failure or risk points. There can be benefits in buying a commercial IDE, and/or a commercial toolchain, but lower risk of bugs, quirks or
    installation issues is most certainly not one of them."

    C and C++ compilers and codes produced thereby are not trustworthy. Use commercial Ada compilers to avoid bugs.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Fri May 16 12:46:56 2025
    From Newsgroup: comp.arch.embedded

    Il 16/05/2025 11:12, David Brown ha scritto:
    On 15/05/2025 23:25, pozz wrote:
    Il 15/05/2025 11:03, David Brown ha scritto:
    On 14/05/2025 23:51, pozz wrote:
    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]


    I worked on PIC8 and AVR8 and IMHO AVR8 is much better then PIC8.
    Regarding Cortex-M, SAM devices are fine for me.

    The 8-bit PIC's are extraordinarily robust microcontrollers - I've seen devices rated for 85 °C happily running at 180 °C, and tolerating short-circuits, over-current, and many types of abuse.  But the
    processor core is very limited, and the development tools have always
    been horrendous.  The AVR is a much nicer core - it is one of the best 8-bit cores around.  But you are still stuck working in a highly device-specific form of coding instead of normal C or C++.

    Why do you write "highly device-specific form of coding"? Considering
    they are 8-bits (and C is at-least-16-bits integer), it seems to me an acceptable C language when you coimpile with avr-gcc.

    You can use int variables without any problems (they will be 16-bits).
    You can use function calls passing paramters. You can return complex
    data from functions.

    Of course flash memory is in a different address space, so you need
    specific API to access data from flash.

    Do you know of other 8-bits cores supported better by a C compiler?


    And you are
    still stuck with Microchip's attitude to development tools.  (You can probably tell that I find this very frustrating - I would like to be
    able to use more of Microchip / Atmel's devices.)

    Maybe we already talked in the past about this. I don't know if avr-gcc
    was developed by Atmel or Arduino community. Anyway, for AVR8 you have
    the possibility to use gcc tools for compiling and debugging. There are
    many open source tools. I think you could avoid completely
    Microchip/Atmel IDE for AVR8 without any problems. Arduino IDE is a good example.


    2.

    You don't need to use bash or other *nix shells for makefile or
    other tools if you don't want to.  When I do builds on Windows, I
    run "make" from a normal command line (or from an editor / IDE).
    It is helpful to have msys2's usr/bin on your path so that make can >>>>> use *nix command-line utilities like cp, mv, sed, etc.  But if you >>>>> want to make a minimal build system, you don't need a full msys2
    installation - you only need the utilities you want to use, and
    they can be copied directly (unlike with Cygwin or WSL).

    Of course you /can/ use fuller shells if you want.  But don't make >>>>> your makefiles depend on that, as it will be harder to use them
    from IDEs, editors, or any other automation.

    In the beginning (some years ago) I started installing GNU Make for
    Windows, putting it in c:\tools\make.  Then I created a simple
    Makefile and tried to process it on a standard Windows command line.
    It was a mess!  I remember there were many issues regarding:
    slash/backslash on file paths, lack of Unix commands (rm, mv, ...)
    and so on.  Native Windows tools need backslash in the paths, but
    some unix tools need slash.  It was a mess to transform the paths
    between the two forms.


    Most tools on Windows are happy with forward slash for path
    separators as well.

    mkdir, just to name one?  And you need mkdir in a Makefile.

    Don't use the crappy Windows-native one - use msys2's mkdir.  As I said:

    bin_path :=
    RM := $(bin_path) rm
    MKDIR := $(bin_path) mkdir

    and so on.

    Now your makefile can use "mkdir" happily - with forward slashes, with
    "-p" to make a whole chain of directories, and so on.

    Yes, sure, now I know. I was responding to your "Most tools on Windows
    are happy with forward slash". I thought your "tools on Windows" were
    native Windows commands.

    I think your suggestion is: explicitly call msys tools (rm, mkdir, gcc)
    in normal Windows CMD shell, without insisting in using directly the
    msys shell. Maybe this will help in integration with third-parties
    IDE/editors (such as VSCode, C::B, and so on).


    Once you have left the limitations of the Windows default command shell builtins behind, it is all much easier.  For utilities like "cp" and
    "rm" it is a little more obvious since the names are different from the
    DOS leftovers "copy" and "del" - unfortunately "mkdir" is the same name
    in both cases.

    Indeed.


    Certainly everything that is originally a *nix tool will be fine with
    that.

    Of course if you have a makefile that uses commands like "rm" and you
    don't have them on your path, and don't specify the path in the
    makefile, then it won't work.  This is why the norm in advanced
    makefiles is to use macros for these things :

    # Put this in the host-specific file, with blank for no path needed
    bin_path :=

    # Use this instead of "rm".
    RM := $(bin_path) rm

    Initially I insisted using native Windows commands: DEL, MKDIR, COPY
    and so on.  Finally I gave up.


    Excellent decision.



    After this attempt, I gave up.  I thought it was much better to use
    the IDE and build system suggested by the MCU manufacturer.


    For most IDEs, the build system is "make".  But the IDE generates the
    makefiles - slowly for big projects, and usually overly simplistic
    with far too limited options.

    But IDE's are certainly much easier for getting started.  On new
    projects, or new devices, I will often use the IDE to get going and
    then move it over to an independent makefile.  (And I'll often
    continue to use the IDE after that as a solid editor and debugger -
    IDE's are generally happy with external makefiles.)

    I'm going to create a new post regarding editors and debugger... stay
    tuned :-D

    You are keeping this group alive almost single-handedly :-)  Many of us read and answer posts, but few start new threads.

    I'm the student, your are the teachers, so it is normal I make the
    questions :-D

    [OT] I like newsgroups for chatting with others on specific topics.
    Nowadays unfortunately newsgroups are dying in favor of other social platforms: Facebook, reddit, blogs.... Do you know of some other active platforms about embedded?


    Now I'm trying a Unix shell in Windows (msys, WSL or even the bash
    installed with git) and it seems many issues I had are disappearing.


    And of course you will want an msys2/mingw64 (/not/ old mingw32)
    for native gcc compilation.

    The goal of the simulator is to detect problems on the software that
    runs directly on Windows, without flashing, debug probes and so on.
    I increased my productivity a lot when I started this approach.

    Obviously, the software running on Windows (the simulator) should be
    very similar to the sofware running on the embedded target.
    Cortex-M MCUs are 32-bits so I thought it should be better to use a
    32-bits compiler even for the simulator.


    mingw-w64 can happily generate 32-bit Windows executables.  IIRC you
    just use the "-m32" flag.  It is significantly better than old mingw
    in a number of ways - in particular it has vastly better standard C
    library support.

    Why doesn't it work for me?  I open a Msys2/mingw64 shell and...

    $ gcc -m32 -o main.exe main.c
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
    C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib\libmingw32.a when searching for -lmingw32
    ...
    ... and much more


    It looks like you don't have the 32-bit static libraries included in
    your msys2/mingw64 installation - these things are often optional.  (It might be referred to as "multi-lib support".)  I haven't used gcc on Windows for a long time - most of my work is on Linux.  But I'm sure
    that you'll find the answer easily now you know it is the 32-bit static libraries (libmingw32.a) that you are missing.

    On many places they suggest to use msys2/mingw32 for generating 32-bits Windows binaries. For example here[1].

    [1] https://superuser.com/questions/1473717/compile-in-msys2-mingw64-with-m32-option


    I guess the only goal of host_xxx.mk is to avoid changing PATH
    before make.  Why don't you like setting the PATH according to the
    project you're working on?


    No, that is not the only goal - there can be many differences between
    machines.  For example, I usually have ccache on my Linux systems but
    it is rare to have it on (native) Windows systems - thus that can be
    enabled or disabled in a host_xxx.mk file.  Some machines might also
    support building the documentation, or running a simulator, or
    signing binaries.

    Setting the path would be an extra complication of no benefit, but a
    significant source of risk or error.  How do you make sure your IDE
    is using the right PATH settings before it runs "make"?  How do you
    deal with multiple projects - do you keep swapping PATHs?  (I usually
    have a half-dozen projects "open" at a time, in different workspaces
    on my Linux machine.)  Do you now have a makefile and a separate
    path-setting batch file or shell script that you need to run before
    doing a project build?  How do you handle things when you install
    some new Windows program that messes with your path?

    It is /vastly/ simpler and safer to put the paths to the binaries in
    a couple of macros in your makefile(s).  It also gives clear and
    unequivocal documentation of the tools you need -  if your makefile
    has this line :

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/

    then there is never any doubt as to exactly which toolchain is used
    for the project.

    I see your points.  The only drawback seems putting a bunch of
    host_xxx.mk files in the repository.  If the developer team and their
    development machines are well defined and static, everything goes well.


    Typically the host_xxx.mk files will be pretty much the same for each Windows system and each Linux system.  You might find it simpler to just have a single file that checks for the OS and sets the paths
    specifically, without bothering about host details.

    However what happens when a new developer pulls your repository and
    want to build?  At first, he must create his host_xxx.mk and starting
    polluting the original repository.  Instead, by using the PATH, it
    could build without touching any files in the repo.

    How often does a new developer join the team - or how often do you add a
    new host?  If it is once every few years, it doesn't matter.  If it happens regularly, then this will be a pain and you might want to have a different scheme (such as common setups on all Linux systems and all
    Windows systems).  But using the PATH is much worse IME.

    Ok, this makes sense.


    Maybe this isn't our situation, but a public open-source repository
    can't use your approach.  It's impossible to include in the public
    repository tenths or hundreds host_xxx.mk.

    Sure.

    That's a completely different kind of project, however.  In open source projects you'll want to make the system compilable with a wide range of tools, versions and options, and you expect a lot of varied changes to
    the code.  That's entirely different from a serious commercial embedded system where you want to be able to make a release of the project and
    check it in, then ten years later check it out on a different machine
    and OS, do a rebuild, and get bit-perfect identical binaries.  I am not suggesting a one-size-fits-all solution.


    Moreover, what happens if two developers like astronomy and set the
    hostname of their development machine JUPITER?  Maybe one uses Linux,
    the other Windows.

    Use your imagination :-)

    In your make, it seems you include the correct host_xxx.mk file
    automatically from the hostname.


    6.

    Learn to use submakes.  When you use plain "make" (or, more
    realistically, "make -j") to build multiple configurations, have
    each configuration spawned off in a separate submake.  Then you
    don't need to track multiple copies of your "TARGET" macro in the
    same build - each submake has just one target, and one config.

    I don't think I got the point.  Now I invoke the build of a single
    build configuration.  Are you talking about running make to build
    multiple configurations at the same time?

    Yes.

    Obviously it depends on the stage you are in development and the kind
    of project - much of the time, you will want to build just one
    configuration.  But sometimes you will also want to make multiple
    builds to check that a small change has not caused trouble elsewhere,
    or for different kinds of testing?  Why run multiple "make" commands
    when you can do a full project build from one "make" ?

    Are you thinking something similar to:

    all_configs:
         $(MAKE) -j 4 CONFIG=FULL
         $(MAKE) -j 4 CONFIG=STANDARD
         $(MAKE) -j 4 CONFIG=LITE


    Don't use "-j" on the submakes - just use "$(MAKE)" and it will inherit
    the job count from the first instance, which acts as a the jobserver.


    With my actual Makefile, "make all_configs" returns an errore because
    CONFIG is not specified.

    You could put something like :

    CONFIG ?= FULL

    to give a default configuration.

    I actually have something like :

    ifneq "$(submake)" "1"
      # This is the original main make, used only to start the sub-makes
      # "progs" is a list of the programs, or configurations, to build

      # Get any non-prog goals
      goals := $(filter-out $(all_progs),$(MAKECMDGOALS))

      define submake_template
        # $(1) = prg
        .PHONY : $(1)
        $(1) :
          @echo Spawning submake for $(1)
          +$(MAKE) --no-builtin-rules $(goals) prog=$(1) submake=1
      endef
      $(foreach prg,$(prog),$(eval $(call submake_template,$(prg))))
    else
      # We are in the sub-make for a configuration
      include makes/main.mk
    endif

    Thus the only thing that is done from the original instance of "make" is
    to start as many submakes as appropriate, each with a specific CONFIG
    and with the submake variable set.

    Ok, thank you.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Fri May 16 14:42:16 2025
    From Newsgroup: comp.arch.embedded

    On 16/05/2025 12:21, Nicolas Paul Colin de Glocester wrote:
    On Thu, 15 May 2025, David Brown wrote:
    "There /are/ no alternatives that are more trustworthy - they
    just have different failure or risk points. There can be benefits in buying a
    commercial IDE, and/or a commercial toolchain, but lower risk of bugs, quirks or
    installation issues is most certainly not one of them."

    C and C++ compilers and codes produced thereby are not trustworthy. Use commercial Ada compilers to avoid bugs.

    No one was questioning the trustworthiness of compilers or the code they generate. The issue was about how well IDE's cope with unusual
    installations outside the defaults expected by the supplier. The free
    IDE's provided with manufacturers are vastly more commonly used than commercial IDE's (especially those that have their own custom IDE's),
    and you can expect them to have been tested and used in a much wider
    range of circumstances.

    As for the trustworthiness of compilers, that's another matter. I have
    never seen any reason to suppose that commercial compilers are more trustworthy (in terms of accepting valid code or generating correct
    code) than the good open source compilers (gcc and clang). I have never
    seen any reason to suppose that Ada compilers are more trustworthy than
    C or C++ compilers. On the contrary, I find that more popular tools are
    less likely to have serious bugs.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Fri May 16 15:30:55 2025
    From Newsgroup: comp.arch.embedded

    On 16/05/2025 12:46, pozz wrote:
    Il 16/05/2025 11:12, David Brown ha scritto:
    On 15/05/2025 23:25, pozz wrote:
    Il 15/05/2025 11:03, David Brown ha scritto:
    On 14/05/2025 23:51, pozz wrote:
    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]


    I worked on PIC8 and AVR8 and IMHO AVR8 is much better then PIC8.
    Regarding Cortex-M, SAM devices are fine for me.

    The 8-bit PIC's are extraordinarily robust microcontrollers - I've
    seen devices rated for 85 °C happily running at 180 °C, and tolerating
    short-circuits, over-current, and many types of abuse.  But the
    processor core is very limited, and the development tools have always
    been horrendous.  The AVR is a much nicer core - it is one of the best
    8-bit cores around.  But you are still stuck working in a highly
    device-specific form of coding instead of normal C or C++.

    Why do you write "highly device-specific form of coding"? Considering
    they are 8-bits (and C is at-least-16-bits integer), it seems to me an acceptable C language when you coimpile with avr-gcc.

    You can use int variables without any problems (they will be 16-bits).
    You can use function calls passing paramters. You can return complex
    data from functions.

    Of course flash memory is in a different address space, so you need
    specific API to access data from flash.

    Do you know of other 8-bits cores supported better by a C compiler?


    Certainly C programming with avr-gcc is closer to normal C than C
    programming with PIC's and other 8-bit devices.

    But I don't want to work with "the most normal C considering the
    limitations of the processor" - I want to work with normal C and C++.

    I don't want to have to think about using "uint8_t" instead of "int"
    because of processor efficiency. I don't want to be limited in my
    pointer usage because the processor can't handle pointers well. I don't
    want to have a non-linear memory, where pointers to flash are different
    to pointers to ram and bigger devices have a mess of address spaces and
    linker complications if you have large blocks of read-only data. I
    don't want my C++ restricted because of severely limited calling
    conventions, pointer usage, and limited registers.

    ARM core microcontrollers these days are significantly smaller, cheaper
    and lower power than AVRs in most categories. There's a few situations
    in which AVRs might still be the best choice in a new product, but I
    consider them legacy devices, with development only for minor updates to existing products.

    (I'll be happy to switch to RISC-V to replace or complement ARM.)


    And you are still stuck with Microchip's attitude to development
    tools.  (You can probably tell that I find this very frustrating - I
    would like to be able to use more of Microchip / Atmel's devices.)

    Maybe we already talked in the past about this. I don't know if avr-gcc
    was developed by Atmel or Arduino community.

    Neither. It was independent, based on voluntary work, with Atmel making half-hearted support on occasion.

    Anyway, for AVR8 you have
    the possibility to use gcc tools for compiling and debugging. There are
    many open source tools. I think you could avoid completely
    Microchip/Atmel IDE for AVR8 without any problems. Arduino IDE is a good example.


    The Arduino IDE and libraries are great for quick tests, getting
    familiar with hardware, hobby projects, and proofs-of-concept, but
    terrible for serious work.

    But yes, you can do real work with AVRs without Microchip or Atmel's IDE's.


    2.

    You don't need to use bash or other *nix shells for makefile or
    other tools if you don't want to.  When I do builds on Windows, I >>>>>> run "make" from a normal command line (or from an editor / IDE).
    It is helpful to have msys2's usr/bin on your path so that make
    can use *nix command-line utilities like cp, mv, sed, etc.  But if >>>>>> you want to make a minimal build system, you don't need a full
    msys2 installation - you only need the utilities you want to use, >>>>>> and they can be copied directly (unlike with Cygwin or WSL).

    Of course you /can/ use fuller shells if you want.  But don't make >>>>>> your makefiles depend on that, as it will be harder to use them
    from IDEs, editors, or any other automation.

    In the beginning (some years ago) I started installing GNU Make for >>>>> Windows, putting it in c:\tools\make.  Then I created a simple
    Makefile and tried to process it on a standard Windows command
    line. It was a mess!  I remember there were many issues regarding: >>>>> slash/backslash on file paths, lack of Unix commands (rm, mv, ...)
    and so on.  Native Windows tools need backslash in the paths, but
    some unix tools need slash.  It was a mess to transform the paths
    between the two forms.


    Most tools on Windows are happy with forward slash for path
    separators as well.

    mkdir, just to name one?  And you need mkdir in a Makefile.

    Don't use the crappy Windows-native one - use msys2's mkdir.  As I said:

    bin_path :=
    RM := $(bin_path) rm
    MKDIR := $(bin_path) mkdir

    and so on.

    Now your makefile can use "mkdir" happily - with forward slashes, with
    "-p" to make a whole chain of directories, and so on.

    Yes, sure, now I know.  I was responding to your "Most tools on Windows
    are happy with forward slash". I thought your "tools on Windows" were
    native Windows commands.


    Ah, okay. Many programs that come with Windows /are/ happy with forward slashes for paths - because the relevant Windows API's are happy with
    forward slashes. But the old stuff, especially the commands built into
    the old command shell, can't handle them. There will also be trouble
    for commands that use forward slashes for flags and other parameters. I
    meant that there is no problem with utilities compiled on Windows that
    run natively (as distinct from under WSL, or restricted to a bash shell,
    or something like that).

    I think your suggestion is: explicitly call msys tools (rm, mkdir, gcc)
    in normal Windows CMD shell, without insisting in using directly the
    msys shell. Maybe this will help in integration with third-parties IDE/editors (such as VSCode, C::B, and so on).


    Yes, exactly.


    I'm going to create a new post regarding editors and debugger... stay
    tuned :-D

    You are keeping this group alive almost single-handedly :-)  Many of
    us read and answer posts, but few start new threads.

    I'm the student, your are the teachers, so it is normal I make the
    questions :-D

    [OT] I like newsgroups for chatting with others on specific topics.
    Nowadays unfortunately newsgroups are dying in favor of other social platforms: Facebook, reddit, blogs.... Do you know of some other active platforms about embedded?


    I too like Usenet as the non-social social network :-)

    I suppose some day I will join reddit. The comp.lang.c and
    comp.lang.c++ newsgroups are quite active, and might be of interest to
    you. comp.arch has some interesting conversations too sometimes. (And
    there is always sci.electronics.design, if you want a somewhat
    anti-social newsgroup that occasionally talks about electronics.)


    It looks like you don't have the 32-bit static libraries included in
    your msys2/mingw64 installation - these things are often optional.
    (It might be referred to as "multi-lib support".)  I haven't used gcc
    on Windows for a long time - most of my work is on Linux.  But I'm
    sure that you'll find the answer easily now you know it is the 32-bit
    static libraries (libmingw32.a) that you are missing.

    On many places they suggest to use msys2/mingw32 for generating 32-bits Windows binaries. For example here[1].

    [1] https://superuser.com/questions/1473717/compile-in-msys2-mingw64-with-m32-option


    Try looking in other places :-)

    To be honest, I have not looked at this - I don't need to use gcc on
    Windows myself. And neither my Windows nor my msys2 / mingw64
    installation have been updated in many years - the tools I need don't
    change much. But I have no doubt that mingw64 /can/ generate 32-bit
    Windows binaries, that your problem is the missing static libraries, and
    that it is a significantly superior toolchain to the older mingw -
    primarily because that uses the slow, outdated and limited external MS
    DLL's for standard C library functions.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Fri May 16 15:45:04 2025
    From Newsgroup: comp.arch.embedded

    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]
    3.

    Makefiles can be split up.  Use "include" - and remember that you can do
    so using macros.  In my makefile setups, I have a file "host.mk" that is used to identify the build host, then pull in a file that is specific to
    the host:

    # This is is for identifying host computer to get the paths right

    ifeq ($(OS),Windows_NT)
      # We are on a Windows machine
      host_os := windows
      host := $(COMPUTERNAME)
    else
      # Linux machine
      host_os := linux
      host := $(shell hostname)
    endif

    ifeq "$(call file-exists,makes/host_$(host).mk)" "1"
      include makes/host_$(host).mk
    else
      $(error No host makefile host_$(host).mk found)
    endif

    Then I have files like "host_xxx.mk" for a computer named "xxx",
    containing things like :

    toolchain_path := /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/

    or

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/


    All paths to compilers and other build-related programs are specified in these files.  The only things that are taken from the OS path are
    standard and common programs that do not affect the resulting binary files.

    Regarding this point, I tried to set

    toolchain_path := c:\\msys64\\mingw64\\bin

    but it doesn't work (a popup error is shown about libwinpthread-1.dll).
    Even if I call gcc directly from CMD doesn't work for the same reason.

    I found the problem disappears if I set the toolchain path in the
    PATH... but, hey, we were going to put the toolchain path in the
    makefile to avoid setting the PATH on the command line, but it seems impossible!





    Then I have a "commands.mk" file with things like :

    ATDEP := @

    toolchain_prefix := arm-none-eabi-

    CCDEP := $(ATDEP)$(toolchain_path)$(toolchain_prefix)gcc
    CC := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)gcc
    LD := $(AT)$(toolchain_path)$(toolchain_prefix)gcc
    OBJCOPY := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)objcopy
    OBJDUMP := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)dump
    SIZE := $(AT)$(CCACHE) $(toolchain_path)$(toolchain_prefix)size


    Put CONFIG dependent stuff in "config_full.mk" and similar files.  Put TARGET specific stuff in "target_simulator.mk".  And so on.  It makes it much easier to keep track of things, and you only need a few high-level "ifeq".


    Keep your various makefiles in a separate directory.  Your project
    makefile is then clear and simple - much of it will be comments about
    usage (parameters like CONFIG).


    4.

    Generate dependency files, using the same compiler and the same include flags and -D flags as you have for the normal compilation, but with
    flags like -MM -MP -MT and -MF to make .d dependency files.  Include
    them all in the makefile, using "-include" so that your makefile does
    not stop before they are generated.


    5.

    Keep your build directories neat, separate from all source directories,
    and mirroring the tree structure of the source files.  So if you have a file "src/gui/main_window.c", and you are building with CONFIG=FULL TARGET=embedded, the object file generated should go in something akin
    to "builds/FULL/embedded/obj/src/gui/main_window.o".  I like to have separate parts for obj (.o files), dep (.d files), and bin (linked
    binaries, map files, etc.).  You could also mix .d and .o files in the
    same directory if you prefer.

    This means you can happily do incremental builds for all your
    configurations and targets, and don't risk mixing object files from different setups.


    6.

    Learn to use submakes.  When you use plain "make" (or, more
    realistically, "make -j") to build multiple configurations, have each configuration spawned off in a separate submake.  Then you don't need to track multiple copies of your "TARGET" macro in the same build - each submake has just one target, and one config.




    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Fri May 16 16:17:31 2025
    From Newsgroup: comp.arch.embedded

    Il 16/05/2025 15:30, David Brown ha scritto:
    On 16/05/2025 12:46, pozz wrote:
    Il 16/05/2025 11:12, David Brown ha scritto:
    On 15/05/2025 23:25, pozz wrote:
    Il 15/05/2025 11:03, David Brown ha scritto:
    On 14/05/2025 23:51, pozz wrote:
    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]

    I worked on PIC8 and AVR8 and IMHO AVR8 is much better then PIC8.
    Regarding Cortex-M, SAM devices are fine for me.

    The 8-bit PIC's are extraordinarily robust microcontrollers - I've
    seen devices rated for 85 °C happily running at 180 °C, and
    tolerating short-circuits, over-current, and many types of abuse.
    But the processor core is very limited, and the development tools
    have always been horrendous.  The AVR is a much nicer core - it is
    one of the best 8-bit cores around.  But you are still stuck working
    in a highly device-specific form of coding instead of normal C or C++.

    Why do you write "highly device-specific form of coding"? Considering
    they are 8-bits (and C is at-least-16-bits integer), it seems to me an
    acceptable C language when you coimpile with avr-gcc.

    You can use int variables without any problems (they will be 16-bits).
    You can use function calls passing paramters. You can return complex
    data from functions.

    Of course flash memory is in a different address space, so you need
    specific API to access data from flash.

    Do you know of other 8-bits cores supported better by a C compiler?


    Certainly C programming with avr-gcc is closer to normal C than C programming with PIC's and other 8-bit devices.

    But I don't want to work with "the most normal C considering the
    limitations of the processor" - I want to work with normal C and C++.

    I don't want to have to think about using "uint8_t" instead of "int"
    because of processor efficiency.  I don't want to be limited in my
    pointer usage because the processor can't handle pointers well.  I don't want to have a non-linear memory, where pointers to flash are different
    to pointers to ram and bigger devices have a mess of address spaces and linker complications if you have large blocks of read-only data.  I
    don't want my C++ restricted because of severely limited calling conventions, pointer usage, and limited registers.

    ARM core microcontrollers these days are significantly smaller, cheaper
    and lower power than AVRs in most categories.  There's a few situations
    in which AVRs might still be the best choice in a new product, but I consider them legacy devices, with development only for minor updates to existing products.

    We were comparing 8-bits cores. Obviously ARM Cortex-M MCUs are much
    nicer to program. Anyway I disagree on the "cheaper".

    Digikey sells 1000pcs of ATmega328PB-AU at 1.17€ in tray.
    ATSAMD20E14B-AUT at 1.76€ as a cut-tape. This MCU has only 16kB of Flash.


    (I'll be happy to switch to RISC-V to replace or complement ARM.)


    And you are still stuck with Microchip's attitude to development
    tools.  (You can probably tell that I find this very frustrating - I
    would like to be able to use more of Microchip / Atmel's devices.)

    Maybe we already talked in the past about this. I don't know if
    avr-gcc was developed by Atmel or Arduino community.

    Neither.  It was independent, based on voluntary work, with Atmel making half-hearted support on occasion.

    Anyway, for AVR8 you have the possibility to use gcc tools for
    compiling and debugging. There are many open source tools. I think you
    could avoid completely Microchip/Atmel IDE for AVR8 without any
    problems. Arduino IDE is a good example.


    The Arduino IDE and libraries are great for quick tests, getting
    familiar with hardware, hobby projects, and proofs-of-concept, but
    terrible for serious work.

    But yes, you can do real work with AVRs without Microchip or Atmel's IDE's.


    2.

    You don't need to use bash or other *nix shells for makefile or >>>>>>> other tools if you don't want to.  When I do builds on Windows, I >>>>>>> run "make" from a normal command line (or from an editor / IDE). >>>>>>> It is helpful to have msys2's usr/bin on your path so that make >>>>>>> can use *nix command-line utilities like cp, mv, sed, etc.  But >>>>>>> if you want to make a minimal build system, you don't need a full >>>>>>> msys2 installation - you only need the utilities you want to use, >>>>>>> and they can be copied directly (unlike with Cygwin or WSL).

    Of course you /can/ use fuller shells if you want.  But don't
    make your makefiles depend on that, as it will be harder to use >>>>>>> them from IDEs, editors, or any other automation.

    In the beginning (some years ago) I started installing GNU Make
    for Windows, putting it in c:\tools\make.  Then I created a simple >>>>>> Makefile and tried to process it on a standard Windows command
    line. It was a mess!  I remember there were many issues regarding: >>>>>> slash/backslash on file paths, lack of Unix commands (rm, mv, ...) >>>>>> and so on.  Native Windows tools need backslash in the paths, but >>>>>> some unix tools need slash.  It was a mess to transform the paths >>>>>> between the two forms.


    Most tools on Windows are happy with forward slash for path
    separators as well.

    mkdir, just to name one?  And you need mkdir in a Makefile.

    Don't use the crappy Windows-native one - use msys2's mkdir.  As I said: >>>
    bin_path :=
    RM := $(bin_path) rm
    MKDIR := $(bin_path) mkdir

    and so on.

    Now your makefile can use "mkdir" happily - with forward slashes,
    with "-p" to make a whole chain of directories, and so on.

    Yes, sure, now I know.  I was responding to your "Most tools on
    Windows are happy with forward slash". I thought your "tools on
    Windows" were native Windows commands.


    Ah, okay.  Many programs that come with Windows /are/ happy with forward slashes for paths - because the relevant Windows API's are happy with forward slashes.  But the old stuff, especially the commands built into
    the old command shell, can't handle them.  There will also be trouble
    for commands that use forward slashes for flags and other parameters.  I meant that there is no problem with utilities compiled on Windows that
    run natively (as distinct from under WSL, or restricted to a bash shell,
    or something like that).

    I think your suggestion is: explicitly call msys tools (rm, mkdir,
    gcc) in normal Windows CMD shell, without insisting in using directly
    the msys shell. Maybe this will help in integration with third-parties
    IDE/editors (such as VSCode, C::B, and so on).


    Yes, exactly.


    I'm going to create a new post regarding editors and debugger...
    stay tuned :-D

    You are keeping this group alive almost single-handedly :-)  Many of
    us read and answer posts, but few start new threads.

    I'm the student, your are the teachers, so it is normal I make the
    questions :-D

    [OT] I like newsgroups for chatting with others on specific topics.
    Nowadays unfortunately newsgroups are dying in favor of other social
    platforms: Facebook, reddit, blogs.... Do you know of some other
    active platforms about embedded?


    I too like Usenet as the non-social social network :-)

    I suppose some day I will join reddit.  The comp.lang.c and
    comp.lang.c++ newsgroups are quite active, and might be of interest to
    you.

    I usually read the first.


    comp.arch has some interesting conversations too sometimes.

    Subscribed.


    (And
    there is always sci.electronics.design, if you want a somewhat
    anti-social newsgroup that occasionally talks about electronics.)

    :-D


    It looks like you don't have the 32-bit static libraries included in
    your msys2/mingw64 installation - these things are often optional.
    (It might be referred to as "multi-lib support".)  I haven't used gcc
    on Windows for a long time - most of my work is on Linux.  But I'm
    sure that you'll find the answer easily now you know it is the 32-bit
    static libraries (libmingw32.a) that you are missing.

    On many places they suggest to use msys2/mingw32 for generating
    32-bits Windows binaries. For example here[1].

    [1]
    https://superuser.com/questions/1473717/compile-in-msys2-mingw64-with-m32-option


    Try looking in other places :-)

    To be honest, I have not looked at this - I don't need to use gcc on
    Windows myself.  And neither my Windows nor my msys2 / mingw64
    installation have been updated in many years - the tools I need don't
    change much.  But I have no doubt that mingw64 /can/ generate 32-bit Windows binaries, that your problem is the missing static libraries, and that it is a significantly superior toolchain to the older mingw -
    primarily because that uses the slow, outdated and limited external MS
    DLL's for standard C library functions.

    Anyway I'm not able to fix the error I have. I will look in some other
    places.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@david.brown@hesbynett.no to comp.arch.embedded on Fri May 16 17:20:25 2025
    From Newsgroup: comp.arch.embedded

    On 16/05/2025 15:45, pozz wrote:
    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]
    3.

    Makefiles can be split up.  Use "include" - and remember that you can
    do so using macros.  In my makefile setups, I have a file "host.mk"
    that is used to identify the build host, then pull in a file that is
    specific to the host:

    # This is is for identifying host computer to get the paths right

    ifeq ($(OS),Windows_NT)
       # We are on a Windows machine
       host_os := windows
       host := $(COMPUTERNAME)
    else
       # Linux machine
       host_os := linux
       host := $(shell hostname)
    endif

    ifeq "$(call file-exists,makes/host_$(host).mk)" "1"
       include makes/host_$(host).mk
    else
       $(error No host makefile host_$(host).mk found)
    endif

    Then I have files like "host_xxx.mk" for a computer named "xxx",
    containing things like :

    toolchain_path := /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/

    or

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/


    All paths to compilers and other build-related programs are specified
    in these files.  The only things that are taken from the OS path are
    standard and common programs that do not affect the resulting binary
    files.

    Regarding this point, I tried to set

       toolchain_path := c:\\msys64\\mingw64\\bin


    What happens when you use the correct path?

    toolchain_path := c:/msys64/mingw64/bin/

    (Note the trailing slash - or you can add it when you use the macro.)



    Strive to get rid of all the Windows idiosyncrasies here.

    make, gcc and all the other relevant tools here are from a *nix
    background. Use them with that in mind and it will all be smoother.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Sat May 17 10:56:49 2025
    From Newsgroup: comp.arch.embedded

    Il 16/05/2025 17:20, David Brown ha scritto:
    On 16/05/2025 15:45, pozz wrote:
    Il 14/05/2025 11:03, David Brown ha scritto:
    On 13/05/2025 17:57, pozz wrote:
    [...]
    3.

    Makefiles can be split up.  Use "include" - and remember that you can
    do so using macros.  In my makefile setups, I have a file "host.mk"
    that is used to identify the build host, then pull in a file that is
    specific to the host:

    # This is is for identifying host computer to get the paths right

    ifeq ($(OS),Windows_NT)
       # We are on a Windows machine
       host_os := windows
       host := $(COMPUTERNAME)
    else
       # Linux machine
       host_os := linux
       host := $(shell hostname)
    endif

    ifeq "$(call file-exists,makes/host_$(host).mk)" "1"
       include makes/host_$(host).mk
    else
       $(error No host makefile host_$(host).mk found)
    endif

    Then I have files like "host_xxx.mk" for a computer named "xxx",
    containing things like :

    toolchain_path := /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/

    or

    toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/


    All paths to compilers and other build-related programs are specified
    in these files.  The only things that are taken from the OS path are
    standard and common programs that do not affect the resulting binary
    files.

    Regarding this point, I tried to set

        toolchain_path := c:\\msys64\\mingw64\\bin


    What happens when you use the correct path?

    toolchain_path := c:/msys64/mingw64/bin/

    (Note the trailing slash - or you can add it when you use the macro.)



    Strive to get rid of all the Windows idiosyncrasies here.

    make, gcc and all the other relevant tools here are from a *nix background.  Use them with that in mind and it will all be smoother.

    The problem is not in Makefile/make, but directly in the CMD.exe. If at
    the prompt I write:

    c:/msys64/mingw64/bin/gcc -o main.exe main.c

    I receive some error popups regarding some dlls that arent' found (for
    example libmpc-3.dll, libgcc_s_seh-1.dll)

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Niocl=C3=A1s_P=C3=B3l_Caile=C3=A1n_de_Ghloucester?=@Spamassassin@irrt.De to comp.arch.embedded on Fri Jul 4 18:38:31 2025
    From Newsgroup: comp.arch.embedded

    This message is in MIME format. The first part should be readable text,
    while the remaining parts are likely unreadable without MIME-aware tools.

    --708268602-1557254040-1751647117=:2657643
    Content-Type: text/plain; format=flowed; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE

    On Wed, 14 May 2025, George Neuner wrote:
    "Just note that NTFS *does* have a limit on the number of entries in
    the root directory of the drive. Offhand, I don't recall what is the
    limit [for some reason 127 is stuck in my head] but note that the
    typical Windows installation has only about ~20 folders in C:\."


    Dear Mister Neuner:

    I use an NTFS C:\ with a concerningly big number of (greater than five=20 hundred) useless files sized zero bytes. (All from over six months ago.)=20 (Cf. below.)

    On Monday Microsoft had informed employees that during this week it has=20 informed nine thousand thereof that it is firing them. So who needs one of=
    =20
    these jobs? - "A senior US diplomat warned t=C3=A1naiste Miche=C3=A1l Marti= n's=20
    office and the taoiseach of "consequences" if government enacted the=20 Occupied Territories Bill =E2=80=93 90 minutes before Martin issued a state= ment=20
    committing only to a "review" rather than enactment of the legislation.

    US Ambassador to Ireland Claire Cronin contacted several government=20
    offices last month, telling them she was =E2=80=9Cclosely following develop= ments=20
    related to the Occupied Territories Bill=E2=80=9D, which would ban the sale=
    and=20
    import of goods from illegally occupied Palestinian territory.

    [. . .]

    On 1 November, 10 days after warning government about economic=20
    consequences of passing the Occupied Territories Bill, Cronin posted a=20
    photo on social media, standing alongside taoiseach Simon Harris,=20
    announcing 550 Microsoft jobs for Dublin.

    The ambassador praised "the ever-strengthening U.S.-Ireland trade and=20 investment relationship" in what she called "this year of centenary=20 celebrations of diplomatic relations.""
    alleges
    HTTPS://WWW.onTheDitch.com/us-ambassador-warned

    Regards.

    A console dump is:
    "C:\>dir/ad
    Volume in drive C has no label.
    Volume Serial Number is D083-40FD

    Directory of C:\

    16/12/2023 17:33 <DIR> $Recycle.Bin
    29/06/2023 22:25 <DIR> ailt_liom
    08/01/2025 16:45 <DIR> dli
    14/07/2009 06:08 <JUNCTION> Documents and Settings [C:\Users] 08/01/2022 11:44 <DIR> drivers
    16/02/2017 15:47 <DIR> Intel
    14/07/2009 04:20 <DIR> PerfLogs
    26/06/2025 21:33 <DIR> Program Files
    26/03/2025 11:43 <DIR> Program Files (x86)
    29/03/2025 14:39 <DIR> ProgramData
    16/02/2017 15:43 <DIR> Recovery
    04/07/2025 11:58 <DIR> System Volume Information
    04/09/2022 09:27 <DIR> Users
    06/08/2024 15:02 <DIR> Windows
    0 File(s) 0 bytes
    14 Dir(s) 12,090,433,536 bytes free

    dir/ah
    Volume in drive C has no label.
    Volume Serial Number is D083-40FD

    Directory of C:\

    16/12/2023 17:33 <DIR> $Recycle.Bin
    14/07/2009 06:08 <JUNCTION> Documents and Settings [C:\Users] 04/07/2025 09:34 6,374,936,576 hiberfil.sys
    04/07/2025 09:34 8,499,916,800 pagefile.sys
    29/03/2025 14:39 <DIR> ProgramData
    16/02/2017 15:43 <DIR> Recovery
    04/07/2025 11:58 <DIR> System Volume Information
    2 File(s) 14,874,853,376 bytes
    5 Dir(s) 12,090,433,536 bytes free

    date
    The current date is: 04/07/2025
    Enter the new date: (dd-mm-yy)

    dir/o-d
    Volume in drive C has no label.
    Volume Serial Number is D083-40FD

    Directory of C:\

    26/06/2025 21:33 <DIR> Program Files
    26/03/2025 11:43 <DIR> Program Files (x86)
    08/01/2025 16:45 <DIR> dli
    01/12/2024 13:40 0 wal5805A849
    01/12/2024 13:40 0 wal0B77CC4C
    01/12/2024 13:40 0 wal014287D5
    30/11/2024 17:33 0 wal26D70798
    30/11/2024 17:33 0 wal18BDA6A0
    30/11/2024 17:33 0 wal0C977BD6
    24/11/2024 13:03 0 wal256FD9CF
    24/11/2024 13:03 0 wal3CA65EDC
    24/11/2024 13:03 0 wal04BEAE65
    23/11/2024 12:59 0 wal23CAADB9
    23/11/2024 12:59 0 wal1A0A10B2
    23/11/2024 12:59 0 wal012028ED
    23/11/2024 12:59 0 wal0365CC17
    22/11/2024 12:55 0 wal6C9676AF
    22/11/2024 12:55 0 wal33C89D6F
    22/11/2024 12:55 0 wal2A32D41E
    21/11/2024 12:51 0 wal3D34C8A9
    21/11/2024 12:51 0 wal06393D99
    21/11/2024 12:51 0 wal5A0F3487
    20/11/2024 12:48 0 wal2213A0D8
    20/11/2024 12:48 0 wal0901DEB2
    20/11/2024 12:48 0 wal3191535A
    19/11/2024 12:44 0 wal577989B3
    19/11/2024 12:44 0 wal184B7436
    19/11/2024 12:44 0 wal23FD8675
    18/11/2024 12:40 0 wal2D986B93
    18/11/2024 12:40 0 wal024A0753
    18/11/2024 12:40 0 wal70BD9052
    17/11/2024 22:34 0 wal4FC36604
    17/11/2024 22:34 0 wal5569CD16
    17/11/2024 22:34 0 wal33F8F28B
    17/11/2024 12:36 0 wal07AF54C2
    17/11/2024 12:36 0 wal1E40FBF5
    17/11/2024 12:36 0 wal2E117E74
    16/11/2024 12:31 0 wal661552FF
    16/11/2024 12:31 0 wal05D6D34A
    16/11/2024 12:31 0 wal7E79CBBF
    15/11/2024 12:27 0 wal48DCCAF7
    15/11/2024 12:27 0 wal1F1EEC62
    15/11/2024 12:27 0 wal0CC685F0
    14/11/2024 12:23 0 wal78CCECEF
    14/11/2024 12:23 0 wal3911F58F
    14/11/2024 12:23 0 wal3D51BC28
    11/11/2024 12:11 0 wal7696DEA6
    11/11/2024 12:11 0 wal5D812E1B
    11/11/2024 12:11 0 wal0B0A7A06
    10/11/2024 12:07 0 wal401A0300
    10/11/2024 12:07 0 wal669C7611
    10/11/2024 12:07 0 wal45F411B9
    07/11/2024 11:55 0 wal724508F1
    07/11/2024 11:55 0 wal3320DE97
    07/11/2024 11:55 0 wal3A799F51
    28/10/2024 10:47 0 wal3E900174
    28/10/2024 10:47 0 wal7A1BF2B9
    28/10/2024 10:47 0 wal5221776E
    24/10/2024 14:31 0 wal7ED49F8F
    24/10/2024 14:31 0 wal6457F958
    24/10/2024 14:31 0 wal35092F30
    23/10/2024 14:27 0 wal329CD7F1
    23/10/2024 14:27 0 wal2F41DD62
    23/10/2024 14:27 0 wal13D0609D
    22/10/2024 14:25 0 wal22923062
    22/10/2024 14:25 0 wal019F5AE1
    22/10/2024 14:25 0 wal6ACD9216
    22/10/2024 14:25 0 wal0BB4FE42
    30/09/2024 17:34 0 wal69DB6C36
    30/09/2024 17:34 0 wal2A7459C4
    30/09/2024 17:34 0 wal6DF20650
    30/09/2024 14:39 0 wal6CDEEE79
    30/09/2024 14:39 0 wal0605E309
    30/09/2024 14:39 0 wal0F181F85
    29/09/2024 14:33 0 wal7240D996
    29/09/2024 14:33 0 wal49C7ECD3
    29/09/2024 14:33 0 wal741E2B72
    27/09/2024 11:07 0 wal0D0B9847
    27/09/2024 11:07 0 wal6B620091
    27/09/2024 11:07 0 wal04AC79E4
    27/09/2024 11:07 0 wal38A457B4
    26/09/2024 11:02 0 wal6414879C
    26/09/2024 11:02 0 wal7C33859F
    26/09/2024 11:02 0 wal2350AE4E
    25/09/2024 10:58 0 wal46E74B11
    25/09/2024 10:58 0 wal0713EB2E
    25/09/2024 10:58 0 wal54347D6C
    24/09/2024 10:55 0 wal26F00BD6
    24/09/2024 10:55 0 wal12F7B5B7
    24/09/2024 10:55 0 wal34A59643
    23/09/2024 10:54 0 wal543EEB36
    23/09/2024 10:54 0 wal5D34ED63
    23/09/2024 10:54 0 wal0297625C
    22/09/2024 10:49 0 wal369DE595
    22/09/2024 10:49 0 wal07B36A03
    22/09/2024 10:49 0 wal7DBBF270
    22/09/2024 10:18 0 wal557722B9
    22/09/2024 10:18 0 wal1636FE20
    22/09/2024 10:18 0 wal6DB58316
    21/09/2024 10:45 0 wal7E28B019
    21/09/2024 10:45 0 wal401DFA27
    21/09/2024 10:45 0 wal449231E2
    20/09/2024 13:12 0 wal36A656FA
    20/09/2024 13:12 0 wal236888A5
    20/09/2024 13:12 0 wal05C0C3EE
    20/09/2024 10:44 0 wal4A7D3E3B
    20/09/2024 10:44 0 wal1EC8EF9B
    20/09/2024 10:44 0 wal7D944439
    19/09/2024 10:39 0 wal0FFE2700
    19/09/2024 10:39 0 wal6D9B8949
    19/09/2024 10:39 0 wal7D1323E2
    18/09/2024 10:36 0 wal224AF4A0
    18/09/2024 10:36 0 wal01A963A9
    18/09/2024 10:36 0 wal01AE24F0
    17/09/2024 10:36 0 wal1C4F8CAC
    17/09/2024 10:36 0 wal0B15526F
    17/09/2024 10:36 0 wal449D3326
    16/09/2024 10:35 0 wal76487C90
    16/09/2024 10:35 0 wal768D08F4
    16/09/2024 10:35 0 wal5A79D19D
    16/09/2024 10:35 0 wal4466A341
    14/09/2024 10:33 0 wal11CBF7D3
    14/09/2024 10:33 0 wal6DC3D45C
    14/09/2024 10:33 0 wal5B11D801
    13/09/2024 09:41 0 wal3EA2236E
    13/09/2024 09:41 0 wal6C8BFDCC
    13/09/2024 09:41 0 wal3F8D9D4E
    12/09/2024 09:36 0 wal6ACF6AD7
    12/09/2024 09:36 0 wal1D51C35C
    12/09/2024 09:36 0 wal01BFC69B
    11/09/2024 09:05 0 wal3FD3C2B7
    11/09/2024 09:05 0 wal12FD028B
    11/09/2024 09:05 0 wal4ED7E781
    10/09/2024 09:25 0 wal16B116A1
    10/09/2024 09:25 0 wal53190986
    10/09/2024 09:25 0 wal297664C3
    10/09/2024 09:01 0 wal1CD7DDB7
    10/09/2024 09:01 0 wal17D135A2
    10/09/2024 09:01 0 wal089F1EA9
    08/09/2024 21:44 0 wal21F35E04
    08/09/2024 21:44 0 wal61238278
    08/09/2024 21:44 0 wal2F70B8C9
    08/09/2024 09:53 0 wal19960F68
    08/09/2024 09:53 0 wal3D6B82BF
    08/09/2024 09:53 0 wal14530951
    07/09/2024 21:40 0 wal6C72DEEA
    07/09/2024 21:40 0 wal7860D671
    07/09/2024 21:40 0 wal0341F51E
    06/09/2024 13:51 0 wal0A9D18BE
    06/09/2024 13:51 0 wal3A9B23C3
    06/09/2024 13:51 0 wal73EF1B94
    05/09/2024 12:47 0 wal2326F184
    05/09/2024 12:47 0 wal52BF7326
    05/09/2024 12:47 0 wal30B6F3D5
    04/09/2024 12:43 0 wal128F7F48
    04/09/2024 12:43 0 wal28C6FB8C
    04/09/2024 12:43 0 wal4ED5494E
    03/09/2024 21:52 0 wal376A3A5A
    03/09/2024 21:52 0 wal2E901067
    03/09/2024 21:52 0 wal40086EFA
    03/09/2024 12:40 0 wal16D5E81D
    03/09/2024 12:40 0 wal612A751A
    03/09/2024 12:40 0 wal55FC755E
    02/09/2024 12:34 0 wal60769406
    02/09/2024 12:34 0 wal394373FF
    02/09/2024 12:34 0 wal043C41F7
    31/08/2024 09:40 0 wal29541749
    31/08/2024 09:40 0 wal34368D15
    31/08/2024 09:40 0 wal09DAC695
    29/08/2024 20:38 0 wal3C46C99B
    29/08/2024 20:38 0 wal76FE0DB9
    29/08/2024 20:38 0 wal16DA7D7E
    29/08/2024 15:38 0 wal18F21ABE
    29/08/2024 15:38 0 wal70C49820
    29/08/2024 15:38 0 wal3BED2BA6
    28/08/2024 20:37 0 wal6A5B06D7
    28/08/2024 20:37 0 wal4FD53A7D
    28/08/2024 20:37 0 wal36A21616
    27/08/2024 20:31 0 wal42EC23F8
    27/08/2024 20:31 0 wal48992B0D
    27/08/2024 20:31 0 wal69451BA4
    26/08/2024 17:46 0 wal46FA18AF
    26/08/2024 17:46 0 wal2C208193
    26/08/2024 17:46 0 wal0D0DC568
    25/08/2024 17:45 0 wal0616FACB
    25/08/2024 17:45 0 wal0E8618C8
    25/08/2024 17:45 0 wal391C5BB0
    24/08/2024 22:06 0 wal21B0239B
    24/08/2024 22:06 0 wal7C252335
    24/08/2024 22:06 0 wal0A40FE0C
    24/08/2024 17:40 0 wal0F972349
    24/08/2024 17:40 0 wal2EB2134E
    24/08/2024 17:40 0 wal334BA09E
    23/08/2024 16:55 0 wal32BD23B0
    23/08/2024 16:55 0 wal4578C6AD
    23/08/2024 16:55 0 wal4707A0B6
    23/08/2024 16:55 0 wal64D8C14F
    22/08/2024 16:52 0 wal69ED4CF8
    22/08/2024 16:52 0 wal389E0468
    22/08/2024 16:52 0 wal292E97BF
    21/08/2024 16:50 0 wal1A0E656A
    21/08/2024 16:50 0 wal4FDC6323
    21/08/2024 16:50 0 wal459C4ABB
    20/08/2024 16:47 0 wal34245A53
    20/08/2024 16:47 0 wal758C12AC
    20/08/2024 16:47 0 wal501D8B23
    19/08/2024 16:44 0 wal1C724667
    19/08/2024 16:44 0 wal61512066
    19/08/2024 16:44 0 wal1FC21EC2
    19/08/2024 16:44 0 wal1861AC45
    19/08/2024 08:40 0 wal0DB4504E
    19/08/2024 08:40 0 wal5819C572
    19/08/2024 08:40 0 wal1AF57646
    14/08/2024 21:54 0 wal3FF50CE5
    14/08/2024 21:54 0 wal366F3795
    14/08/2024 21:54 0 wal61E62F34
    12/08/2024 21:48 0 wal4B687AED
    12/08/2024 21:48 0 wal4957D042
    12/08/2024 21:48 0 wal672A2506
    11/08/2024 22:23 0 wal1746156D
    11/08/2024 22:23 0 wal6935354A
    11/08/2024 22:23 0 wal071BFC77
    11/08/2024 21:02 0 wal58953B6B
    11/08/2024 21:02 0 wal6C5B743E
    11/08/2024 21:02 0 wal6552D6EF
    09/08/2024 14:42 0 wal08A4D919
    09/08/2024 14:42 0 wal36639AC8
    09/08/2024 14:42 0 wal654E9F00
    08/08/2024 11:32 0 wal0B063D35
    08/08/2024 11:32 0 wal3BCFC52F
    08/08/2024 11:32 0 wal7C689097
    07/08/2024 11:27 0 wal05A55A3B
    07/08/2024 11:27 0 wal5113CE24
    07/08/2024 11:27 0 wal0E025514
    07/08/2024 11:27 0 wal5E4CA1D4
    06/08/2024 22:09 0 wal2CA6B8C4
    06/08/2024 22:09 0 wal6CB40483
    06/08/2024 22:09 0 wal7E4D318B
    06/08/2024 15:02 <DIR> Windows
    06/08/2024 11:25 0 wal7A76AFFA
    06/08/2024 11:25 0 wal4D5527AE
    06/08/2024 11:25 0 wal02C17952
    05/08/2024 11:24 0 wal35ACB2D9
    05/08/2024 11:24 0 wal10486688
    05/08/2024 11:24 0 wal128299BF
    04/08/2024 11:19 0 wal33AE0783
    04/08/2024 11:19 0 wal0D12258E
    04/08/2024 11:19 0 wal6D029F36
    03/08/2024 11:16 0 wal608CFB62
    03/08/2024 11:16 0 wal43029C7A
    03/08/2024 11:16 0 wal71A137E5
    02/08/2024 11:16 0 wal1FBBE221
    02/08/2024 11:16 0 wal275F71B7
    02/08/2024 11:16 0 wal4210F611
    01/08/2024 13:47 0 wal3D3F6075
    01/08/2024 13:47 0 wal7CED1EDB
    01/08/2024 13:47 0 wal08B1EEB1
    01/08/2024 11:11 0 wal4FA12721
    01/08/2024 11:11 0 wal256CB3BE
    01/08/2024 11:11 0 wal1F7914F9
    31/07/2024 11:10 0 wal52533D09
    31/07/2024 11:10 0 wal0CB64937
    31/07/2024 11:10 0 wal6A80A19D
    30/07/2024 11:08 0 wal566A5ACB
    30/07/2024 11:08 0 wal79A8CDC4
    30/07/2024 11:08 0 wal6925B11A
    29/07/2024 11:07 0 wal5076E723
    29/07/2024 11:07 0 wal270C2540
    29/07/2024 11:07 0 wal0B3C044E
    28/07/2024 11:03 0 wal4797D69E
    28/07/2024 11:03 0 wal7B54629A
    28/07/2024 11:03 0 wal30176D81
    27/07/2024 20:20 0 wal52A5C46B
    27/07/2024 20:20 0 wal08DC0F89
    27/07/2024 20:20 0 wal20A3F185
    27/07/2024 13:13 0 wal3A6F7D29
    27/07/2024 13:13 0 wal2D6E3ED0
    27/07/2024 13:13 0 wal079B9151
    27/07/2024 11:02 0 wal549BD9F3
    27/07/2024 11:02 0 wal281639A9
    27/07/2024 11:02 0 wal04D0E632
    26/07/2024 10:48 0 wal2B7ED511
    26/07/2024 10:48 0 wal4F5116FF
    26/07/2024 10:48 0 wal344B7D2D
    25/07/2024 10:46 0 wal5C5FDE97
    25/07/2024 10:46 0 wal3FD176B0
    25/07/2024 10:46 0 wal7AFA563B
    21/07/2024 22:31 0 wal43A5E7E2
    21/07/2024 22:31 0 wal0459CC41
    21/07/2024 22:31 0 wal0C7DE9FF
    21/07/2024 15:04 0 wal64BA4B21
    21/07/2024 15:04 0 wal604FBB01
    21/07/2024 15:04 0 wal5174C0CC
    20/07/2024 22:26 0 wal2970223B
    20/07/2024 22:26 0 wal562390FE
    20/07/2024 22:26 0 wal02C0B7F0
    20/07/2024 22:26 0 wal4D423F25
    19/07/2024 22:25 0 wal7E89A8BB
    19/07/2024 22:25 0 wal6155AB2E
    19/07/2024 22:25 0 wal2388FDE2
    17/07/2024 22:19 0 wal595A1B00
    17/07/2024 22:19 0 wal72194F0E
    17/07/2024 22:19 0 wal73562939
    16/07/2024 22:01 0 wal49FB9BD7
    16/07/2024 22:01 0 wal547A0776
    16/07/2024 22:01 0 wal2E4557CF
    16/07/2024 11:46 0 wal53520248
    16/07/2024 11:46 0 wal1C25C89A
    16/07/2024 11:46 0 wal47EDF7A6
    15/07/2024 21:58 0 wal45617993
    15/07/2024 21:58 0 wal54A54461
    15/07/2024 21:58 0 wal56DD42C9
    14/07/2024 21:56 0 wal36CFEB38
    14/07/2024 21:56 0 wal22A8A1C8
    14/07/2024 21:56 0 wal46C6C60E
    13/07/2024 21:53 0 wal66E87BCF
    13/07/2024 21:53 0 wal1767843C
    13/07/2024 21:53 0 wal3D5627BF
    12/07/2024 21:49 0 wal312E90D0
    12/07/2024 21:49 0 wal1432AB3B
    12/07/2024 21:49 0 wal68FC3C6D
    11/07/2024 21:44 0 wal0C9DE564
    11/07/2024 21:44 0 wal3CEFBDB2
    11/07/2024 21:44 0 wal40BDE0CF
    11/07/2024 11:29 0 wal7AF26DC2
    11/07/2024 11:29 0 wal11B3B518
    11/07/2024 11:29 0 wal1B9C05EC
    10/07/2024 20:02 0 wal58E8DCD7
    10/07/2024 20:02 0 wal75CAA2A1
    10/07/2024 20:02 0 wal38D415C9
    09/07/2024 11:28 0 wal6F79CCC2
    09/07/2024 11:28 0 wal23CB7CBF
    09/07/2024 11:28 0 wal28FD9153
    08/07/2024 11:27 0 wal338290A5
    08/07/2024 11:27 0 wal5AE17A4D
    08/07/2024 11:27 0 wal7B40D2D5
    07/07/2024 11:21 0 wal4A717449
    07/07/2024 11:21 0 wal385DEEF0
    07/07/2024 11:21 0 wal0E02975C
    06/07/2024 11:17 0 wal6845F6D8
    06/07/2024 11:17 0 wal0037B7CD
    06/07/2024 11:17 0 wal4769C7FD
    06/07/2024 11:07 0 wal719DD06A
    06/07/2024 11:07 0 wal395FCB04
    06/07/2024 11:07 0 wal694DBC62
    05/07/2024 11:15 0 wal69A5762B
    05/07/2024 11:15 0 wal7AEB0CB8
    05/07/2024 11:15 0 wal758B4622
    04/07/2024 11:10 0 wal7DA44AA7
    04/07/2024 11:10 0 wal47F98037
    04/07/2024 11:10 0 wal5C3ECA87
    03/07/2024 10:19 0 wal24FADA84
    03/07/2024 10:19 0 wal2408C003
    03/07/2024 10:19 0 wal65A5E0D6
    02/07/2024 09:55 0 wal4913E8A9
    02/07/2024 09:55 0 wal70FC92A8
    02/07/2024 09:55 0 wal7DC656EC
    01/07/2024 09:53 0 wal73569C15
    01/07/2024 09:53 0 wal7F9EBA2A
    01/07/2024 09:53 0 wal5B5B5693
    30/06/2024 23:20 0 wal7F438411
    30/06/2024 23:20 0 wal04385F3F
    30/06/2024 23:20 0 wal4A21FFD4
    30/06/2024 09:49 0 wal3FDCECF1
    30/06/2024 09:49 0 wal3C497A6E
    30/06/2024 09:49 0 wal7D454741
    27/06/2024 22:45 0 wal1AE1CA19
    27/06/2024 22:45 0 wal04DBD315
    27/06/2024 22:45 0 wal1C6A42C4
    26/06/2024 22:44 0 wal0757F083
    26/06/2024 22:44 0 wal51B9F60E
    26/06/2024 22:44 0 wal6359531B
    25/06/2024 22:43 0 wal07ABE129
    25/06/2024 22:43 0 wal2D2D6AD9
    25/06/2024 22:43 0 wal1BDEBF1B
    25/06/2024 16:07 0 wal140C8380
    25/06/2024 16:07 0 wal29A84967
    25/06/2024 16:07 0 wal5AFCDD63
    24/06/2024 22:39 0 wal160FF344
    24/06/2024 22:39 0 wal448B6DD3
    24/06/2024 22:39 0 wal1179584E
    23/06/2024 22:33 0 wal338CCB7A
    23/06/2024 22:33 0 wal1AD2CA6C
    23/06/2024 22:33 0 wal42BAB6E7
    22/06/2024 22:28 0 wal4DEE298A
    22/06/2024 22:28 0 wal7DBB6931
    22/06/2024 22:28 0 wal2CDA0ADB
    21/06/2024 22:25 0 wal62510258
    21/06/2024 22:25 0 wal427F1255
    21/06/2024 22:25 0 wal15966BC3
    21/06/2024 22:25 0 wal582825BD
    20/06/2024 22:20 0 wal06C3FADD
    20/06/2024 22:20 0 wal6272F4DC
    20/06/2024 22:20 0 wal517983CD
    19/06/2024 22:14 0 wal2E0F71DD
    19/06/2024 22:14 0 wal7171B630
    19/06/2024 22:14 0 wal0D060BCA
    18/06/2024 22:12 0 wal3646CEAB
    18/06/2024 22:12 0 wal3A7A2C7F
    18/06/2024 22:12 0 wal434A9B64
    17/06/2024 22:08 0 wal6B7060D8
    17/06/2024 22:08 0 wal472EEE0A
    17/06/2024 22:08 0 wal56BE1B31
    16/06/2024 22:08 0 wal33576B22
    16/06/2024 22:08 0 wal6CB3F5D0
    16/06/2024 22:08 0 wal2932C11E
    15/06/2024 22:07 0 wal4F94EA69
    15/06/2024 22:07 0 wal74B50EE8
    15/06/2024 22:07 0 wal6107845A
    15/06/2024 10:58 0 wal5007A6E0
    15/06/2024 10:58 0 wal795DB53F
    15/06/2024 10:58 0 wal20FACBDC
    15/06/2024 10:57 0 wal0ACF581B
    15/06/2024 10:57 0 wal4E2723E7
    15/06/2024 10:57 0 wal62EAA2EC
    14/06/2024 22:04 0 wal735FEC5C
    14/06/2024 22:04 0 wal03D0D79F
    14/06/2024 22:04 0 wal2E381ECA
    13/06/2024 21:26 0 wal6F3A684A
    13/06/2024 21:26 0 wal2334291D
    13/06/2024 21:26 0 wal2FFE45A3
    12/06/2024 21:24 0 wal513CC107
    12/06/2024 21:24 0 wal14B66D19
    12/06/2024 21:24 0 wal73F07E2C
    11/06/2024 10:15 0 wal78950252
    11/06/2024 10:15 0 wal6FDD865D
    11/06/2024 10:15 0 wal1E747B25
    10/06/2024 10:13 0 wal157EBF20
    10/06/2024 10:13 0 wal01C0E637
    10/06/2024 10:13 0 wal7EBB3372
    10/06/2024 08:22 0 wal560B72E2
    10/06/2024 08:22 0 wal3A974844
    10/06/2024 08:22 0 wal2B2250D8
    09/06/2024 10:11 0 wal248C04F4
    09/06/2024 10:11 0 wal403C13F1
    09/06/2024 10:11 0 wal37C40535
    08/06/2024 10:08 0 wal0ED5F5DA
    08/06/2024 10:08 0 wal04EFC698
    08/06/2024 10:08 0 wal6D3C64BF
    07/06/2024 09:41 0 wal5F88684C
    07/06/2024 09:41 0 wal5D5C2066
    07/06/2024 09:41 0 wal32508A42
    06/06/2024 09:40 0 wal459732E6
    06/06/2024 09:40 0 wal444D5FA5
    06/06/2024 09:40 0 wal0EEB3B68
    05/06/2024 09:37 0 wal13728D7B
    05/06/2024 09:37 0 wal2D27460E
    05/06/2024 09:37 0 wal06D3974B
    04/06/2024 21:53 0 wal1A7B04A7
    04/06/2024 21:53 0 wal12659CAB
    04/06/2024 21:53 0 wal00F4B912
    02/06/2024 09:21 0 wal6DE53CD5
    02/06/2024 09:21 0 wal5ED77F48
    02/06/2024 09:21 0 wal5E7CADD9
    01/06/2024 09:11 0 wal25E1EA4A
    01/06/2024 09:11 0 wal3A34C432
    01/06/2024 09:11 0 wal71D4111E
    01/06/2024 08:47 0 wal2A42C0A7
    01/06/2024 08:47 0 wal56EC486F
    01/06/2024 08:47 0 wal259EBB10
    31/05/2024 07:31 0 wal3616F785
    31/05/2024 07:31 0 wal32944940
    31/05/2024 07:31 0 wal71A554A6
    30/05/2024 21:52 0 wal3EA97CCC
    30/05/2024 21:52 0 wal696DB881
    30/05/2024 21:52 0 wal460CC787
    30/05/2024 07:28 0 wal64BA0BA2
    30/05/2024 07:28 0 wal30176627
    30/05/2024 07:28 0 wal2013F575
    29/05/2024 06:37 0 wal1C627B33
    29/05/2024 06:37 0 wal6823C720
    29/05/2024 06:37 0 wal220086F3
    27/05/2024 21:28 0 wal437307D2
    27/05/2024 21:28 0 wal066054E9
    27/05/2024 21:28 0 wal46BF2046
    26/05/2024 16:39 0 wal3E39912D
    26/05/2024 16:39 0 wal2195F39D
    26/05/2024 16:39 0 wal5DF301DA
    25/05/2024 20:21 0 wal0627CF4C
    25/05/2024 20:21 0 wal7D91D32F
    25/05/2024 20:21 0 wal5726118E
    25/05/2024 16:37 0 wal6011D024
    25/05/2024 16:37 0 wal620CE9EC
    25/05/2024 16:37 0 wal67AB5C4D
    24/05/2024 15:41 0 wal2AF07B44
    24/05/2024 15:41 0 wal5320A190
    24/05/2024 15:41 0 wal257B429A
    23/05/2024 15:41 0 wal62697D0A
    23/05/2024 15:41 0 wal3B774263
    23/05/2024 15:41 0 wal7048C16E
    22/05/2024 12:33 0 wal560DB285
    22/05/2024 12:33 0 wal359E2D1B
    22/05/2024 12:33 0 wal0BAA1141
    21/05/2024 12:30 0 wal0A9C855E
    21/05/2024 12:30 0 wal15AB3E2F
    21/05/2024 12:30 0 wal1CC38B35
    20/05/2024 16:36 0 wal24F3AFD8
    20/05/2024 16:36 0 wal78CC12F6
    20/05/2024 16:36 0 wal4DA6DB33
    19/05/2024 09:33 0 wal460D7356
    19/05/2024 09:33 0 wal2FFC220D
    19/05/2024 09:33 0 wal651DF305
    18/05/2024 08:38 0 wal52B51285
    18/05/2024 08:38 0 wal6F18659D
    18/05/2024 08:38 0 wal7DF1CC49
    18/05/2024 08:35 0 wal33445AC8
    18/05/2024 08:35 0 wal1ABD192C
    18/05/2024 08:35 0 wal169F6B5C
    16/05/2024 12:43 0 wal5359A36F
    16/05/2024 12:43 0 wal4A264450
    16/05/2024 12:43 0 wal53DC296C
    15/05/2024 15:11 0 wal2D040EEA
    15/05/2024 15:11 0 wal597C556C
    15/05/2024 15:11 0 wal3F1B44F0
    15/05/2024 12:39 0 wal2E13F2C2
    15/05/2024 12:39 0 wal691EC87B
    15/05/2024 12:39 0 wal724021B9
    14/05/2024 12:17 0 wal480ED880
    14/05/2024 12:17 0 wal73CC1FC9
    14/05/2024 12:17 0 wal55ED946A
    13/05/2024 12:13 0 wal57D8CE68
    13/05/2024 12:13 0 wal51B76D61
    13/05/2024 12:13 0 wal269A459C
    12/05/2024 12:09 0 wal4AFD3772
    12/05/2024 12:09 0 wal0DEAC778
    12/05/2024 12:09 0 wal275DFC40
    11/05/2024 12:09 0 wal4EF38122
    11/05/2024 12:09 0 wal6F504339
    11/05/2024 12:09 0 wal0B7E4D58
    10/05/2024 14:56 0 wal32767BAA
    10/05/2024 14:56 0 wal33F3DF63
    10/05/2024 14:56 0 wal436CEC86
    10/05/2024 12:06 0 wal6731FF83
    10/05/2024 12:06 0 wal6E7BFAF7
    10/05/2024 12:06 0 wal03B59283
    09/05/2024 12:06 0 wal18E3AFD3
    09/05/2024 12:06 0 wal48328DB6
    09/05/2024 12:06 0 wal6C327D3A
    08/05/2024 12:03 0 wal3AA534CA
    08/05/2024 12:03 0 wal487E56EB
    08/05/2024 12:03 0 wal77469718
    07/05/2024 12:02 0 wal162023FB
    07/05/2024 12:02 0 wal26DF08C6
    07/05/2024 12:02 0 wal5644557D
    06/05/2024 11:56 0 wal56B7E32E
    06/05/2024 11:56 0 wal61A7466B
    06/05/2024 11:56 0 wal7D7D59E5
    05/05/2024 11:55 0 wal0BC30045
    05/05/2024 11:55 0 wal56C479F7
    05/05/2024 11:55 0 wal3E694D2C
    05/05/2024 09:35 0 wal239A80DE
    05/05/2024 09:35 0 wal334C8350
    05/05/2024 09:35 0 wal3E0955EF
    04/05/2024 10:43 0 wal283EC616
    04/05/2024 10:43 0 wal48874F12
    04/05/2024 10:43 0 wal123B92C1
    03/05/2024 16:26 0 wal3FBE009F
    03/05/2024 16:26 0 wal527F85BB
    03/05/2024 16:26 0 wal3ED68AC2
    03/05/2024 10:40 0 wal6D386D4C
    02/05/2024 10:36 0 wal7CB28B8D
    01/05/2024 10:35 0 wal57CCEAD6
    30/04/2024 10:30 0 wal3E9E9D5E
    30/04/2024 10:30 0 wal64B0D3FD
    30/04/2024 10:30 0 wal30F00342
    29/06/2023 22:25 <DIR> ailt_liom
    04/09/2022 09:27 <DIR> Users
    08/01/2022 11:44 <DIR> drivers
    16/02/2017 15:47 <DIR> Intel
    14/07/2009 04:20 <DIR> PerfLogs
    561 File(s) 0 bytes
    9 Dir(s) 12,090,433,536 bytes free

    "
    --708268602-1557254040-1751647117=:2657643--
    --- Synchronet 3.21a-Linux NewsLink 1.2