Post Go back to editing

New version of Faust isn't compatible with CCES BareMetal FrameWork.

Hello,

I am using the SAM for the first time.

I followed the example from https://www.youtube.com/watch?v=iUB8ru-76qw to run my first code on the SHARC Audio Module

I noticed a big sequence of errors in the CrossCore SHARC C/C++ Compiler:

I am using the latest version of Faust from https://github.com/grame-cncm/faust (v2.23.3 ) on a Mac OS X 10.14.6, and the ADI CCES 2.9.2, BareMetal 2.1.0 on a Windows 10.

Before writing down the errors reported in CCES, I found a code for SAM generated by moForte from faust2sam in the Faust 2.6.1 version. This code: https://github.com/moforte/sam-faust/tree/master/faust-examples/virtualAnalog/virtualAnalog-sam and it worked flawlessly.

I noticed the problem isn't with any of my hardware nor any code issues, but with the new Faust version. Talking to the Faust developpers they said faust now generates C++11 code. Is that compatible with the CrossCore SHARC C/C++ Compiler for the SAM? Is there a way to change a configuration in CCES to make it run this new version of Faust code?

Here is the errors reported in CCES from the latest version of faust2sam and the virtualAnalog example dsp code on Core1:

15:54:20 **** Build of configuration Debug for project virtualAnalog-effects_core1 ****
make -j2 all 
'Building file: ../system/startup_ldf/app_IVT.s'
'Building file: ../system/startup_ldf/app_heaptab.c'
'Invoking: CrossCore SHARC Assembler'
'Invoking: CrossCore SHARC C/C++ Compiler'
easm21k -file-attr ProjectName="virtualAnalog-effects_core1" -proc ADSP-SC589 -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-ce813aab143bd48a7b0b870a6fb06eaf.txt -swc -char-size-8 -gnu-style-dependencies -MM -Mo "system/startup_ldf/app_IVT.d" -o "system/startup_ldf/app_IVT.doj" "../system/startup_ldf/app_IVT.s"
cc21k -c -file-attr ProjectName="virtualAnalog-effects_core1" -proc ADSP-SC589 -flags-compiler --no_wrap_diagnostics -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-46d069f5eb651ca5ae9619abd738fda3.txt -structs-do-not-overlap -no-const-strings -no-multiline -warn-protos -double-size-32 -char-size-8 -swc -gnu-style-dependencies -MD -Mo "system/startup_ldf/app_heaptab.d" -o "system/startup_ldf/app_heaptab.doj" "../system/startup_ldf/app_heaptab.c"
'Finished building: ../system/startup_ldf/app_IVT.s'
'Finished building: ../system/startup_ldf/app_heaptab.c'
' '
' '
'Building file: ../system/startup_ldf/app_startup.s'
'Building file: ../system/adi_initialize.c'
'Invoking: CrossCore SHARC Assembler'
'Invoking: CrossCore SHARC C/C++ Compiler'
easm21k -file-attr ProjectName="virtualAnalog-effects_core1" -proc ADSP-SC589 -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-ce813aab143bd48a7b0b870a6fb06eaf.txt -swc -char-size-8 -gnu-style-dependencies -MM -Mo "system/startup_ldf/app_startup.d" -o "system/startup_ldf/app_startup.doj" "../system/startup_ldf/app_startup.s"
cc21k -c -file-attr ProjectName="virtualAnalog-effects_core1" -proc ADSP-SC589 -flags-compiler --no_wrap_diagnostics -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-46d069f5eb651ca5ae9619abd738fda3.txt -structs-do-not-overlap -no-const-strings -no-multiline -warn-protos -double-size-32 -char-size-8 -swc -gnu-style-dependencies -MD -Mo "system/adi_initialize.d" -o "system/adi_initialize.doj" "../system/adi_initialize.c"
'Finished building: ../system/startup_ldf/app_startup.s'
' '
'Building file: ../src/faust/samFaustDSP.cpp'
'Invoking: CrossCore SHARC C/C++ Compiler'
cc21k -c -file-attr ProjectName="virtualAnalog-effects_core1" -proc ADSP-SC589 -flags-compiler --no_wrap_diagnostics -si-revision 1.0 -O -Ov100 -g -DCORE1 -D_DEBUG @includes-46d069f5eb651ca5ae9619abd738fda3.txt -structs-do-not-overlap -no-const-strings -no-multiline -w -double-size-32 -char-size-8 -swc -gnu-style-dependencies -MD -Mo "src/faust/samFaustDSP.d" -c++ -o "src/faust/samFaustDSP.doj" "../src/faust/samFaustDSP.cpp"
'Finished building: ../system/adi_initialize.c'
' '
'Building file: C:/Users/dega/cces/2.9.2/virtualAnalog-effects/drivers/bm_uart_driver/bm_uart.c'
'Invoking: CrossCore SHARC C/C++ Compiler'
cc21k -c -file-attr ProjectName="virtualAnalog-effects_core1" -proc ADSP-SC589 -flags-compiler --no_wrap_diagnostics -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-46d069f5eb651ca5ae9619abd738fda3.txt -structs-do-not-overlap -no-const-strings -no-multiline -warn-protos -double-size-32 -char-size-8 -swc -gnu-style-dependencies -MD -Mo "src/drivers/bm_uart_driver/bm_uart.d" -o "src/drivers/bm_uart_driver/bm_uart.doj" "C:/Users/dega/cces/2.9.2/virtualAnalog-effects/drivers/bm_uart_driver/bm_uart.c"
"..\src\faust\samFaustDSP.cpp", line 429: cc0020:  error: identifier "nullptr" is undefined
          decorator_dsp(dsp* dsp = nullptr):fDSP(dsp) {}
                                   ^

