Using Faust with Teensy

Status
Not open for further replies.

C0d3man

Well-known member
Hi,

I was trying to use faust code with the (Arduino-)Teensy-IDE. Therefore I used the latest faust from github and the faust2teensy. I tried to fix the linking problems by following this, but it seems that it is outdated because changing recipe.c.combine.pattern="{compiler.path}{build.toolchain}{build.command.gcc}" to recipe.c.combine.pattern="{compiler.path}{build.toolchain}{build.command.g++}" is not really possible. build.command.gcc does not exist anymore (I am using Arduino-IDE-1.8.8 and Teensyduino-1.45).

Has anyone a hint how to get faust examples (like FaustSawtooth) running?

Thanks, Holger
 
Detailed test

Hi all,

I just tried again and wrote down what I have done. First I installed the actual faust release from github (because the Ubuntu release seems to be too old: there is no faust2teensy script available)

Code:
#
# Install faust master-dev
#
cd /tmp
git clone https://github.com/grame-cncm/faust.git
cd faust
make
sudo make install

After that I created the simple demo as described in https://faust.grame.fr/doc/tutorials/#dsp-on-the-teensy-with-faust:

Code:
#
# Install test code
#
mkdir /tmp/faust-teensy
cd /tmp/faust-teensy
cat >FaustSawtooth.dsp <<EOF
import("stdfaust.lib");
freq = nentry("freq",440,20,20000,0.01) : si.smoo;
gain = nentry("gain",1,0,1,0.01) : si.smoo;
process = os.sawtooth(freq)*gain;
EOF
faust2teensy -lib FaustSawtooth.dsp
mkdir ~/Arduino/FaustSawtooth
cd ~/Arduino
unzip /tmp/faust-teensy/FaustSawtooth.zip
cat >FaustSawtooth.ino <<EOF
#include <Audio.h>
#include "FaustSawtooth.h"

FaustSawtooth faustSawtooth;
AudioOutputI2S out;
AudioControlSGTL5000 audioShield;
AudioConnection patchCord0(faustSawtooth,0,out,0);
AudioConnection patchCord1(faustSawtooth,0,out,1);

void setup() {
  AudioMemory(2);
  audioShield.enable();
  audioShield.volume(0.1);
}

void loop() {
  faustSawtooth.setParamValue("freq",random(50,1000));
  delay(50);
}
EOF

After loading this script into TeensyDuino-1.45 and trying to compile I got this:

