Ondrovo.com

Tangara docker dev setup

I started editing the Tangara firmware - after all, it cost me a lot of money, so might as well try.

Esp-idf is notoriously a mess and I have had some problems with python versions an pip and whatnot in the past. This setup uses pre-built docker images to avoid that pain.

My Tangara firmware fork can be found here on gitea - branch “custom”: https://git.ondrovo.com/MightyPork/tangara-fw

To work with it, I recursively cloned the tangara project into a folder called tangara-fw. In the parent directory, I created a Makefile with these launchers:

build:
	docker run --rm -v ./tangara-fw:/project -e PROJ_PATH=/project/ -w /project espressif/idf:v5.3 idf.py build

flash:
	docker run --rm -v ./tangara-fw:/project -e PROJ_PATH=/project/ --device=/dev/ttyACM0 -w /project espressif/idf:v5.3 idf.py -p /dev/ttyACM0 -b 1000000 flash

luaflash:
	docker run --rm -v ./tangara-fw:/project -e PROJ_PATH=/project/ -e ESPTOOL_PORT=/dev/ttyACM0 --device=/dev/ttyACM0 -w /project/build espressif/idf:v5.3 ninja lua-flash

monitor:
	docker run --rm -v ./tangara-fw:/project -i -t -e PROJ_PATH=/project/ --device=/dev/ttyACM0 -w /project espressif/idf:v5.3 idf.py -p /dev/ttyACM0 -b 115200 monitor

It uses esp-idf in the exact version that is part of the firmware repo. The version is important - but it does not need to run from that subdirectory. I did not try this, but I think you do not even need the recursive clone with this setup. esp-idf is part of the docker image.

Make sure your serial port is called /dev/ttyACM0 (adjust the Makefile as needed) and that you have rights to access it.