"..\src\faust\samFaustDSP.cpp", line 670: cc0260: {D} error: explicit type is missing ("int" assumed)
      static constexpr double value() { return double(NUM)/double(DENOM); }
             ^

"..\src\faust\samFaustDSP.cpp", line 670: cc0065:  error: expected a ";"
      static constexpr double value() { return double(NUM)/double(DENOM); }
                       ^

"..\src\faust\samFaustDSP.cpp", line 999: cc0028:  error: expression must have a constant value
              FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                  ^

"..\src\faust\samFaustDSP.cpp", line 999: cc0060:  error: this operator is not allowed in an integral constant expression
              FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                      ^

"..\src\faust\samFaustDSP.cpp", line 999: cc0060:  error: this operator is not allowed in an integral constant expression
              FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                            ^

"..\src\faust\samFaustDSP.cpp", line 999: cc0059:  error: function call is not allowed in a constant expression
              FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                  ^

"..\src\faust\samFaustDSP.cpp", line 1004: cc0020:  error: identifier "alloca" is undefined
                  fInputs[chan] = (FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT) * real_count);
                                               ^

"..\src\faust\samFaustDSP.cpp", line 1012: cc0028:  error: expression must have a constant value
              FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                   ^

"..\src\faust\samFaustDSP.cpp", line 1012: cc0060:  error: this operator is not allowed in an integral constant expression
              FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                       ^

"..\src\faust\samFaustDSP.cpp", line 1012: cc0060:  error: this operator is not allowed in an integral constant expression
              FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                             ^

"..\src\faust\samFaustDSP.cpp", line 1012: cc0059:  error: function call is not allowed in a constant expression
              FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                   ^

"..\src\faust\samFaustDSP.cpp", line 1014: cc0020:  error: identifier "alloca" is undefined
                  fOutputs[chan] = (FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT) * real_count);
                                                ^

"..\src\faust\samFaustDSP.cpp", line 1066: cc0028:  error: expression must have a constant value
              FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                  ^

"..\src\faust\samFaustDSP.cpp", line 1066: cc0060:  error: this operator is not allowed in an integral constant expression
              FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                      ^

"..\src\faust\samFaustDSP.cpp", line 1066: cc0060:  error: this operator is not allowed in an integral constant expression
              FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                            ^

"..\src\faust\samFaustDSP.cpp", line 1066: cc0059:  error: function call is not allowed in a constant expression
              FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                  ^

"..\src\faust\samFaustDSP.cpp", line 1070: cc0020:  error: identifier "alloca" is undefined
                  fInputs[chan] = (FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT) * real_count);
                                               ^

"..\src\faust\samFaustDSP.cpp", line 1082: cc0028:  error: expression must have a constant value
              FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                   ^

"..\src\faust\samFaustDSP.cpp", line 1082: cc0060:  error: this operator is not allowed in an integral constant expression
              FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                       ^

"..\src\faust\samFaustDSP.cpp", line 1082: cc0060:  error: this operator is not allowed in an integral constant expression
              FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                             ^

"..\src\faust\samFaustDSP.cpp", line 1082: cc0059:  error: function call is not allowed in a constant expression
              FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                   ^

"..\src\faust\samFaustDSP.cpp", line 1084: cc0020:  error: identifier "alloca" is undefined
                  fOutputs[chan] = (FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT) * real_count);
                                                ^

"..\src\faust\samFaustDSP.cpp", line 2255: cc0020:  error: identifier "nullptr" is undefined
          audio():fShutdown(nullptr), fShutdownArg(nullptr) {}
                            ^

