LUFA 120730 re-builds each time

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was tracking down a build error for LUFA where it complained about invalid suffix 'x' on the symbol BOOT_START_ADDR in BootloaderCDC.c. It turns out, "bc" was not installed on my system, which generated an empty boot start address in the makefile.

However, while tracking this down, each top-level "make" in the LUFA-120730 directory appears to re-build everything. This takes a while! Why is this? Make is supposed to only re-build targets that need changing, and proper dependencies are easy to generate with "gcc -MMD"?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The top-most makefile and the second level makefiles are for building *everything* with their current configurations -- and I wouldn't recommend it unless you pre-configure all the demos to your liking. I run it with a validation script to ensure that I don't break anything when developing. You can run it on *nix systems in parallel with the parameters OBJDIR=obj -j4 to build in parallel and preserve the build state.

A better idea is to run the individual project/demo makefiles, which only rebuilds that particular demo. Again, you can use OBJDIR=obj (or any other folder name) to preserve the build state in case you switch between different demos.

The bootloader BC dependency is fixed in the latest trunk, which you can obtain from http://lufa-lib.org/latest-archive .

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!