From 304b7225df68a796d398b9547ecc7636fbd32a07 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Sun, 15 May 2022 23:27:30 +0200 Subject: [PATCH] Added sdkconfig update helper --- update_all_sdkconfigs.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 update_all_sdkconfigs.py diff --git a/update_all_sdkconfigs.py b/update_all_sdkconfigs.py new file mode 100755 index 0000000..a8bf3ab --- /dev/null +++ b/update_all_sdkconfigs.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +import os +import subprocess + +# execute './switchconf.sh --list' to get the list of available configurations +output = subprocess.check_output(['bash', './switchconf.sh', '--list']).decode('utf-8').splitlines() + +if len(output) == 0: + print('No configurations found!') + exit(1) + +# check if PATH (env) contains 'bobbycar-boardcomputer-firmware +if 'bobbycar-boardcomputer-firmware' not in os.environ['PATH']: + print('Please execute ". export.sh"') + exit(1) + +for config in output: + print('Switching to configuration: ' + config) + subprocess.check_call(['bash', './switchconf.sh', config]) + # execute idf.py menuconfig and wait for user to close again + subprocess.check_call(['idf.py', 'menuconfig']) \ No newline at end of file