"..\src\faust\samFaustDSP.cpp", line 2279: cc0260: {D} error: explicit type is missing ("int" assumed)
              for (auto& it : fComputeCallbackList) {
                       ^

"..\src\faust\samFaustDSP.cpp", line 2279: cc0252:  error: reference variable "it" requires an initializer
              for (auto& it : fComputeCallbackList) {
                            ^

"..\src\faust\samFaustDSP.cpp", line 2279: cc0065:  error: expected a ";"
              for (auto& it : fComputeCallbackList) {
                            ^

"..\src\faust\samFaustDSP.cpp", line 2279: cc0029:  error: expected an expression
              for (auto& it : fComputeCallbackList) {
                                                  ^

"..\src\faust\samFaustDSP.cpp", line 2279: cc0065:  error: expected a ";"
              for (auto& it : fComputeCallbackList) {
                                                  ^

"..\src\faust\samFaustDSP.cpp", line 2280: cc0153:  error: expression must have class type
                  it.first(it.second);
                  ^

"..\src\faust\samFaustDSP.cpp", line 2280: cc0153:  error: expression must have class type
                  it.first(it.second);
                           ^

"..\src\faust\samFaustDSP.cpp", line 2535: cc0135:  error: namespace "std" has no member "numeric_limits"
                  fUI << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                ^

"..\src\faust\samFaustDSP.cpp", line 2535: cc0254:  error: type name is not allowed
                  fUI << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                               ^

"..\src\faust\samFaustDSP.cpp", line 2535: cc0282:  error: the global scope has no "max_digits10"
                  fUI << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                      ^

"..\src\faust\samFaustDSP.cpp", line 2536: cc0135:  error: namespace "std" has no member "numeric_limits"
                  fMeta << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                  ^

"..\src\faust\samFaustDSP.cpp", line 2536: cc0254:  error: type name is not allowed
                  fMeta << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                 ^

"..\src\faust\samFaustDSP.cpp", line 2536: cc0282:  error: the global scope has no "max_digits10"
                  fMeta << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                        ^

"..\src\faust\samFaustDSP.cpp", line 2753: cc0135:  error: namespace "std" has no member "numeric_limits"
                  JSON << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                 ^

"..\src\faust\samFaustDSP.cpp", line 2753: cc0254:  error: type name is not allowed
                  JSON << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                ^

"..\src\faust\samFaustDSP.cpp", line 2753: cc0282:  error: the global scope has no "max_digits10"
                  JSON << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                       ^

"..\src\faust\samFaustDSP.cpp", line 3500: cc0020:  error: identifier "nullptr" is undefined
              return (fZone != nullptr) ? int(fInterpolator(*fZone)) : 127;
                               ^

"..\src\faust\samFaustDSP.cpp", line 3721: cc0260: {D} error: explicit type is missing ("int" assumed)
              for (auto& it : fConversion) delete it;
                       ^

"..\src\faust\samFaustDSP.cpp", line 3721: cc0252:  error: reference variable "it" requires an initializer
              for (auto& it : fConversion) delete it;
                            ^

"..\src\faust\samFaustDSP.cpp", line 3721: cc0065:  error: expected a ";"
              for (auto& it : fConversion) delete it;
                            ^

"..\src\faust\samFaustDSP.cpp", line 3721: cc0029:  error: expected an expression
              for (auto& it : fConversion) delete it;
                                         ^

"..\src\faust\samFaustDSP.cpp", line 3721: cc0065:  error: expected a ";"
              for (auto& it : fConversion) delete it;
                                         ^

"..\src\faust\samFaustDSP.cpp", line 3721: cc0044:  error: expression must have pointer type
              for (auto& it : fConversion) delete it;
                                                  ^

"..\src\faust\samFaustDSP.cpp", line 3723: cc0260: {D} error: explicit type is missing ("int" assumed)
                  for (auto& it : fAcc[i]) delete it;
                           ^

"..\src\faust\samFaustDSP.cpp", line 3723: cc0252:  error: reference variable "it" requires an initializer
                  for (auto& it : fAcc[i]) delete it;
                                ^

"..\src\faust\samFaustDSP.cpp", line 3723: cc0065:  error: expected a ";"
                  for (auto& it : fAcc[i]) delete it;
                                ^

"..\src\faust\samFaustDSP.cpp", line 3723: cc0029:  error: expected an expression
                  for (auto& it : fAcc[i]) delete it;
                                         ^

"..\src\faust\samFaustDSP.cpp", line 3723: cc0065:  error: expected a ";"
                  for (auto& it : fAcc[i]) delete it;
                                         ^

"..\src\faust\samFaustDSP.cpp", line 3723: cc0044:  error: expression must have pointer type
                  for (auto& it : fAcc[i]) delete it;
                                                  ^

"..\src\faust\samFaustDSP.cpp", line 3724: cc0260: {D} error: explicit type is missing ("int" assumed)
                  for (auto& it : fGyr[i]) delete it;
                           ^

"..\src\faust\samFaustDSP.cpp", line 3724: cc0252:  error: reference variable "it" requires an initializer
                  for (auto& it : fGyr[i]) delete it;
                                ^

"..\src\faust\samFaustDSP.cpp", line 3724: cc0065:  error: expected a ";"
                  for (auto& it : fGyr[i]) delete it;
                                ^

"..\src\faust\samFaustDSP.cpp", line 3724: cc0029:  error: expected an expression
                  for (auto& it : fGyr[i]) delete it;
                                         ^

"..\src\faust\samFaustDSP.cpp", line 3724: cc0065:  error: expected a ";"
                  for (auto& it : fGyr[i]) delete it;
                                         ^

"..\src\faust\samFaustDSP.cpp", line 3724: cc0044:  error: expression must have pointer type
                  for (auto& it : fGyr[i]) delete it;
                                                  ^

"..\src\faust\samFaustDSP.cpp", line 4583: cc0260: {D} error: explicit type is missing ("int" assumed)
              for (auto& it : fZoneMap) {
                       ^

"..\src\faust\samFaustDSP.cpp", line 4583: cc0252:  error: reference variable "it" requires an initializer
              for (auto& it : fZoneMap) {
                            ^

"..\src\faust\samFaustDSP.cpp", line 4583: cc0065:  error: expected a ";"
              for (auto& it : fZoneMap) {
                            ^

"..\src\faust\samFaustDSP.cpp", line 4583: cc0029:  error: expected an expression
              for (auto& it : fZoneMap) {
                                      ^

"..\src\faust\samFaustDSP.cpp", line 4583: cc0065:  error: expected a ";"
              for (auto& it : fZoneMap) {
                                      ^

"..\src\faust\samFaustDSP.cpp", line 4584: cc0153:  error: expression must have class type
                  delete it.second;
                         ^

"..\src\faust\samFaustDSP.cpp", line 4602: cc0260: {D} error: explicit type is missing ("int" assumed)
              for (auto& c : *cl) {
                       ^

"..\src\faust\samFaustDSP.cpp", line 4602: cc0252:  error: reference variable "c" requires an initializer
              for (auto& c : *cl) {
                           ^

"..\src\faust\samFaustDSP.cpp", line 4602: cc0065:  error: expected a ";"
              for (auto& c : *cl) {
                           ^

"..\src\faust\samFaustDSP.cpp", line 4602: cc0029:  error: expected an expression
              for (auto& c : *cl) {
                                ^

"..\src\faust\samFaustDSP.cpp", line 4602: cc0065:  error: expected a ";"
              for (auto& c : *cl) {
                                ^

"..\src\faust\samFaustDSP.cpp", line 4603: cc0044:  error: expression must have pointer type
                  if (c->cache() != v) c->reflectZone();
                      ^

"..\src\faust\samFaustDSP.cpp", line 4603: cc0044:  error: expression must have pointer type
                  if (c->cache() != v) c->reflectZone();
                                       ^

"..\src\faust\samFaustDSP.cpp", line 4609: cc0260: {D} error: explicit type is missing ("int" assumed)
              for (auto& m : fZoneMap) {
                       ^

"..\src\faust\samFaustDSP.cpp", line 4609: cc0252:  error: reference variable "m" requires an initializer
              for (auto& m : fZoneMap) {
                           ^

"..\src\faust\samFaustDSP.cpp", line 4609: cc0065:  error: expected a ";"
              for (auto& m : fZoneMap) {
                           ^

"..\src\faust\samFaustDSP.cpp", line 4609: cc0029:  error: expected an expression
              for (auto& m : fZoneMap) {
                                     ^

"..\src\faust\samFaustDSP.cpp", line 4609: cc0065:  error: expected a ";"
              for (auto& m : fZoneMap) {
                                     ^

"..\src\faust\samFaustDSP.cpp", line 4610: cc0153:  error: expression must have class type
                  updateZone(m.first);
                             ^

"..\src\faust\samFaustDSP.cpp", line 4616: cc0260: {D} error: explicit type is missing ("int" assumed)
              for (auto& g : fGuiList) {
                       ^

"..\src\faust\samFaustDSP.cpp", line 4616: cc0252:  error: reference variable "g" requires an initializer
              for (auto& g : fGuiList) {
                           ^

"..\src\faust\samFaustDSP.cpp", line 4616: cc0065:  error: expected a ";"
              for (auto& g : fGuiList) {
                           ^

"..\src\faust\samFaustDSP.cpp", line 4616: cc0029:  error: expected an expression
              for (auto& g : fGuiList) {
                                     ^

"..\src\faust\samFaustDSP.cpp", line 4616: cc0065:  error: expected a ";"
              for (auto& g : fGuiList) {
                                     ^

"..\src\faust\samFaustDSP.cpp", line 4617: cc0044:  error: expression must have pointer type
                  g->updateAllZones();
                  ^

"..\src\faust\samFaustDSP.cpp", line 4623: cc0260: {D} error: explicit type is missing ("int" assumed)
              for (auto& g : fGuiList) {
                       ^

"..\src\faust\samFaustDSP.cpp", line 4623: cc0252:  error: reference variable "g" requires an initializer
              for (auto& g : fGuiList) {
                           ^

"..\src\faust\samFaustDSP.cpp", line 4623: cc0065:  error: expected a ";"
              for (auto& g : fGuiList) {
                           ^

"..\src\faust\samFaustDSP.cpp", line 4623: cc0029:  error: expected an expression
              for (auto& g : fGuiList) {
                                     ^

"..\src\faust\samFaustDSP.cpp", line 4623: cc0065:  error: expected a ";"
              for (auto& g : fGuiList) {
                                     ^

"..\src\faust\samFaustDSP.cpp", line 4624: cc0044:  error: expression must have pointer type
                  g->run();
                  ^

"..\src\faust\samFaustDSP.cpp", line 4856: cc0260: {D} error: explicit type is missing ("int" assumed)
              for (auto& it : fZoneMap) {
                       ^

"..\src\faust\samFaustDSP.cpp", line 4856: cc0252:  error: reference variable "it" requires an initializer
              for (auto& it : fZoneMap) {
                            ^

"..\src\faust\samFaustDSP.cpp", line 4856: cc0065:  error: expected a ";"
              for (auto& it : fZoneMap) {
                            ^

"..\src\faust\samFaustDSP.cpp", line 4856: cc0029:  error: expected an expression
              for (auto& it : fZoneMap) {
                                      ^

"..\src\faust\samFaustDSP.cpp", line 4856: cc0065:  error: expected a ";"
              for (auto& it : fZoneMap) {
                                      ^

"..\src\faust\samFaustDSP.cpp", line 4857: cc0075:  error: operand of "*" must be a pointer
                  *it = v;
                   ^

"..\src\faust\samFaustDSP.cpp", line 4874: cc0260: {D} error: explicit type is missing ("int" assumed)
      for (auto& it : *cl) {
               ^

"..\src\faust\samFaustDSP.cpp", line 4874: cc0252:  error: reference variable "it" requires an initializer
      for (auto& it : *cl) {
                    ^

"..\src\faust\samFaustDSP.cpp", line 4874: cc0065:  error: expected a ";"
      for (auto& it : *cl) {
                    ^

"..\src\faust\samFaustDSP.cpp", line 4874: cc0029:  error: expected an expression
      for (auto& it : *cl) {
                         ^

Error limit reached.
100 errors detected in the compilation of "..\src\faust\samFaustDSP.cpp".
Compilation terminated.
cc3089: fatal error: Compilation failed (code:4)
make: *** [src/faust/samFaustDSP.doj] Error 1
make: *** Waiting for unfinished jobs....
'Finished building: C:/Users/dega/cces/2.9.2/virtualAnalog-effects/drivers/bm_uart_driver/bm_uart.c'
' '

15:54:30 Build Finished (took 10s.329ms)

  • Hello,

    Unfortunately I was not aware that this update occurred so we were not ready for it. I will discuss with the Faust developers on the best way forward here but one thing you can try is going to File::Properties::C/C++ Build->Settings->Tool Settings->CrossCore SHARC C/C++ Compiler->Language Settings and select "Compile C++ source files with C++ 11 feature extensions. This may or may not work depending on the code generated. The only other option if it does not is to use a version of Faust before this change.

    Regards,

    Chad

  • Hello, unfortunately I ran the same code and it couldn't build.

    I used the latest version of faust (2.23.3), used the faust code virtualAnalog.dsp present in https://github.com/grame-cncm/faust/tree/master-dev/examples/SAM/virtualAnalog and compiled with the string "faust2sam -midi - nvoices 1 virtualAnalog.dsp" only on the Core1.

    I selected the option "Compile C++ source files with C++ 11 feature extensions." as you mentioned but without any success.

    I will try to compile with an older version of faust now

     

    11:56:16 **** Build of configuration Debug for project virtualAnalog_cpp11_core1 ****
    make -j2 all 
    'Building file: ../system/startup_ldf/app_IVT.s'
    'Building file: ../system/startup_ldf/app_heaptab.c'
    'Invoking: CrossCore SHARC Assembler'
    easm21k -file-attr ProjectName="virtualAnalog_cpp11_core1" -proc ADSP-SC589 -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-1aecb28b7ba8ce26a645ddee80757d1c.txt -swc -char-size-8 -gnu-style-dependencies -MM -Mo "system/startup_ldf/app_IVT.d" -o "system/startup_ldf/app_IVT.doj" "../system/startup_ldf/app_IVT.s"
    'Invoking: CrossCore SHARC C/C++ Compiler'
    cc21k -c -file-attr ProjectName="virtualAnalog_cpp11_core1" -proc ADSP-SC589 -flags-compiler --no_wrap_diagnostics -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-08a33d13decb7f4610a3f69c34526f39.txt -structs-do-not-overlap -no-const-strings -no-multiline -warn-protos -double-size-32 -char-size-8 -swc -gnu-style-dependencies -MD -Mo "system/startup_ldf/app_heaptab.d" -o "system/startup_ldf/app_heaptab.doj" "../system/startup_ldf/app_heaptab.c"
    'Finished building: ../system/startup_ldf/app_heaptab.c'
    'Finished building: ../system/startup_ldf/app_IVT.s'
    ' '
    ' '
    'Building file: ../system/startup_ldf/app_startup.s'
    'Building file: ../system/adi_initialize.c'
    'Invoking: CrossCore SHARC Assembler'
    easm21k -file-attr ProjectName="virtualAnalog_cpp11_core1" -proc ADSP-SC589 -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-1aecb28b7ba8ce26a645ddee80757d1c.txt -swc -char-size-8 -gnu-style-dependencies -MM -Mo "system/startup_ldf/app_startup.d" -o "system/startup_ldf/app_startup.doj" "../system/startup_ldf/app_startup.s"
    'Invoking: CrossCore SHARC C/C++ Compiler'
    cc21k -c -file-attr ProjectName="virtualAnalog_cpp11_core1" -proc ADSP-SC589 -flags-compiler --no_wrap_diagnostics -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-08a33d13decb7f4610a3f69c34526f39.txt -structs-do-not-overlap -no-const-strings -no-multiline -warn-protos -double-size-32 -char-size-8 -swc -gnu-style-dependencies -MD -Mo "system/adi_initialize.d" -o "system/adi_initialize.doj" "../system/adi_initialize.c"
    'Finished building: ../system/startup_ldf/app_startup.s'
    ' '
    'Building file: ../src/faust/samFaustDSP.cpp'
    'Invoking: CrossCore SHARC C/C++ Compiler'
    cc21k -c -file-attr ProjectName="virtualAnalog_cpp11_core1" -proc ADSP-SC589 -flags-compiler --no_wrap_diagnostics -si-revision 1.0 -O -Ov100 -g -DCORE1 -D_DEBUG @includes-08a33d13decb7f4610a3f69c34526f39.txt -structs-do-not-overlap -no-const-strings -no-multiline -c++11 -w -double-size-32 -char-size-8 -swc -gnu-style-dependencies -MD -Mo "src/faust/samFaustDSP.d" -c++ -o "src/faust/samFaustDSP.doj" "../src/faust/samFaustDSP.cpp"
    'Finished building: ../system/adi_initialize.c'
    ' '
    'Building file: C:/Users/dega/cces/C++11_test/virtualAnalog_cpp11/drivers/bm_uart_driver/bm_uart.c'
    'Invoking: CrossCore SHARC C/C++ Compiler'
    cc21k -c -file-attr ProjectName="virtualAnalog_cpp11_core1" -proc ADSP-SC589 -flags-compiler --no_wrap_diagnostics -si-revision 1.0 -g -DCORE1 -D_DEBUG @includes-08a33d13decb7f4610a3f69c34526f39.txt -structs-do-not-overlap -no-const-strings -no-multiline -warn-protos -double-size-32 -char-size-8 -swc -gnu-style-dependencies -MD -Mo "src/drivers/bm_uart_driver/bm_uart.d" -o "src/drivers/bm_uart_driver/bm_uart.doj" "C:/Users/dega/cces/C++11_test/virtualAnalog_cpp11/drivers/bm_uart_driver/bm_uart.c"
    "..\src\faust\samFaustDSP.cpp", line 999: cc0028:  error: expression must have a constant value
                  FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                      ^
    
    "..\src\faust\samFaustDSP.cpp", line 1004: cc0020:  error: identifier "alloca" is undefined
                      fInputs[chan] = (FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT) * real_count);
                                                   ^
    
    "..\src\faust\samFaustDSP.cpp", line 1012: cc0028:  error: expression must have a constant value
                  FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                       ^
    
    "..\src\faust\samFaustDSP.cpp", line 1014: cc0020:  error: identifier "alloca" is undefined
                      fOutputs[chan] = (FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT) * real_count);
                                                    ^
    
    "..\src\faust\samFaustDSP.cpp", line 1066: cc0028:  error: expression must have a constant value
                  FAUSTFLOAT* fInputs[this->fDSP->getNumInputs()];
                                      ^
    
    "..\src\faust\samFaustDSP.cpp", line 1070: cc0020:  error: identifier "alloca" is undefined
                      fInputs[chan] = (FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT) * real_count);
                                                   ^
    
    "..\src\faust\samFaustDSP.cpp", line 1082: cc0028:  error: expression must have a constant value
                  FAUSTFLOAT* fOutputs[this->fDSP->getNumOutputs()];
                                       ^
    
    "..\src\faust\samFaustDSP.cpp", line 1084: cc0020:  error: identifier "alloca" is undefined
                      fOutputs[chan] = (FAUSTFLOAT*)alloca(sizeof(FAUSTFLOAT) * real_count);
                                                    ^
    
    "..\src\faust\samFaustDSP.cpp", line 2535: cc0135:  error: namespace "std" has no member "numeric_limits"
                      fUI << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                    ^
    
    "..\src\faust\samFaustDSP.cpp", line 2535: cc0254:  error: type name is not allowed
                      fUI << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                   ^
    
    "..\src\faust\samFaustDSP.cpp", line 2535: cc0282:  error: the global scope has no "max_digits10"
                      fUI << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                          ^
    
    "..\src\faust\samFaustDSP.cpp", line 2536: cc0135:  error: namespace "std" has no member "numeric_limits"
                      fMeta << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                      ^
    
    "..\src\faust\samFaustDSP.cpp", line 2536: cc0254:  error: type name is not allowed
                      fMeta << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                     ^
    
    "..\src\faust\samFaustDSP.cpp", line 2536: cc0282:  error: the global scope has no "max_digits10"
                      fMeta << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                            ^
    
    "..\src\faust\samFaustDSP.cpp", line 2753: cc0135:  error: namespace "std" has no member "numeric_limits"
                      JSON << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                     ^
    
    "..\src\faust\samFaustDSP.cpp", line 2753: cc0254:  error: type name is not allowed
                      JSON << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                    ^
    
    "..\src\faust\samFaustDSP.cpp", line 2753: cc0282:  error: the global scope has no "max_digits10"
                      JSON << std::setprecision(std::numeric_limits<REAL>::max_digits10);
                                                                           ^
    
    "..\src\faust\samFaustDSP.cpp", line 5237: cc0349:  error: no operator ">>" matches these operands
                operand types are: std::ostringstream >> double
          reader >> x;
                 ^
    
    "..\src\faust\samFaustDSP.cpp", line 8424: cc0283:  error: qualified name is not allowed
      typedef std::function<void(double)> ReflectFunction;
              ^
    
    "..\src\faust\samFaustDSP.cpp", line 8424: cc0065:  error: expected a ";"
      typedef std::function<void(double)> ReflectFunction;
                           ^
    
    "..\src\faust\samFaustDSP.cpp", line 8425: cc0283:  error: qualified name is not allowed
      typedef std::function<double()> ModifyFunction;
              ^
    
    "..\src\faust\samFaustDSP.cpp", line 8425: cc0065:  error: expected a ";"
      typedef std::function<double()> ModifyFunction;
                           ^
    
    "..\src\faust\samFaustDSP.cpp", line 8432: cc0020:  error: identifier "ReflectFunction" is undefined
          virtual void setReflectZoneFun(ReflectFunction reflect) = 0;
                                         ^
    
    "..\src\faust\samFaustDSP.cpp", line 8433: cc0020:  error: identifier "ModifyFunction" is undefined
          virtual void setModifyZoneFun(ModifyFunction modify) = 0;
                                        ^
    
    "..\src\faust\samFaustDSP.cpp", line 8447: cc0020:  error: identifier "ReflectFunction" is undefined
              ReflectFunction fReflect;
              ^
    
    "..\src\faust\samFaustDSP.cpp", line 8448: cc0020:  error: identifier "ModifyFunction" is undefined
              ModifyFunction fModify;
              ^
    
    "..\src\faust\samFaustDSP.cpp", line 8457: cc0020:  error: identifier "ReflectFunction" is undefined
              ZoneParam(int index, ReflectFunction reflect = [](REAL value) {}, ModifyFunction modify = []() { return REAL(-1); })
                                   ^
    
    "..\src\faust\samFaustDSP.cpp", line 8457: cc0020:  error: identifier "ModifyFunction" is undefined
              ZoneParam(int index, ReflectFunction reflect = [](REAL value) {}, ModifyFunction modify = []() { return REAL(-1); })
                                                                                ^
    
    "..\src\faust\samFaustDSP.cpp", line 8464: cc0020:  error: identifier "ReflectFunction" is undefined
              void setReflectZoneFun(ReflectFunction reflect) { fReflect = reflect; }
                                     ^
    
    "..\src\faust\samFaustDSP.cpp", line 8465: cc0020:  error: identifier "ModifyFunction" is undefined
              void setModifyZoneFun(ModifyFunction modify) { fModify = modify; }
                                    ^
    
    "..\src\faust\samFaustDSP.cpp", line 8509: cc0020:  error: identifier "ReflectFunction" is undefined
          void setReflectZoneFun(int index, ReflectFunction fun)
                                            ^
    
    "..\src\faust\samFaustDSP.cpp", line 8514: cc0020:  error: identifier "ModifyFunction" is undefined
          void setModifyZoneFun(int index, ModifyFunction fun)
                                           ^
    
    "..\src\faust\samFaustDSP.cpp", line 8626: cc0020:  error: identifier "strdup" is undefined
                  tmp_local = strdup(tmp_local);
                              ^
    
    "..\src\faust\samFaustDSP.cpp", line 8707: cc0020:  error: identifier "strdup" is undefined
                  tmp_local = strdup(tmp_local);
                              ^
    
    "..\src\faust\samFaustDSP.cpp", line 8777: cc0020:  error: identifier "strdup" is undefined
                  tmp_local = strdup(tmp_local);
                              ^
    
    "..\src\faust\samFaustDSP.cpp", line 8873: cc0020:  error: identifier "ReflectFunction" is undefined
          virtual void setReflectZoneFun(int index, ReflectFunction fun) = 0;
                                                    ^
    
    "..\src\faust\samFaustDSP.cpp", line 8874: cc0020:  error: identifier "ModifyFunction" is undefined
          virtual void setModifyZoneFun(int index, ModifyFunction fun) = 0;
                                                   ^
    
    "..\src\faust\samFaustDSP.cpp", line 8900: cc0020:  error: identifier "ReflectFunction" is undefined
          void setReflectZoneFun(int index, ReflectFunction fun)
                                            ^
    
    "..\src\faust\samFaustDSP.cpp", line 8904: cc0020:  error: identifier "ModifyFunction" is undefined
          void setModifyZoneFun(int index, ModifyFunction fun)
                                           ^
    
    "..\src\faust\samFaustDSP.cpp", line 8951: cc0020:  error: identifier "ReflectFunction" is undefined
          void setReflectZoneFun(int index, ReflectFunction fun)
                                            ^
    
    "..\src\faust\samFaustDSP.cpp", line 8955: cc0020:  error: identifier "ModifyFunction" is undefined
          void setModifyZoneFun(int index, ModifyFunction fun)
                                           ^
    
    41 errors detected in the compilation of "..\src\faust\samFaustDSP.cpp".
    cc3089: fatal error: Compilation failed (code:2)
    make: *** [src/faust/samFaustDSP.doj] Error 1
    make: *** Waiting for unfinished jobs....
    'Finished building: C:/Users/dega/cces/C++11_test/virtualAnalog_cpp11/drivers/bm_uart_driver/bm_uart.c'
    ' '
    
    11:56:23 Build Finished (took 7s.656ms)
    
    

  • I am talking to the Faust team, and Stephan Letz, in their Slack server. He said the tag in the compiler should be -std=c++11, not -c++11 as CCES puts it. He said "Well this compiler seems much too old, it does not support modern C++ features (but not so recent...) Is there any way to update it ?"

  • Yes, it is fairly old. We quickly discussed the work to update it and it would be too much work at this point. I can safely say that it is not in our plans. We support some C++11 features but none of the C++11 libraries I believe.

  • I tried to Build with a code generated from a previous version of Faust, the one closest to MoForte's examples on the Release page of Faust's github: https://github.com/grame-cncm/faust/releases/tag/2.14.4 but it didn't work. It showed the same errors while building with the latest version of Faust.

    I then compiled the version Pat used in the examples he put in moForte's github: https://github.com/moforte/sam-faust, the version 2.6.1, from the commit:  https://github.com/grame-cncm/faust/commit/97c68290949f3394a86a146b4afa0895d86405f2 

    It finally worked. 

    There is probably a later version than this one that is also compatible with CCES compiler, but this one I have just tested and for anyone who wants to use Faust with SAM it works.

    Until there is an updated version of the compiler to be compatible with the last Faust version, we can use this Faust version. In Mac or Unix based system you just have to do the following commands:

    git clone https://github.com/grame-cncm/faust.git
    git reset
    --hard 97c682909
    cd faust
    make
    sudo make install