diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-04-19 07:50:05 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-04-19 07:50:05 +0200 |
commit | 666b73d0d9eed9f6ccd49ea43c8211d0f4160305 (patch) | |
tree | d3a61cb49425e5f63d6690282fae33f8a5d5ef1e | |
parent | ebbd23fc2e1ebfe764350063259a27cc8e1b009e (diff) |
runner: KRATOS: Verify baud rate and cyclecounter availability
-rw-r--r-- | lib/runner.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/runner.py b/lib/runner.py index ea3ee0d..fe383fc 100644 --- a/lib/runner.py +++ b/lib/runner.py @@ -407,7 +407,26 @@ class KRATOS: """ return ret + def sanity_check_config(self): + with open(".config", "r") as f: + config_lines = f.readlines() + for line in config_lines: + line = line.strip() + if ( + "CONFIG_eUSCI_A_UART_BAUDRATE" in line + and line != "CONFIG_eUSCI_A_UART_BAUDRATE=9600" + ): + raise RuntimeError( + f"Unsupported UART baud rate in .config, must be 9600: {line}" + ) + if ( + "CONFIG_Architecture_MSP430FR_CycleCounter" in line + and line != "CONFIG_Architecture_MSP430FR_CycleCounter=y" + ): + raise RuntimeError(f"Kratos Cycle Counter is disabled") + def build(self, app, opts=list()): + self.sanity_check_config() command = ["make", "clean"] command.extend(self.opts) command.extend(opts) |