Commit Graph

4 Commits

Author SHA1 Message Date
Dave ca8cff670a Streamline build and add more processor variants
- CMakeLists.txt, src/CMakeLists.txt: user ARCH for the actual
processor, and ARCH_FAMILY to specify the arch_*.[ch] files.

- generic-gcc-avr.cmake: fix optimizations to O1 or O0

- make-targets.sh: simplify cmake invocation, eliminate mkdir+cd,
instead use cmake flags to specify directory names and source dir.
2022-12-30 02:31:02 -06:00
Dave 51022040f1 Update to automate firmware builds
- build on checkin to asdf-release or asdf-built-test
- deploy to https://dfnr2.github.io/unified-retro-keyboard
2022-09-07 15:38:28 -05:00
Dave 9aa3bf4681 Fix compiler warning for GCC >= 11.3
- GCC version 12 generates a warnings for certain pointer
references.  Apparently this is to decect invalid offsets.  To properly
compiler, the recommended remedy is to add the compiler option
"--param=min-pagesize=0" to the flags.  This option was introduced in
version 11.3, so we need to check the compiler version and only add for
>11.3.

- Moved setting of compiler flags to a new function c_toolchain_flags in
the toolchain file "generic-gcc-avr.cmake".  This function is now called
from the CMakeLists.txt file in the src directory.  This allows the test
for the compiler version to be specified in the toolchain file, but not
executed until called by the src subdir CMakeLists.txt.  Delaying
evaluation of the function ensures that the CMAKE_C_VERSION variable is
properly set when the function is called.

- Moving the compiler flags out of the source dir CMakeLists.txt file
also improves portability by moving architecture-specific compiler
details from the source tree to the toolchain file.
2022-09-02 00:00:55 -05:00
Dave e9c38e3c51 Replace Makefiles with CMake build system
- CMake build process handles dependencies much more effectively

- Cleaner separation of test and binary builds

- permit co-existing test and multiple architecture builds

- add support for AVR from cmake-avr:
      https://github.com/mkleemann/cmake-avr

- new build process avoids creating files in the src directory
2021-03-04 22:27:15 -06:00