#!/bin/bash
set -eu -o pipefail
cp -f ./pico_sdk/tools/elf2uf2/CMakeLists.txt ${PICO_SDK_PATH}/tools/elf2uf2/CMakeLists.txt
export BOARD="PICO"
export LOG_PATH="./_log"
mkdir -p ${LOG_PATH}
DT=`date +%Y%m%d%H%M`
make V=1 DEBUG=1 BOARD=${BOARD} clean 2>&1 | tee ${LOG_PATH}/${BOARD}_build_${DT}.log
make V=1 DEBUG=1 BOARD=${BOARD}       2>&1 | tee -a ${LOG_PATH}/${BOARD}_build_${DT}.log