10‐Minute Quick Start - clevelandmusicco/HothouseExamples GitHub Wiki

So, you've got your assembled Hothouse and you're raring to go. You've come to the right place. Let's do this.

[!TIP] This quick start begins with the assumption most folks will want to eventually write their own effects code. If you don't want to do that (or if you're just impatient), you can skip to the last section on Using the Daisy Web Programmer.

Prerequisites

  • A functioning Daisy development environment - Nothing that comes after this will work until you have the Daisy toolchain installed, configured, and working properly. IF YOU CAN'T COMPILE CODE FROM DAISYEXAMPLES, YOU WON'T BE ABLE TO COMPILE THE HOTHOUSE EXAMPLES. So, be sure to get things functioning as per the Electrosmith documentation.
  • A Daisy Seed with 65MB of memory - While the 65MB is not critical, it is highly recommended. Several of the examples in this repo will not compile on the 1MB version of the Daisy Seed. Just spend the extra few dollars for the additional capacity.
  • A Cleveland Music Co. Hothouse (with a Daisy Seed installed) - Whether you acquired it as a kit or fully-assembled, either will work fine.

Getting and initializing the code

Clone the repo:

git clone https://github.com/clevelandmusicco/HothouseExamples

[!NOTE] If you cloned the repo at some point in the past (perhaps when you first became interested in the Hothouse), be sure to pull the latest code. It is an active code base often getting many commits each week. From the root directory:

git pull

Init and build the libDaisy and DaisySP libraries; these are included as submodules:

cd HothouseExamples
git submodule update --init --recursive

make -C libDaisy
make -C DaisySP

This will take a moment or two even on a powerful computer with a fast internet connection. There will be a lot of output from the build scripts and they'll end unceremoniously with something like:

[stuff omitted...]
arm-none-eabi-ar rcs build/libdaisysp-lgpl.a  build/line.o [more stuff omitted...] 
make[1]: Leaving directory '/SOME_FILE_PATH/HothouseExamples/DaisySP/DaisySP-LGPL'
Building DaisySP-LGPL
make: Leaving directory '/SOME_FILE_PATH/HothouseExamples/DaisySP'

If the build fails, the Daisy toolchain is not setup properly on your computer. Go through the toolchain setup again and ensure you can build the DaisyExamples code examples before coming back here.

If everything builds successfully, you're ready to continue!

Build a Hothouse example

In this quick start, we'll build the BasicTremolo example. From the root of your HothouseExamples directory:

cd src/BasicTremolo
make clean; make

This should only take a few seconds and end with output that looks like this:

[stuff omitted...]
Memory region         Used Size  Region Size  %age Used
           FLASH:       81524 B       128 KB     62.20%
         DTCMRAM:          0 GB       128 KB      0.00%
            SRAM:       15736 B       512 KB      3.00%
          RAM_D2:       16704 B       288 KB      5.66%
          RAM_D3:          0 GB        64 KB      0.00%
     BACKUP_SRAM:          12 B         4 KB      0.29%
         ITCMRAM:          0 GB        64 KB      0.00%
           SDRAM:          0 GB        64 MB      0.00%
       QSPIFLASH:          0 GB         8 MB      0.00%
arm-none-eabi-objcopy -O ihex build/basic_tremolo.elf build/basic_tremolo.hex
arm-none-eabi-objcopy -O binary -S build/basic_tremolo.elf build/basic_tremolo.bin

The resulting basic_tremolo.bin will be in src/BasicTremolo/build.

Flashing the Hothouse

To load an effect to your Hothouse, you will flash the compiled basic_tremolo.bin binary on to the Daisy Seed. There are two ways to do this:

  1. Via a USB cable (using DFU)
  2. With a JTAG/SWD debugger

Use whichever method you prefer. In either case, you'll need to take the back off the Hothouse the first time you flash an effect. This is so you can reach the Daisy Seed's buttons.

Flashing over USB (DFU)

Now that you've compiled the BasicTremolo code, connect the Daisy Seed (accessible via the cutout on the side of the Hothouse) to your computer with a USB cable. Then, enter flashable mode on your Daisy Seed (see pic here). Finally, flash with the following command (from the src/BasicTremolo directory):