Code:
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp: In constructor 'FaustSawtooth::FaustSawtooth()':
FaustSawtooth.cpp:748: warning: operation on '((FaustSawtooth*)this)->FaustSawtooth::fDSP' may be undefined 
 FaustSawtooth::FaustSawtooth() : AudioStream((fDSP = new mydsp())->getNumInputs(), new audio_block_t*[fDSP->getNumInputs()])
                                                                                                                            ^
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
Multiple libraries were found for "SD.h"
 Used: /home/local/arduino-1.8.8-teensy/hardware/teensy/avr/libraries/SD
 Not used: /home/local/arduino-1.8.8-teensy/libraries/SD
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >::operator--()':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/stl_tree.h:220: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >::operator++()':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/stl_tree.h:205: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> > >::_M_insert_node(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/stl_tree.h:2105: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >::operator--()':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/stl_tree.h:220: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned int, unsigned int, char const*) const':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:271: undefined reference to `std::__throw_length_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned int, unsigned int, char const*) const':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:271: undefined reference to `std::__throw_length_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned int, unsigned int, char const*) const':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:271: undefined reference to `std::__throw_length_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned int, unsigned int, char const*) const':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:271: undefined reference to `std::__throw_length_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned int, unsigned int, char const*) const':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:271: undefined reference to `std::__throw_length_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned int, unsigned int, char const*) const':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:271: undefined reference to `std::__throw_length_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned int, unsigned int, char const*) const':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:271: undefined reference to `std::__throw_length_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1104: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o:/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:1058: more undefined references to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned int)' follow
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned int, unsigned int, char const*) const':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:271: undefined reference to `std::__throw_length_error(char const*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >::operator++()':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/stl_tree.h:205: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >::operator--()':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/stl_tree.h:220: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> > >::_M_insert_node(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float*> >*)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/stl_tree.h:2105: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/tmp/arduino_build_465017/sketch/FaustSawtooth.cpp.o: In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:219: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int)'
/home/local/arduino-1.8.8-teensy/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/basic_string.tcc:212: undefined reference to `std::__throw_logic_error(char const*)'
collect2: error: ld returned 1 exit status
Error compiling for board Teensy 3.6.

Hm... I have no idea what's going wrong. The manual says that you should use the following platform.txt: https://faust.grame.fr/doc/tutorials/misc/platform.txt. But it seems that it is outdated... my platform.txt looks not like this one...

Any ideas?

TIA, Holger
 
I think I got it!

Even if it doesn't look as if the platform.txt referenced at https://faust.grame.fr/doc/tutorials...nsy-with-faust matches the current TeensyDuino-1.45/Arduino-1.8.8: it works and the error messages are gone.

I just don't understand why.

But what is important: Faust creates the lookup tables with relatively fine resolution and you get problems with too little RAM. The solution is to reduce the resolution (see "Notes About Computational Power and Memory Footprint") like this:

Code:
...
tblosc(n,f,freq,mod)    = (1-d)*rdtable(n,wform,i&(n-1)) +
                          d*rdtable(n,wform,(i+1)&(n-1))
with {
        wform   = ba.time*(2.0*ma.PI)/n : f;
        phase           = freq/ma.SR : (+ : ma.decimal) ~ _;
        modphase        = ma.decimal(phase+mod/(2*ma.PI))*n;
        i               = int(floor(modphase));
        d               = ma.decimal(modphase);
       [B] n = 1 << 15; // I added this![/B]
};
...

Regards, Holger
 
I think I got it!

TeensyDuino-1.45/Arduino-1.8.8: it works and the error messages are gone.

Regards, Holger

Great to hear you got it running. Do you mind to develop how? Did you replace the platform.txt? or what did you change to make it work? I am experiencing the same kind of errors that you repport in the first post. I am using Arduino 1.8.9 and TeensyDuino 1.46. Working on the example https://faust.grame.fr/doc/tutorials/#dsp-on-the-teensy-with-faust
Thank you
 
Great to hear you got it running. Do you mind to develop how? Did you replace the platform.txt? or what did you change to make it work? I am experiencing the same kind of errors that you repport in the first post. I am using Arduino 1.8.9 and TeensyDuino 1.46. Working on the example https://faust.grame.fr/doc/tutorials/#dsp-on-the-teensy-with-faust
Thank you

As I wrote :
"Even if it doesn't look as if the platform.txt referenced at https://faust.grame.fr/doc/tutorials...nsy-with-faust matches the current TeensyDuino-1.45/Arduino-1.8.8: it works and the error messages are gone."

I tried with Arduino-IDE-1.8.8 and Teensyduino-1.45. Don't know if this works also for Arduino 1.8.9 and TeensyDuino 1.46. Be sure to make a copy of your old platform.txt!

I currently havn't done anything else with faust, because the generated code eats the memory. I tried to use a faust-chorus. Now I am thinking of writing my own modulated delay line.

Regards, Holger
 
Hmm, I'm getting an error with a fresh install of Arduino 1.8.12 and Teensyduino 1.5.1. I added the two faust-specific lines near the top of platform.txt:

Code:
# http://www.pjrc.com/teensy/teensyduino.html
name=Teensyduino
version=1.8.5
rewriting=disabled

[COLOR="#FF0000"]## Special Faust/Audio Compilation Flags
audio.options=-DAUDIO_BLOCK_SAMPLES=8[/COLOR]

compiler.path={runtime.hardware.path}/../tools/
(rest continues as usual)

using the Bandlimited Sawtooth Oscillator on the Teensy example from
http://faust.grame.fr/doc/tutorials/index.html#dsp-on-the-teensy-with-faust

Code:
import("stdfaust.lib");
freq = nentry("freq",440,20,20000,0.01) : si.smoo;
gain = nentry("gain",1,0,1,0.01) : si.smoo;
process = os.sawtooth(freq)*gain;

and the online faust editor to create the Teensy .ino, .cpp and .h files
https://faust.grame.fr/tools/editor...r/doc/tutorials/img/src/exfaust2/exfaust2.dsp

Compiling for either Teensy 3.6 or 4.0 gives errors. Full errors below; relevant portion seems to be

Code:
In function `get_eit_entry':

unwind-arm.c:(.text+0x134): undefined reference to `__exidx_end'

unwind-arm.c:(.text+0x138): undefined reference to `__exidx_start'

collect2.exe: error: ld returned 1 exit status

