Coder Social home page Coder Social logo

pichenettes / shruthi-1 Goto Github PK

View Code? Open in Web Editor NEW
205.0 41.0 102.0 13.26 MB

Firmware and hardware description files for the Shruthi-1, an hybrid monosynth

Home Page: https://mutable-instruments.net/archive/shruthi/build/

C++ 94.80% Python 4.74% Makefile 0.45%

shruthi-1's Issues

Compiling on Ubuntu 19.04

Hello, I'm trying to compile this on Ubuntu 19.04:

I've installed the AVR tools/libraries:

sudo apt install binutils gcc-avr avr-libc avrdude

And have these versions of avr-g++ and make:

~/code/shruthi-1> /usr/bin/avr-g++ --version
avr-g++ (GCC) 5.4.0

~/code/shruthi-1> make --version
GNU Make 4.2.1

I also updated avrlib to use the correct path:

~/code/shruthi-1/avrlib> which avr-g++
/usr/bin/avr-g++

~/code/shruthi-1/avrlib> git diff
diff --git a/makefile.mk b/makefile.mk
index 3c1f5be..7a84990 100644
--- a/makefile.mk
+++ b/makefile.mk
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-AVRLIB_TOOLS_PATH ?= /usr/local/CrossPack-AVR/bin/
+AVRLIB_TOOLS_PATH ?= /usr/bin/
 BUILD_ROOT     = build/
 BUILD_DIR      = $(BUILD_ROOT)$(TARGET)/
 PROGRAMMER     ?= avrispmkII

Then I run make and get this error:

~/code/shruthi-1> make
/usr/bin/avr-g++ -c -mmcu=atmega644p -I. -g -Os -w -Wall -DF_CPU=20000000 -D__PROG_TYPES_COMPAT__ -fdata-sections -ffunction-sections -fshort-enums -fno-move-loop-invariants -DDISABLE_DEFAULT_UART_RX_ISR  -DATMEGA644P -DSERIAL_RX_0 -mcall-prologues -fno-exceptions shruthi/part.cc -o build/shruthi1/part.o
shruthi/part.cc: In substitution of ‘template<class T> static void avrlib::ResourcesManager<ResourceId, Tables>::Load(const T*, uint8_t*, uint16_t) [with T = <missing>]’:
shruthi/part.cc:221:48:   required from here
shruthi/part.cc:221:48: internal compiler error: in type_hash_canon, at tree.c:6953
   ResourcesManager::Load(init_patch, 0, &patch_);
                                                ^

shruthi/part.cc:221:48: internal compiler error: Segmentation fault
avr-g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [avrlib/makefile.mk:95: build/shruthi1/part.o] Error 4

It seems to be an issue with patch_ being defined here: https://github.com/pichenettes/shruthi-1/blob/master/shruthi/part.h#L216

Any ideas what could be wrong?

Broken bulk dump request 0x50

