SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32

Auto generate build/version number



You may, for example, create a file named makefile.targets at the root of your project, with the following content:
all: ../build_number.h

		if [ ! -r ../build.number ]; then \
			echo build_number=1 > ../build.number; \

		source ../build.number; \
		echo "build_number=$$((build_number + 1))" > ../build.number

.PHONY: bump.build.number
post-build: bump.build.number

../build_number.h: ../build.number
		source ../build.number; \
		echo "#define BUILD_NUMBER $$build_number" > $@
Be careful: the backslashes at the end of some lines must really be the last character of the line, with no spaces after, or this will not work (you can also put everything on one line but it’s far less readable).

Then include build_number.h in the file in which you need the build number; this file will define a macro named BUILD_NUMBER which will be bumped at each successful build.

Beware that each time you will launch a build, even if nothing else has changed, the program will be updated as th ebuild number has changed... Only bumping the build number when something has effectively changed (and not for each successful build) will need quite a few more logic...

Also you may have to slightly edit this makefile fragment if you want the generated files elsewhere in your project (although makefile.targets must stay at the root of the project).

Note also that this will only work if you use the external builder (make), not the internal one.This is one of the advantages of the external builder.

Bernard (Ac6)


Newest Forum Posts

  1. openOCD Wrong device detected by maxim221, 12:32
  2. STM32429I_Discovery board with printf float support problem by johannes.visser@msc-technologies.eu, 2019-12-05 16:08
  3. malloc heap issue with CubeMX Project by johannes.visser@msc-technologies.eu, 2019-12-05 16:04
  4. Debugger not working by Daniel Jack Morley, 2019-11-27 21:46
  5. Compiler change problem by Lucian Pop, 2019-11-20 17:41
  6. Sample programs and compiling by jjtimer, 2019-11-20 10:31
  7. Unit test issues for STM32 by Rinkedevries, 2019-11-18 10:32
  8. Ubuntu 19.04 Debug problems by costantino, 2019-11-17 19:17
  9. Compile without eclipse by JSStabl, 2019-11-14 15:55
  10. Problem with PWM signal by ElectroniK, 2019-11-13 20:55

Last-Modified Blogs