Code:
Arduino: 1.8.12 (Windows 10), TD: 1.51, Board: "Teensy 4.0, MIDI, 600 MHz, Faster, US English"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Chris\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Chris\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Chris\Documents\Arduino\sketches\libraries -fqbn=teensy:avr:teensy40:usb=midi,speed=600,opt=o2std,keys=en-us -ide-version=10812 -build-path C:\Users\Chris\AppData\Local\Temp\arduino_build_361300 -warnings=more -build-cache C:\Users\Chris\AppData\Local\Temp\arduino_cache_362607 -verbose C:\Users\Chris\Downloads\teensy\faustTutorial\faustTutorial.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Chris\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Chris\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Chris\Documents\Arduino\sketches\libraries -fqbn=teensy:avr:teensy40:usb=midi,speed=600,opt=o2std,keys=en-us -ide-version=10812 -build-path C:\Users\Chris\AppData\Local\Temp\arduino_build_361300 -warnings=more -build-cache C:\Users\Chris\AppData\Local\Temp\arduino_cache_362607 -verbose C:\Users\Chris\Downloads\teensy\faustTutorial\faustTutorial.ino
Using board 'teensy40' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
Using core 'teensy4' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr


aand I can't give the full error log because

[COLOR="#FF8C00"]The text that you have entered is too long (301300 characters). Please shorten it to 200000 characters long.
[/COLOR]
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax "-TC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4/imxrt1062.ld" -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300/faustTutorial.ino.elf" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\sketch\\FaustSawtooth.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\sketch\\faustTutorial.ino.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\memcpy_audio.S.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\data_spdif.c.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\data_ulaw.c.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\data_waveforms.c.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\data_windows.c.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\analyze_fft1024.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\analyze_fft256.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\analyze_notefreq.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\analyze_peak.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\analyze_print.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\analyze_rms.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\analyze_tonedetect.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\control_ak4558.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\control_cs42448.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\control_cs4272.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\control_sgtl5000.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\control_tlv320aic3206.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\control_wm8731.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_bitcrusher.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_chorus.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_combine.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_delay.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_delay_ext.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_envelope.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_fade.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_flange.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_freeverb.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_granular.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_midside.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_multiply.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_reverb.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\effect_waveshaper.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\filter_biquad.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\filter_fir.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\filter_variable.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\input_adc.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\input_adcs.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\input_i2s.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\input_i2s2.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\input_i2s_quad.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\input_pdm.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\input_tdm.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\input_tdm2.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\mixer.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_adat.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_dac.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_dacs.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_i2s.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_i2s2.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_i2s_quad.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_mqs.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_pt8211.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_pt8211_2.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_pwm.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_spdif.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_spdif2.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_spdif3.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_tdm.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\output_tdm2.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\play_memory.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\play_queue.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\play_sd_raw.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\play_sd_wav.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\play_serialflash_raw.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\record_queue.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\spi_interrupt.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_dc.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_karplusstrong.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_pinknoise.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_pwm.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_simple_drum.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_sine.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_tonesweep.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_waveform.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_wavetable.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\synth_whitenoise.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\utility\\sqrt_integer.c.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Audio\\utility\\imxrt_hw.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\File.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\SD.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\cache_t3.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\card_t3.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\dir_t3.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\fat_t3.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\file_t3.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\init_t3.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\utility\\NXP_SDHC.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\utility\\Sd2Card.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\utility\\SdFile.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SD\\utility\\SdVolume.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SerialFlash\\SerialFlashChip.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\SerialFlash\\SerialFlashDirectory.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Wire\\WireIMXRT.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Wire\\WireKinetis.cpp.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300\\libraries\\Wire\\utility\\twi.c.o" "C:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300/core\\core.a" "-LC:\\Users\\Chris\\AppData\\Local\\Temp\\arduino_build_361300" -larm_cortexM7lfsp_math -lm -lstdc++
c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/armv7e-m/fpu/fpv5-d16\libgcc.a(unwind-arm.o): In function `get_eit_entry':

unwind-arm.c:(.text+0x134): undefined reference to `__exidx_end'

unwind-arm.c:(.text+0x138): undefined reference to `__exidx_start'

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "SD.h"
 Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
 Not used: C:\Program Files (x86)\Arduino\libraries\SD
Using library Audio at version 1.3 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio 
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI 
Using library SD at version 1.2.2 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD 
Using library SerialFlash at version 0.5 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SerialFlash 
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire 
Error compiling for board Teensy 4.0.
 

Attachments

  • teensy.zip
    12.4 KB · Views: 74
Hi Nantonos,
same problem for me, with a teensy 3.2, and the latest version of arduino and teensyduino. I had also tested previously with PlatformIO under Visual Studio Code. I tried to modifiy boards.txt and platform.txt but linking fails even when using g++ as linker.

My error message is not exactly the same as yours, but it also mentions __exidx_end and __exidx_start :

Code:
Building in release mode
Linking .pio/build/teensy31/firmware.elf
.pio/build/teensy31/src/effect.cpp.o:(.bss.__exidx_end+0x0): multiple definition of `__exidx_end'
.pio/build/teensy31/src/Effect.cpp.o:(.bss.__exidx_end+0x0): first defined here
/home/maxime/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: Disabling relaxation: it will not work with multiple definitions
.pio/build/teensy31/src/effect.cpp.o:(.bss.__exidx_start+0x0): multiple definition of `__exidx_start'
.pio/build/teensy31/src/Effect.cpp.o:(.bss.__exidx_start+0x0): first defined here
/home/maxime/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text._write_r+0x12): undefined reference to `_write'
collect2: error: ld returned 1 exit status
*** [.pio/build/teensy31/firmware.elf] Error 1
 