diff --git a/shruthi/storage.cc b/shruthi/storage.cc
index f834b26f06bc95f63535cb47a6b8e307b0ee44d6..669045f998ea1bc92bb250c1a244e3a42d7012be 100755
--- a/shruthi/storage.cc
+++ b/shruthi/storage.cc
@@ -195,38 +195,38 @@ void Storage::SysExParseCommand() {
     case 0x01:  // Patch transfer
       sysex_rx_expected_size_ = StorageConfiguration<Patch>::size;
       break;
-    
+
     case 0x02:  // Sequence transfer
       sysex_rx_expected_size_ = \
           StorageConfiguration<SequencerSettings>::size;
       break;
-      
+
     case 0x03:  // Wavetable dump
       sysex_rx_destination_ = user_wavetable;
       sysex_rx_expected_size_ = kUserWavetableSize;
       break;
-      
+
     case 0x04:  // System settings transfer
       sysex_rx_expected_size_ = sizeof(SystemSettings);
       break;
-      
+
     case 0x05:  // Step sequencer transfer
       sysex_rx_expected_size_ = 2;
       break;
-      
+
     case 0x06:  // Patch name transfer
       sysex_rx_expected_size_ = kPatchNameSize;
       break;
-      
+
     case 0x07:  // Full sequencer state transfer
       sysex_rx_expected_size_ = sizeof(SequencerSettings);
       break;
-      
+
     case 0x08:  // Set pattern length
     case 0x09:  // Set pattern rotation
       sysex_rx_expected_size_ = 0;
       break;
-    
+
     case 0x11:  // Patch request
     case 0x12:  // Sequence request
     case 0x14:  // System settings request
@@ -235,26 +235,26 @@ void Storage::SysExParseCommand() {
     case 0x17:  // Full sequencer state request
       sysex_rx_expected_size_ = 0;
       break;
-      
+
     case 0x21:  // Patch write request
     case 0x22:  // Sequence write request
       sysex_rx_expected_size_ = 2;
       break;
-      
+
     case 0x31:  // Patch randomize
     case 0x32:  // Sequence randomize
       sysex_rx_expected_size_ = 0;
       break;
-      
+
     case 0x40:  // Bulk transfer
     case 0x41:
     case 0x42:
     case 0x43:
       sysex_rx_expected_size_ = kSysExBulkDumpBlockSize;
       break;
-      
+
     case 0x50:  // Bulk transfer requests
-      sysex_rx_state_ = 0;
+      sysex_rx_expected_size_ = 0;
       break;

     default:
@@ -266,30 +266,30 @@ void Storage::SysExParseCommand() {
 /* static */
 void Storage::SysExAcceptBuffer() {
   uint8_t success = 0;
-  
+
   // Add a delay for Request commands
-  if ((sysex_rx_command_[0] & 0xf0) == 0x10 || 
+  if ((sysex_rx_command_[0] & 0xf0) == 0x10 ||
       (sysex_rx_command_[0] & 0xf0) == 0x50) {
     Delay(100);
     success = 1;
   }
-  
+
   switch (sysex_rx_command_[0]) {
     case 0x01:  // Patch transfer
       success = AcceptData(engine.mutable_patch(), sysex_rx_buffer_);
       break;
-      
+
     case 0x02:  // Sequence transfer
       success = AcceptData(
           engine.mutable_sequencer_settings(),
           sysex_rx_buffer_);
       engine.TouchSequence();
       break;
-    
+
     case 0x03:
       success = 1;
       break;
-      
+
     case 0x04:
       memcpy(
           (uint8_t*) engine.mutable_system_settings(),
@@ -298,7 +298,7 @@ void Storage::SysExAcceptBuffer() {
       engine.mutable_system_settings()->EepromSave();
       success = 1;
       break;
-      
+
     case 0x05:
       {
         uint8_t step_index = sysex_rx_command_[1] & 0x0f;
@@ -308,11 +308,11 @@ void Storage::SysExAcceptBuffer() {
             sysex_rx_buffer_[1]);
       }
       break;
-      
+
     case 0x06:
       engine.SetName(sysex_rx_buffer_);
       break;
-    
+
     case 0x07:
       memcpy(
           (uint8_t*) engine.mutable_sequencer_settings(),
@@ -321,17 +321,17 @@ void Storage::SysExAcceptBuffer() {
       engine.mutable_sequencer_settings()->Update();
       success = 1;
       break;
-      
+
     case 0x08:
       engine.SetPatternLength(sysex_rx_command_[1] & 0x0f);
       success = 1;
       break;
-      
+
     case 0x09:
       engine.SetPatternRotation(sysex_rx_command_[1] & 0x0f);
       success = 1;
       break;
-    
+
     case 0x11:
       Storage::SysExDump(engine.mutable_patch());
       break;
@@ -339,7 +339,7 @@ void Storage::SysExAcceptBuffer() {
     case 0x12:
       Storage::SysExDump(engine.mutable_sequencer_settings());
       break;
-      
+
     case 0x14:
       Storage::SysExDumpBuffer(
           (uint8_t*) engine.mutable_system_settings(),
@@ -347,7 +347,7 @@ void Storage::SysExAcceptBuffer() {
           0,
           sizeof(SystemSettings));
       break;
-      
+
     case 0x15:
       {
         uint8_t step_index = sysex_rx_command_[1] & 0x0f;
@@ -359,7 +359,7 @@ void Storage::SysExAcceptBuffer() {
             2);
       }
       break;
-      
+
     case 0x16:
       Storage::SysExDumpBuffer(
           (uint8_t*) engine.mutable_patch()->name,
@@ -367,7 +367,7 @@ void Storage::SysExAcceptBuffer() {
           0,
           kPatchNameSize);
       break;
-      
+
     case 0x17:
       Storage::SysExDumpBuffer(
           (uint8_t*) engine.mutable_sequencer_settings(),
@@ -375,7 +375,7 @@ void Storage::SysExAcceptBuffer() {
           0,
           sizeof(SequencerSettings));
       break;
-      
+
     case 0x21:
       WritePatch((sysex_rx_buffer_[0] << 8) | (sysex_rx_buffer_[1]));
       success = 1;
@@ -385,7 +385,7 @@ void Storage::SysExAcceptBuffer() {
       WriteSequence((sysex_rx_buffer_[0] << 8) | (sysex_rx_buffer_[1]));
       success = 1;
       break;
-    
+
     case 0x31:
       editor.RandomizePatch();
       success = 1;
@@ -395,7 +395,7 @@ void Storage::SysExAcceptBuffer() {
       editor.RandomizeSequence();
       success = 1;
       break;
-    
+
     case 0x40:  // Raw data dump
     case 0x41:
     case 0x42:
@@ -425,9 +425,10 @@ void Storage::SysExAcceptBuffer() {
         }
       }
       break;
-      
+
     case 0x50:
       SysExBulkDump();
+      success = 1;
       break;
   }
   sysex_rx_state_ = success ? RECEPTION_OK : RECEPTION_ERROR;


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.