Pure Data

Hi @Jaffasplaffa

Apologies on the lack of updates here on the Pure Data thread over the past few months.

Some of the pieces of the integration have ended up taking a bit more time than we originally anticipated, but we have made some good progress, and are still working hard to make it all happen!

Here are just a few notes about the state of the Pure Data integration, and where we’re at in supporting it.

We’ve been working on a new flash loader that allows using larger programs (as the binaries generated from pure data can end up being pretty large), and allowing the use of the external SDRAM for extra memory. This ended up taking a bit longer than we originally anticipated, but it is now in the review stages, and seems to be working to use large amounts of data, and to run programs with more objects.

In order to support custom hardware (i.e. Daisy Seed with custom interface elements attached), we needed to come up with some sort of metadata format that would allow for mapping parameters in pure data to various controls connected to the Daisy. This has seem some good progress, and we’re working to make that a universal format that can work for the other integrations as well. It was just added into the latest commits on the oopsy support for Max/MSP gen~, and will be making it’s way into our current pd2dsy implementation as soon as possible.

For the user, this will be a simple .json file that will define the hardware mapping. For example, here is what it might look like if you were going to mirror the Daisy Pod:

{
	"name":"pod",
	"components": {
		"sw1": {
			"component": "Switch",
			"pin": 27
		},
		"sw2": {
			"component": "Switch",
			"pin": 28
		},
		"knob1": {
			"component": "AnalogControl",
			"pin": 21
		},
		"knob2": {
			"component": "AnalogControl",
			"pin": 15
		},
		"encoder": {
			"component": "Encoder",
			"pin": {"a":26, "b":25, "click":13 }
		},
		"led1": {
			"component": "RgbLed",
			"pin": {"r":20, "g":19, "b":18 }
		},
		"led2": {
			"component": "RgbLed",
			"pin": {"r":17, "g":24, "b":23 }
		}
	}
}

This json file will likely be able to get passed into the pd2dsy script the same way you would select one of the other boards (i.e. python pd2dsy.py --board MyCustomBoard.json project.pd)

Pending any unexpected hang ups we’re hoping to be wrapping up both of these changes into pd2dsy very shortly.

As @dreamer mentioned, he’s been leading the charge on integrating the Daisy directly into the revived version of hvcc that runs with python3. This does seem to be working great right now, and we’ll be working with him to integrate the changes mentioned above into that platform as we progress.

We’ll post more regular updates here as we continue to progress.

2 Likes

re. large binary size of pd patches:

There are some ideas to get [expr] objects working, then we can most likely optimize a lot of the internal hvcc objects which could save a lot on the size of these builds (won’t be coming any time soon, but I’m sure this is something that would benefit everyone).

1 Like

@ shensley

Thank you so much for the update. I am so happy to hear something is still happening, regarding the PD>Daisy script, cause it’s been a while now.

I did not want to create any fuzz, I just wanted to know that the PD approach was still in the works.

And I think spending time on being able to load patches to the SDram, is super important, so any time spend on that is well spend time :slight_smile:

I will keep an eye out for any progress.

Thanks for the feedback!

Hi. I’m new to Daisy and new on the forum here, I have a few Seeds on their way to me, very excited! PD is my tool so I’m hoping I can get my patches working on the Seed.

I wondered if there was any update on the forthcoming script as outlined in this thread and also wanted to know should I be using the original hvcc with Python 2.7 or dreamer’s updated version for the latest Python? (python is new to me as is most of the process for compiling a PD patch for Daisy). Any assistance for a newbie most appreciated.

Thank-you,
crewdson

Hi. I’ve been following the steps to get set up with pd2dsy and have successfully (I think?!) managed to compile a PD patch and can see that a new folder has been created with the ‘.h .cpp and makefile’ files as well as ‘c hv build and ir’ folders.

I then try and flash to my seed using ‘make program-dfu’ in terminal and get the below.

Can anyone tell me what my issue is?
I’m using the ‘saw_test’ example here to avoid any pure data object issues whilst i sort this problem out
Many thanks

