How should I structure my files for new patches?

I’m ready to write some new patches for my Pod and I’d love to know what kind of workflow y’all recommend for that. Right now I’m flashing code from DaisyExamples, which has a makefile that points the libdaisy submodule’s makefile, etc. Should I just create my own workspace directory outside DaisyExamples and point my own makefiles to libdaisy also? Should I install libdaisy somewhere else so it’s easier to link with? Please let me know how you you have everything set up or what you’d recommend!

About my setup: I’m using Daisy Pod. I’ll only be using makefiles, I’m not worried about VS solutions or any CMake stuff, and no special IDE.

I saw this:

I ran it and it created an empty template. Be careful with the path you decide on, helper.py makes some assumptions about where you run it from. I haven’t built it or flashed anything yet (waiting for my parcel to arrive) so I can’t speak to how well it works, but it might get you started.

Cheers,

2 Likes

Welcome to the forum @kwaddle!

Like you I am “only” using make and make program-dfu.

When I start a new project I just create a new directory and copy a Makefile. Change the path variables LIBDAISY_DIR and DAISYSP_DIR so they point to the right directories. You also have to change the TARGET name and add your sources to CPP_SOURCES.

An example:

# Project Name
TARGET = oscpocketd

# Sources
CPP_SOURCES = main.cpp ui.cpp lcd.cpp

# Library Locations
LIBDAISY_DIR = ../../DaisyExamples/libdaisy
DAISYSP_DIR = ../../DaisyExamples/DaisySP

# Core location, and generic makefile.
SYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core
include $(SYSTEM_FILES_DIR)/Makefile

That is all you have to do, no need to copy or install anything else.

2 Likes