I got the same Problem, compiling with the Faust online editor..
I hope there a fix or workaround some day because Faust is pretty cool
 
This setup works for me
• Teensy 4.0 with Audio Adaptor
• macOS 10.15
faust built from master-dev on GitHub
• VS Code with PlatformIO
My platform.ini looks like this:
Code:
[env:teensy40]
platform = teensy
board = teensy40
framework = arduino
build_flags = -DAUDIO_BLOCK_SAMPLES=8

Steps
1. Make a Faust DSP file, for example test.dsp
2. Generate DSP objects compatible with the Teensy Audio Library: faust2teensy -lib test.dsp
3. Use the generated DSP objects (test.h and test.cpp) in a main.cpp including Teensy Audio Library
4. Build, Upload, and Monitor using the PlatformIO tools

I have left out a number of more or less important details, but this can hopefully help as a start.

NOTE:
Sometimes I've been able to build but not run code on Teensy 4.0. I've been told it's probably because the Faust DSP objects use too much memory. For example I've been able to run re.mono_freeverb, but not re.stereo_freeverb. Using Teensy < 4.0 will probably induce a greater risk of memory problems, since Teensy has more memory than its predecessors.

Here is some good information https://faust.grame.fr/doc/tutorials/index.html#dsp-on-the-teensy-with-faust
 
Hi Nantonos,
same problem for me, with a teensy 3.2, and the latest version of arduino and teensyduino. I had also tested previously with PlatformIO under Visual Studio Code. I tried to modifiy boards.txt and platform.txt but linking fails even when using g++ as linker.

My error message is not exactly the same as yours, but it also mentions __exidx_end and __exidx_start :

Code:
Building in release mode
Linking .pio/build/teensy31/firmware.elf
.pio/build/teensy31/src/effect.cpp.o:(.bss.__exidx_end+0x0): multiple definition of `__exidx_end'
.pio/build/teensy31/src/Effect.cpp.o:(.bss.__exidx_end+0x0): first defined here
/home/maxime/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: Disabling relaxation: it will not work with multiple definitions
.pio/build/teensy31/src/effect.cpp.o:(.bss.__exidx_start+0x0): multiple definition of `__exidx_start'
.pio/build/teensy31/src/Effect.cpp.o:(.bss.__exidx_start+0x0): first defined here
/home/maxime/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text._write_r+0x12): undefined reference to `_write'
collect2: error: ld returned 1 exit status
*** [.pio/build/teensy31/firmware.elf] Error 1

I also have the same problem and accidently started a new thread here on the forum (didn't use the search function, shame on me).
I noticed, that you get those errors with " multiple definition of `__exidx_end' " when you include more than one faust objects in your Arduino sketch.
The Arduino IDE somehow includes all .h files int the sketches directory, even if you don't manually include them via #include. In your case, you probably have two faust objects, one called effects and one called Effects. Try removing one of those from your directory and it should work.
Being limited to one Faust object is rather sad though, and probably a bug.
I also opened a github issue (https://github.com/grame-cncm/faust/issues/434) but got redirected to the Teensy forum. (Somehow, nobody wants to feel responsible for this ^^)
 
Yes, that's it ! Thank you !
At the beginning, I created "effect.dsp", and renamed it later to "Effect.dsp", but i forgot to remove the corresponding .cpp and .h files.

And I have found the solution for the last error "undifined reference to `_write'" : the c standard library was not linked. The solution was to add this line in platformio.ini :

Code:
build_flags = -llibc -lc

I've just put my teensy in a stompbox enclosure, when the glue dries I will upload that !!
 
Hi,

I started using faust2teensy and got the sawtooth example from the tutorial running without any problems. I use Ubuntu 18.04 operating system and a Teensy 4.0 with audio shield.

I cloned the Faust DSP git repository and compiled and installed the software from source. Then I followed the tutorial: https://faustdoc.grame.fr/tutorials/teensy/?

Worked without probblems. So apparently the problems you mention in this thread are fixed by now.
 
Status
Not open for further replies.
Back
Top