-
Notifications
You must be signed in to change notification settings - Fork 147
Description
Environment
- OpenOCD version: pulled direct from git today.
- Operating System: Pi OS Lite (Debian Bullseye) fresh install - updated and upgraded
- Hardware : Pi 4
Problem Description
Building OCD-ESP32 fails on Pi
I am following the build instructions here.
These are as follows :
sudo apt-get update
sudo apt-get install -y git make pkg-config autoconf libtool libusb-1.0-0 libusb-1.0-0-dev
git clone https://github.com/espressif/openocd-esp32 ~/openocd-esp32
cd ~/openocd-esp32
./bootstrap
./configure --enable-sysfsgpio --enable-bcm2835gpio
make
The build is not successful and throws the following errors
In file included from ./src/flash/common.h:21, from src/flash/nor/core.h:25, from src/flash/nor/imp.h:22, from src/flash/nor/jtagspi.c:22: src/flash/nor/jtagspi.c: In function ‘jtagspi_write_enable’: ./src/helper/log.h:130:2: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 130 | log_printf_lf(LOG_LVL_ERROR, __FILE__, __LINE__, __func__, expr) | ^~~~~~~~~~~~~ src/flash/nor/jtagspi.c:262:11: note: ‘status’ was declared here 262 | uint32_t status; | ^~~~~~ src/flash/nor/jtagspi.c: In function ‘jtagspi_wait’: src/flash/nor/jtagspi.c:249:15: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 249 | if ((status & SPIFLASH_BSY_BIT) == 0) { | ~~~~~~~~^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:3550: src/flash/nor/jtagspi.lo] Error 1 make[2]: Leaving directory '/home/pi/openocd-esp32' make[1]: *** [Makefile:4524: all-recursive] Error 1 make[1]: Leaving directory '/home/pi/openocd-esp32' make: *** [Makefile:2111: all] Error 2
Debug Logs
Make log attached.
make_log.txt
This issue seems to be OCD-ESP32 specifc, I did try to make a generic OCD and this looks to have worked