As an experiment, I’m trying to add support for the TXo modules.
Could anyone confirm that this is the correct way to compile the binary for Crow please ? It’s the first time that I try something like this, I don’t want to “break” the module by uploading a corrupt/incomplete file ^^
Apparently there’s an error during the compilation process so I might have missed something in the instructions on how to include this:
lib/lualink.c:27:64: fatal error: lua/bootstrap.lua.h: No such file or directory
#include "lua/bootstrap.lua.h" // MUST LOAD THIS MANUALLY FIRST
Summary
lib/lualink.c:27:64: fatal error: lua/bootstrap.lua.h: No such file or directory
#include "lua/bootstrap.lua.h" // MUST LOAD THIS MANUALLY FIRST
^
compilation terminated.
lib/ii.c:7:63: fatal error: ../build/ii_c_layer.h: No such file or directory
#include "../build/ii_c_layer.h" // GENERATED BY BUILD PROCESS
^
compilation terminated.
main.o
stm32f7xx_it.o
system_stm32f7xx.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_flash_ex.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2s.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma2d.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pcd.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pcd_ex.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr_ex.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rng.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_spi.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_usart.o
submodules/STM32_Cube_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_ll_usb.o
lib/bootloader.o
lib/caw.o
lib/detect.o
lib/events.o
lib/flash.o
build_dir build/
lua build/ii_c_layer.h
lib/ii.o
lib/io.o
l2h lua/First.lua -> lua/First.lua.h
l2h lua/asl.lua -> lua/asl.lua.h
l2h lua/asllib.lua -> lua/asllib.lua.h
l2h lua/bootstrap.lua -> lua/bootstrap.lua.h
l2h lua/calibrate.lua -> lua/calibrate.lua.h
l2h lua/crowlib.lua -> lua/crowlib.lua.h
l2h lua/ii.lua -> lua/ii.lua.h
l2h lua/input.lua -> lua/input.lua.h
l2h lua/metro.lua -> lua/metro.lua.h
l2h lua/midi.lua -> lua/midi.lua.h
l2h lua/output.lua -> lua/output.lua.h
lua build/iihelp.lua
l2h build/iihelp.lua -> build/iihelp.lua.h
lua build/ii_ansible.lua
l2h build/ii_ansible.lua -> build/ii_ansible.lua.h
lua build/ii_crow.lua
l2h build/ii_crow.lua -> build/ii_crow.lua.h
lua build/ii_er301.lua
l2h build/ii_er301.lua -> build/ii_er301.lua.h
lua build/ii_jf.lua
l2h build/ii_jf.lua -> build/ii_jf.lua.h
lua build/ii_kria.lua
l2h build/ii_kria.lua -> build/ii_kria.lua.h
lua build/ii_levels.lua
l2h build/ii_levels.lua -> build/ii_levels.lua.h
lua build/ii_meadowphysics.lua
l2h build/ii_meadowphysics.lua -> build/ii_meadowphysics.lua.h
lua build/ii_txi.lua
l2h build/ii_txi.lua -> build/ii_txi.lua.h
lua build/ii_txo.lua
l2h build/ii_txo.lua -> build/ii_txo.lua.h
lua build/ii_wslash.lua
l2h build/ii_wslash.lua -> build/ii_wslash.lua.h
lua build/ii_lualink.h
lib/lualink.o
lib/metro.o
lib/midi.o
lib/repl.o
lib/shapes.o
lib/slopes.o
ll/adda.o
ll/ads131.o
ll/cal_ll.o
ll/dac8565.o
ll/debug_pin.o
ll/debug_usart.o
ll/i2c.o
ll/midi_ll.o
ll/random.o
ll/system.o
ll/timers.o
usbd/usbd_cdc_interface.o
usbd/usbd_conf.o
usbd/usbd_desc.o
usbd/usbd_main.o
submodules/STM32_Cube_F7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o
submodules/STM32_Cube_F7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o
submodules/STM32_Cube_F7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o
submodules/STM32_Cube_F7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.o
submodules/wrLib/str_buffer.o
submodules/wrLib/wrConvert.o
submodules/wrLib/wrMath.o
submodules/wrLib/wrQueue.o
submodules/wrDsp/wrBlocks.o
submodules/lua/src/lapi.o
submodules/lua/src/lcode.o
submodules/lua/src/lctype.o
submodules/lua/src/ldebug.o
submodules/lua/src/ldo.o
submodules/lua/src/ldump.o
submodules/lua/src/lfunc.o
submodules/lua/src/lgc.o
submodules/lua/src/llex.o
submodules/lua/src/lmem.o
submodules/lua/src/lobject.o
submodules/lua/src/lopcodes.o
submodules/lua/src/lparser.o
submodules/lua/src/lstate.o
submodules/lua/src/lstring.o
submodules/lua/src/ltable.o
submodules/lua/src/ltm.o
submodules/lua/src/lundump.o
submodules/lua/src/lvm.o
submodules/lua/src/lzio.o
submodules/lua/src/lauxlib.o
submodules/lua/src/lbaselib.o
submodules/lua/src/lbitlib.o
submodules/lua/src/lcorolib.o
submodules/lua/src/ldblib.o
submodules/lua/src/liolib.o
submodules/lua/src/lmathlib.o
submodules/lua/src/loslib.o
submodules/lua/src/lstrlib.o
submodules/lua/src/ltablib.o
submodules/lua/src/lutf8lib.o
submodules/lua/src/loadlib.o
submodules/lua/src/linit.o
Startup.o
linked: crow.elf
disassembly: crow.elf.lst
binary: crow.bin
symbol table: crow.bin.dmp
Release: 0
Size: 314124 FileType: Regular File
^ must be less than 384kB (384,000)
# 512kb -64kb(bootloader) -128kb(scripts)
–
Here’s what I did:
Install the dev environment :
brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi-49
(Lua and dfu-util were already installed on my Mac)
git clone --recursive https://github.com/monome/crow.git
cd crow
git submodule update --init
Add the following file txo.lua to the folder lua/ii
It is almost a copy of the er301.lua file, only the basic commands of the Txo.
txo.lua
do return
{ module_name = 'TXO'
, manufacturer = 'BPC Music'
, i2c_address = {0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67}
, lua_name = 'txo'
, commands =
{ { name = 'tr'
, cmd = 0x0
, docs = 'Set TR *port* to *state* (0/1)'
, args = { { 'port', u8 }
, { 'state', s16 }
}
}
, { name = 'tr_tog'
, cmd = 0x1
, docs = 'Toggle TR *port*'
, args = { 'port', u8 }
}
, { name = 'tr_pulse'
, cmd = 0x5
, docs = 'Pulse TR *port* using TO.TR.TIME/S/M as an interval'
, args = { 'port', u8 }
}
, { name = 'tr_time'
, cmd = 0x2
, docs = 'Time for TR.PULSE *port* in *ms*'
, args = { { 'port', u8 }
, { 'ms', s16 }
}
}
, { name = 'tr_pol'
, cmd = 0x6
, docs = 'Polarity for TO.TR.PULSE *port* set to *rising* (0/1)'
, args = { { 'port', u8 }
, { 'rising', s16 }
}
}
, { name = 'cv'
, cmd = 0x10
, docs = 'Set *port* CV to *volts* (bipolar), following SLEW time'
, args = { { 'port', u8 }
, { 'volts', s16V }
}
}
, { name = 'cv_slew'
, cmd = 0x12
, docs = 'CV *port* slew time in *ms*'
, args = { { 'port', u8 }
, { 'ms', s16 }
}
}
, { name = 'cv_set'
, cmd = 0x11
, docs = 'Set CV *port* to *volts* (bipolar), ignoring SLEW time'
, args = { { 'port', u8 }
, { 'volts', s16V }
}
}
, { name = 'cv_off'
, cmd = 0x15
, docs = 'CV *port* offset, *volts* added at final stage'
, args = { { 'port', u8 }
, { 'volts', s16V }
}
}
}
, pickle = -- zero-index the port & send to multiple devices for port >= 100
--void pickle( uint8_t* address, uint8_t* data, uint8_t* byte_count );
[[
uint8_t port = data[1] - 1; // zero-index the port
data[1] = port % 100; // wrap command for subsequent devices
*address += port / 100; // increment address for subsequent devices
]]
}
end
make
make clean
Thanks,