Skip to content

Commit b166022

Browse files
committed
adjustments for new hvcc
1 parent 7490277 commit b166022

3 files changed

Lines changed: 14 additions & 16 deletions

File tree

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,17 @@ This has been done on a Ubuntu server 18.04
3232

3333
Either install gcc-arm-none-eabi system-wide and ensure the binaries are in your path, or edit OwlProgram/compile.mk and point TOOLROOT to where arm-none-eabi binaries are installed.
3434

35-
TOOLROOT = /usr/bin/
35+
TOOLROOT = /usr/bin/
3636

3737
To compile puredata patches you need `hvcc`, the Heavy compiler.
3838

39-
$ sudo apt install python python-enum34 python-jinja2 python-nose2
40-
$ git clone https://github.com/pingdynasty/hvcc.git
39+
$ sudo pip3 install hvcc
4140

4241
To compile patches in native format (e.g. for testing) you will also need the gcc compiler:
4342

4443
$ sudo apt install gcc
45-
46-
Compile FirmwareSender
44+
45+
Compile FirmwareSender
4746

4847
FirmwareSender makes it possible to use `load` and `store` make targets, or by invoking FirmwareSender directly to load/store a compiled patch to the device using sysex codes.
4948

@@ -53,7 +52,7 @@ FirmwareSender makes it possible to use `load` and `store` make targets, or by i
5352
$ make
5453
$ cp build/FirmwareSender ../../../OwlProgram/Tools
5554
$ cd ../../../
56-
55+
5756
## Make targets
5857
* make libs: build library archives
5958
* make patch: build patch binary
@@ -145,7 +144,7 @@ Note: use OWL parameters in Maximilian by adding maxiParam objects to your patch
145144

146145
## Using FirmwareSender
147146

148-
If you prefer to build the patch first and send it later to the device you can
147+
If you prefer to build the patch first and send it later to the device you can
149148
do it like this from the main directory of OwlProgram (this will store in slot 6)
150149

151150
Tools/FirmwareSender -in ./Build/patch.bin -out "OWL-MIDI*" -store 6

Tools/build_send_receive_constants.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99

1010
import os
1111
dir_path = os.path.dirname(os.path.realpath(__file__))
12-
sys.path.append('%s/hvcc' % dir_path)
13-
import core.hv2ir.HeavyLangObject as HeavyLangObject
12+
from hvcc.core.hv2ir import HeavyLangObject
1413

1514
heavy_hash = HeavyLangObject.HeavyLangObject.get_hash
1615

1716
import jinja2
1817

1918
OWL_BUTTONS = ['Push', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8']
20-
19+
2120
def get_template(path):
2221
templateLoader = jinja2.FileSystemLoader(searchpath=dir_path)
2322
templateEnv = jinja2.Environment(loader=templateLoader)
@@ -46,7 +45,7 @@ def main():
4645
with open(args.infilename, mode="r") as f:
4746
ir = json.load(f)
4847

49-
for name, v in ir['control']['receivers'].iteritems():
48+
for name, v in ir['control']['receivers'].items():
5049
# skip __hv_init and similar
5150
if name.startswith("__"):
5251
continue
@@ -65,7 +64,7 @@ def main():
6564
jdata.append((key, name, 'RECV', "0x%x" % heavy_hash(name),
6665
0, 1, 0.5, key in OWL_BUTTONS))
6766

68-
for k, v in ir['objects'].iteritems():
67+
for k, v in ir['objects'].items():
6968
try:
7069
if v['type'] == '__send':
7170
name = v['args']['name']
@@ -84,7 +83,7 @@ def main():
8483
pass
8584

8685
# TODO, check that there is not channel defined both as input and output
87-
86+
8887
# Write to files
8988
with open(args.outfilename, mode="w") as f:
9089
template = get_template("Heavy_owl_constants.tpl.h")

heavy.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ HEAVYNAME ?= owl
55
HEAVYSRC ?= $(BUILDROOT)/HeavySource
66
HEAVYDIR ?= $(BUILD)/Heavy
77
HEAVYARGS ?= -g c -n $(HEAVYNAME) -p $(HEAVYDIR) -o $(BUILD)
8-
HVCC ?= $(BUILDROOT)/Tools/hvcc/hvcc.py
8+
HVCC ?= hvcc
99
HVCC_OWL ?= $(BUILDROOT)/Tools/build_send_receive_constants.py
1010

1111
$(HEAVYDIR)/_main.pd: $(PATCHSOURCE)/$(HEAVYFILE)
@@ -14,9 +14,9 @@ $(HEAVYDIR)/_main.pd: $(PATCHSOURCE)/$(HEAVYFILE)
1414
@cp -f $< $@
1515

1616
$(BUILD)/Source/Heavy_owl.h: $(HEAVYDIR)/_main.pd
17-
@python2.7 $(HVCC) $(HEAVYDIR)/_main.pd $(HEAVYARGS)
17+
@$(HVCC) $(HEAVYDIR)/_main.pd $(HEAVYARGS)
1818
@mv -f $(BUILD)/c/* $(BUILD)/Source
1919
@cp -f $(HEAVYSRC)/HvUtils.h $(HEAVYSRC)/HvMessage.c $(BUILD)/Source
20-
@python2.7 $(HVCC_OWL) $(BUILD)/ir/owl.heavy.ir.json $(BUILD)/Source/Heavy_$(HEAVYNAME)_constants.h
20+
@python3 $(HVCC_OWL) $(BUILD)/ir/owl.heavy.ir.json $(BUILD)/Source/Heavy_$(HEAVYNAME)_constants.h
2121

2222
heavy: $(BUILD)/Source/Heavy_owl.h

0 commit comments

Comments
 (0)