Hughs-MacBook-Pro-2:~ Crewdson$ cd pd2dsy/saw_test
Hughs-MacBook-Pro-2:saw_test Crewdson$ make
make: Nothing to be done for `all'.
Hughs-MacBook-Pro-2:saw_test Crewdson$ make program-dfu
dfu-util -a 0 -s 0x08000000:leave -D build/saw_test.bin -d 0483:df11
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash   "
Downloading element to address = 0x08000000, size = 62052
Erase   	[=========================] 100%        62052 bytes
Erase    done.
Download	[=========================] 100%        62052 bytes
Download done.
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status
make: *** [program-dfu] Error 74

I believe that error number 74 is a red herring explained here: Make program-dfu error - #4 by shensley (look at or near the end of the thread for the explanation) I think everything should be working, despite the error.

Regards,
John

@jcgriggs is absolutely right. This error is a part of the tool used to flash the daisy, and is unfortunately unavoidable, but it is nothing to worry about.

Re. the newer version of the script (that handles compilation, etc. as well as fully supported custom JSON) should be wrapped up in the next few weeks. It’s mostly undergoing testing at this point.

@jcgriggs @shensley many thanks to both of you, that is great news on both counts. in which case i’ll get breadboarding and see what input control and output of sound i can muster.

will be great to get the new script when it’s ready, thanks for your continuing work on that

thank-you!

Hi. I have an issue where I’m seemingly able to get my PD patch successfully compiled and then flashed to my seed but the audio that is coming out is corrupted.

There is a loud high pitched tone (that isn’t supposed to be there) along with the output of my patch playing quietly underneath it. This plays out of the speaker when the speaker is connected to both of the Audio out pins (18, 19) but also weirdly the Audio In pins (16,17). This made me think I had connected things wrongly on the breadboard but when I flash one of the Seed_DSP example patches from the Web Programmer the sound comes out perfectly.

I’m stumped! Any ideas??
Thanks in advance

Here is what I get in Terminal when I run ‘make’ and then ‘make program-dfu’:

Hughs-MacBook-Pro-2:tone_generator_seq Crewdson$ make
mkdir build
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvControlBinop.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvControlBinop.lst c/HvControlBinop.c -o build/HvControlBinop.o
In file included from c/HvHeavy.h:20,
                 from c/HvHeavyInternal.h:20,
                 from c/HvControlBinop.h:20,
                 from c/HvControlBinop.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvControlCast.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvControlCast.lst c/HvControlCast.c -o build/HvControlCast.o
In file included from c/HvHeavy.h:20,
                 from c/HvHeavyInternal.h:20,
                 from c/HvControlCast.h:20,
                 from c/HvControlCast.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvControlDelay.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvControlDelay.lst c/HvControlDelay.c -o build/HvControlDelay.o
In file included from c/HvHeavy.h:20,
                 from c/HvHeavyInternal.h:20,
                 from c/HvControlDelay.h:22,
                 from c/HvControlDelay.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvControlSystem.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvControlSystem.lst c/HvControlSystem.c -o build/HvControlSystem.o
In file included from c/HvHeavy.h:20,
                 from c/HvHeavyInternal.h:20,
                 from c/HvControlSystem.h:20,
                 from c/HvControlSystem.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvControlVar.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvControlVar.lst c/HvControlVar.c -o build/HvControlVar.o
In file included from c/HvHeavy.h:20,
                 from c/HvHeavyInternal.h:20,
                 from c/HvControlVar.h:20,
                 from c/HvControlVar.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvLightPipe.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvLightPipe.lst c/HvLightPipe.c -o build/HvLightPipe.o
In file included from c/HvLightPipe.h:20,
                 from c/HvLightPipe.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvMessage.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvMessage.lst c/HvMessage.c -o build/HvMessage.o
In file included from c/HvMessage.h:20,
                 from c/HvMessage.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
In file included from c/HvMessage.h:20,
                 from c/HvMessage.c:17:
c/HvMessage.c: In function 'msg_toString':
c/HvMessage.c:172:55: warning: format '%X' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
  172 |       case HV_MSG_HASH: len[i] = hv_snprintf(NULL, 0, "0x%X", msg_getHash(m, i)) + 1; break;
      |                                                       ^~~~~~  ~~~~~~~~~~~~~~~~~
      |                                                               |
      |                                                               uint32_t {aka long unsigned int}
c/HvUtils.h:131:50: note: in definition of macro 'hv_snprintf'
  131 | #define hv_snprintf(a, b, c, ...) snprintf(a, b, c, __VA_ARGS__)
      |                                                  ^
c/HvMessage.c:172:59: note: format string is defined here
  172 |       case HV_MSG_HASH: len[i] = hv_snprintf(NULL, 0, "0x%X", msg_getHash(m, i)) + 1; break;
      |                                                          ~^
      |                                                           |
      |                                                           unsigned int
      |                                                          %lX
In file included from c/HvMessage.h:20,
                 from c/HvMessage.c:17:
c/HvMessage.c:191:62: warning: format '%X' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
  191 |       case HV_MSG_HASH: hv_snprintf(finalString+pos, len[i], "0x%X", msg_getHash(m, i)); break;
      |                                                              ^~~~~~  ~~~~~~~~~~~~~~~~~
      |                                                                      |
      |                                                                      uint32_t {aka long unsigned int}
c/HvUtils.h:131:50: note: in definition of macro 'hv_snprintf'
  131 | #define hv_snprintf(a, b, c, ...) snprintf(a, b, c, __VA_ARGS__)
      |                                                  ^
c/HvMessage.c:191:66: note: format string is defined here
  191 |       case HV_MSG_HASH: hv_snprintf(finalString+pos, len[i], "0x%X", msg_getHash(m, i)); break;
      |                                                                 ~^
      |                                                                  |
      |                                                                  unsigned int
      |                                                                 %lX
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvMessagePool.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvMessagePool.lst c/HvMessagePool.c -o build/HvMessagePool.o
In file included from c/HvMessagePool.h:20,
                 from c/HvMessagePool.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvMessageQueue.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvMessageQueue.lst c/HvMessageQueue.c -o build/HvMessageQueue.o
In file included from c/HvMessage.h:20,
                 from c/HvMessageQueue.h:20,
                 from c/HvMessageQueue.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvSignalPhasor.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvSignalPhasor.lst c/HvSignalPhasor.c -o build/HvSignalPhasor.o
In file included from c/HvHeavy.h:20,
                 from c/HvHeavyInternal.h:20,
                 from c/HvSignalPhasor.h:20,
                 from c/HvSignalPhasor.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvSignalVar.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvSignalVar.lst c/HvSignalVar.c -o build/HvSignalVar.o
In file included from c/HvHeavy.h:20,
                 from c/HvHeavyInternal.h:20,
                 from c/HvSignalVar.h:20,
                 from c/HvSignalVar.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvTable.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvTable.lst c/HvTable.c -o build/HvTable.o
In file included from c/HvHeavy.h:20,
                 from c/HvTable.h:20,
                 from c/HvTable.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvUtils.d" -std=gnu11 -Wa,-a,-ad,-alms=build/HvUtils.lst c/HvUtils.c -o build/HvUtils.o
In file included from c/HvUtils.c:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/system_stm32h7xx.d" -std=gnu11 -Wa,-a,-ad,-alms=build/system_stm32h7xx.lst ../libdaisy/core/system_stm32h7xx.c -o build/system_stm32h7xx.o
arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/startup_stm32h750xx.d" -std=gnu11 -Wa,-a,-ad,-alms=build/startup_stm32h750xx.lst ../libdaisy/core/startup_stm32h750xx.c -o build/startup_stm32h750xx.o
arm-none-eabi-g++  -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HeavyContext.d" -fno-exceptions -fasm -finline -finline-functions-called-once -fshort-enums -fno-move-loop-invariants -fno-unwind-tables  -std=gnu++14 -Wa,-a,-ad,-alms=build/HeavyContext.lst c/HeavyContext.cpp -o build/HeavyContext.o
In file included from c/HeavyContextInterface.hpp:20,
                 from c/HeavyContext.hpp:20,
                 from c/HeavyContext.cpp:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-g++  -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/Heavy_tone_generator_seq.d" -fno-exceptions -fasm -finline -finline-functions-called-once -fshort-enums -fno-move-loop-invariants -fno-unwind-tables  -std=gnu++14 -Wa,-a,-ad,-alms=build/Heavy_tone_generator_seq.lst c/Heavy_tone_generator_seq.cpp -o build/Heavy_tone_generator_seq.o
In file included from c/HeavyContextInterface.hpp:20,
                 from c/HeavyContext.hpp:20,
                 from c/Heavy_tone_generator_seq.hpp:37,
                 from c/Heavy_tone_generator_seq.cpp:33:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
arm-none-eabi-g++  -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/HvHeavy.d" -fno-exceptions -fasm -finline -finline-functions-called-once -fshort-enums -fno-move-loop-invariants -fno-unwind-tables  -std=gnu++14 -Wa,-a,-ad,-alms=build/HvHeavy.lst c/HvHeavy.cpp -o build/HvHeavy.o
In file included from c/HeavyContextInterface.hpp:20,
                 from c/HeavyContext.hpp:20,
                 from c/HvHeavy.cpp:17:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
c/HvHeavy.cpp:24: warning: ignoring '#pragma mark ' [-Wunknown-pragmas]
   24 | #pragma mark - Heavy Table
      | 
c/HvHeavy.cpp:45: warning: ignoring '#pragma mark ' [-Wunknown-pragmas]
   45 | #pragma mark - Heavy Message
      | 
c/HvHeavy.cpp:127: warning: ignoring '#pragma mark ' [-Wunknown-pragmas]
  127 | #pragma mark - Heavy Common
      | 
c/HvHeavy.cpp:294: warning: ignoring '#pragma mark ' [-Wunknown-pragmas]
  294 | #pragma mark - Heavy Common
      | 
arm-none-eabi-g++  -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DUSE_HAL_DRIVER -DHSE_VALUE=16000000 -DSTM32H750xx -Ic/ -I../libdaisy -I../libdaisy/src/ -I../libdaisy/Drivers/CMSIS/Include/ -I../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../libdaisy/core/ -I  -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -MMD -MP -MF"build/tone_generator_seq.d" -fno-exceptions -fasm -finline -finline-functions-called-once -fshort-enums -fno-move-loop-invariants -fno-unwind-tables  -std=gnu++14 -Wa,-a,-ad,-alms=build/tone_generator_seq.lst tone_generator_seq.cpp -o build/tone_generator_seq.o
In file included from c/HeavyContextInterface.hpp:20,
                 from c/HeavyContext.hpp:20,
                 from c/Heavy_tone_generator_seq.hpp:37,
                 from tone_generator_seq.cpp:5:
c/HvUtils.h:33:4: warning: #warning Could not detect platform. Assuming Unix-like. [-Wcpp]
   33 |   #warning Could not detect platform. Assuming Unix-like.
      |    ^~~~~~~
In file included from tone_generator_seq.cpp:3:
daisy_boards.h: In function 'void __static_initialization_and_destruction_0(int, int)':
daisy_boards.h:73:14: warning: statement has no effect [-Wunused-value]
   73 | DaisyHvParam DaisyParameters[0];
      |              ^~~~~~~~~~~~~~~
arm-none-eabi-g++  build/HvControlBinop.o build/HvControlCast.o build/HvControlDelay.o build/HvControlSystem.o build/HvControlVar.o build/HvLightPipe.o build/HvMessage.o build/HvMessagePool.o build/HvMessageQueue.o build/HvSignalPhasor.o build/HvSignalVar.o build/HvTable.o build/HvUtils.o build/system_stm32h7xx.o build/startup_stm32h750xx.o build/HeavyContext.o build/Heavy_tone_generator_seq.o build/HvHeavy.o build/tone_generator_seq.o  -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard --specs=nano.specs --specs=nosys.specs -T../libdaisy/core/STM32H750IB_flash.lds -L../libdaisy/build  -ldaisy -lc -lm -lnosys -Wl,-Map=build/tone_generator_seq.map,--cref -Wl,--gc-sections -o build/tone_generator_seq.elf
arm-none-eabi-size build/tone_generator_seq.elf
   text	   data	    bss	    dec	    hex	filename
  63620	    800	  15024	  79444	  13654	build/tone_generator_seq.elf
arm-none-eabi-objcopy -O ihex build/tone_generator_seq.elf build/tone_generator_seq.hex
arm-none-eabi-objcopy -O binary -S build/tone_generator_seq.elf build/tone_generator_seq.bin
Hughs-MacBook-Pro-2:tone_generator_seq Crewdson$ make program-dfu
dfu-util -a 0 -s 0x08000000:leave -D build/tone_generator_seq.bin -d 0483:df11
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash   "
Downloading element to address = 0x08000000, size = 64428
Erase   	[=========================] 100%        64428 bytes
Erase    done.
Download	[=========================] 100%        64428 bytes
Download done.
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status
make: *** [program-dfu] Error 74
Hughs-MacBook-Pro-2:tone_generator_seq Crewdson$ make program-dfu
dfu-util -a 0 -s 0x08000000:leave -D build/tone_generator_seq.bin -d 0483:df11
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash   "
Downloading element to address = 0x08000000, size = 64428
Erase   	[=========================] 100%        64428 bytes
Erase    done.
Download	[=========================] 100%        64428 bytes
Download done.
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status
make: *** [program-dfu] Error 74
Hughs-MacBook-Pro-2:tone_generator_seq Crewdson$ 

Hey everyone!
I just got my Daisy patch and trying to upload some PD patches…

I successfully converted them into C code, compiled, and got them running on daisy though there is a problem with dac 1 and 2 outputs… they are not working completely even with included test examples…

I went through a little debugging of the issue and got to the conclusion that there might be a problem with the translation of PD patch into daisy code since other example projects (DaisyExamples) are working fine on the 1st and 2nd outputs, so that’s definitely not a hardware issue

@litviakk There’s a new version of pd2dsy coming out very soon, you may want to wait a few days for that. I suspect it could fix your issue!

@ben_serge @shensley any update on the PD2DSY update? i’m desperate to get stuck in with my new Pod and Seeds! thank-you

@crewdson it’s looking like we’re on track for making a release today or tomorrow! We’ll post back here when it’s live :slight_smile:

We’re just wrapping up some minor fixes and documenting changes to the installation/setup process.

If you want to try it out early, you can clone the json_and_boot branch of pd2dsy, run the install.sh, and give it a try!

Amazing. Very exciting. Thank-you @shensley

A few days late, but it’s out! :fireworks:

Here is the new release of pd2dsy

In summary:

  • the tool now uses python3 instead of python2
  • custom JSON can be used to work with hardware using the Daisy Seed or Daisy Patch SM
  • build options allow for access to larger code-sizes (beyond the previous 128kB limit), and the 64MB of external SDRAM.
  • the utility will now compile and attempt to flash the daisy after converting the pd patch
  • all of the official breakout boards are now fully supported (missing functionality from the daisy patch and the entire daisy field have been added)
    • exception being access to OLED displays on boards like the Patch and Field are still in development

Information for installing, and using the tool can be found at the top of the README.

This is just the beginning of our improvements to this workflow, and we look forward to seeing what wonderful creations people make!

6 Likes

Excited to get started with this and the Patch SM! But anyone get this new pd2sy working? I get stuck at the USAGE section - I get the error that
bash: ./pd_env/Scripts/activate.sh: No such file or directory
I wonder if theres a problem with the windows installation? I notice that in the Scripts folder theres no activate.sh file, but not sure if thats right or not.

@fadedinstruments Did you go through the install instructions very carefully? You can do them again if you have any doubts. Were there any errors during install?

If that doesn’t fix it, what do you get when you run ls ./pd_env/

@fadedinstruments

I was able to recreate your issue on my end – I suppose certain windows systems will have slightly different results.

To resolve the issue on your end you can run the following instead:

source pd_env/Scripts/activate

We’ll update the README to reflect this as well.

Hope that helps!

1 Like

Thanks for the quick response! So, when I put that in it just responds with a (pd_env) but no corvus~… after it. However, when I go through with the python pd2dsy.py --board .pd and translate a PD file it does seem to work :slight_smile: I dont have my prototyping board yet so its hard to fully check the patch_sm (plus I’m still struggling to figure it all out), but when I touch an audio cable to the audio output pins it seems to work! Thanks!

@fadedinstruments Glad it’s working! The corvus: you see in the screenshots is the username being displayed in the shell, just to let you know who you’re logged in as, and what line you’re on. In git bash it looks slightly different but it’s the same idea.

image

Anyways, that’s not part of the output so you should be ready to go!