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)