make program-dfu

It will take a few seconds to write the effect to the Daisy Seed, and the output should look something like this:

[stuff omitted...]
Downloading element to address = 0x08000000, size = 81524
Erase   	[=========================] 100%        81524 bytes
Erase    done.
Download	[=========================] 100%        81524 bytes
Download done.
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status
make: *** [../../libDaisy/core/Makefile:345: program-dfu] Error 74

Don't worry about Error 74 ... it's normal 🤷🏼

[!TIP] Once you've flashed one of the examples in this repository, there is a way to put the Daisy Seed into flashable mode without pressing the RESET and BOOT buttons on the Daisy Seed: HOLD DOWN THE LEFT FOOTSWITCH FOR 2 SECONDS. The LEDs will alternately flash and the Daisy Seed will be ready to program with a new effect.

reset-gif
Don't be jealous of my limited edition knobbage :wink:

Read more about this in the FAQ section of the wiki.

Flashing with a JTAG/SWD Debugger

If you're using a JTAG/SWD debugger (AND WE HIGHLY RECOMMEND YOU DO if you're doing development work!) there's no need to enter flashable mode on the Daisy Seed. Make sure the Daisy Seed has power either via the USB cable OR plug a 9V center-negative power supply into the Hothouse's DC jack. Now, simply run this command with your debugger attached (again, from the src/BasicTremolo directory):

make program

You should see something similar to this:

[stuff omitted...]
** Programming Started **
Info : Device: STM32H74x/75x
Info : flash size probed value 128k
Info : STM32H7 flash has a single bank
Info : Bank (0) size is 128 kb, base address is 0x08000000
Info : Padding image section 1 at 0x08013e74 with 12 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x08013e80 .. 0x0801ffff
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked

Flashing the Daisy Seed with the JTAG/SWD debugger takes a fraction of the time compared to the DFU USB method, and you get the added benefit of being able to debug your code while it runs on the Daisy Seed. There are a few limitations that you may eventually discover, but we're focused on the basics of using your Hothouse here!

[!IMPORTANT] Be sure to supply 9V via the Hothouse’s DC jack or 5V via USB to the Daisy Seed. Otherwise, you will see an error similar to this when trying to program or debug:

Info : STLINK V3J13M4 (API v3) VID:PID 0483:3754
Info : Target voltage: 0.003204
Error: target voltage may be too low for reliable debugging
Error: init mode failed (unable to connect to the target)

VS Code

You can also do everything we just did above from within VS Code. Any of the effect projects in the src directory can be opened in VS Code. Use the File -> Open Folder... option and select the src/BasicTremolo directory (NOT the HothouseExamples or src directory):

image

[!IMPORTANT] Be sure to open the effect sub-directory of src like the src/BasicTremolo example above. This ensures that the tasks in tasks.json and the debug executable in launch.json work properly.

Using VS Code tasks

To run the above make commands from within VS Code, you can use the tasks defined in src/BasicTremolo/.vscode/tasks.json. To see the available tasks in VS Code, select Terminal -> Run Task... in the menus. A drop down list will appear with the defined tasks.

For example, to clean, compile, and flash the current effect binary over USB, run the build_and_program_dfu task. This task essentially runs make clean; make; make program-dfu in the project's root directory (src/BasicTremolo). The JTAG programmer task is build_and_program.

The tasks are the same across all of the Hothouse examples (defined in src/EXAMPLE_NAME/.vscode/tasks.json), so they will all work no matter which example you're working on.

Using the Daisy Web Programmer

Alternatively, you can flash the Daisy Seed with a USB cable using the Daisy Web Programmer.

image

Using the Web Programmer, you can flash any of the .bin files available at our latest release page to the Hothouse. Just download some or all of the .bin files and store them in a directory of your choosing.

The "Display Help" button on the Web Programmer page walks you through the process. Once you get to the point where you select a .bin file to flash, simply select one of the Hothouse example .bin files. It really is that easy.

What's next?

Ready to explore the examples? Head over to Hothouse Examples.

Or maybe you're ready to dive in and write your own effects? Check out Creating Your Own Effects.