Keep the compiled '.bin' file to remove the need to compile it when
flashing. This remove the need to have the toolchain when flashing so
allow compiling and flashing with `BUILD_IN_DOCKER=1` without a local
toolchain.
Even if it ends up storing a binary, the file is only 34 bytes.
With the canned recipe for flashing, flash dependencies should be
added to FLASHDEPS, instead of writing `flash: dependencies`. This
ensures that both flash and flash-only depend on the same prerequisites.
This allows a board configuration to select which kind of averaging
should be applied to the pin instead of always using 32 sample average.
Very high impedance sources may need to disable hardware averaging in
order to give correct values, the on-chip temperature sensor is one such
signal source.
MCPU is already defined to `CPU_ARCH` which is `cortex-m4`.
Removing this line does not change the value:
make --no-print-directory -C examples/hello-world/ BOARD=pba-d-01-kw2x \
info-debug-variable-CPU_ARCH info-debug-variable-MCPU
cortex-m4
cortex-m4
A dispatcher function is implemented for directing writes to the correct
function. The dispatcher is bypassed completely if the CPU only contain
one kind of UART module.
There are at least two different UART hardware modules deployed in
different Kinetis CPU families (or possibly three or more when counting
variations of the UART module). The UART module is an older 8 bit module
with advanced functionality, while the LPUART is a 32 bit module with
focus on low power consumption.
- The older families in the K series all have UART modules.
- The K22F family have both UART and LPUART modules in the same CPU.
- Older L series (e.g. KL25Z) have two variations of the UART module
- Newer L series (e.g. KL43Z) have LPUART modules, and sometimes
UART as well.
- Newer W series (KW41Z) have only LPUART
- Merge flash and flash-elf commands since they were identical except
for the file name of the image
- Split GDB command from DBG environment variable to allow more easily
configure front-ends for GDB via environment variables.
- Remove verbose tests of empty variables and replace by `: ${VAR:=default}`
- Remove passed command line arguments to sub-functions, they were
unused in the functions anyway.
- Remove TUI variable, use `export DBG_EXTRA_FLAGS=-tui` to get the same
result.
Unify cpu_init for all Kinetis CPUs to reduce code duplication.
Updated the MCG driver implementation to make the configuration easier.
Most clock settings are initialized by kinetis_mcg_init() called from
cpu_init. Board specific external clock source initialization
(FRDM-K64F, PhyNode) needs to be performed in board_init instead of
in cpu_init.
- use assert() for checking the line parameter
- use 'bit.h' for bitbanding
- simplified code a bit
- unified style of defifining the board configuration
- removed unused configurations form pba-d-01-kw2x and frdm-k64f