bitluni / DawnOfAV

28 stars 11 forks source link

Problem compiling. (Version incompatibility 1.0.6 -> 2.0.3) #9

Open limaomerces opened 2 years ago

limaomerces commented 2 years ago

When trying to compile, it throws this error. obs- no changes were made to the code.

C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\Graphics.cpp:1:9: warning: #pragma once in main file
 #pragma once
         ^~~~
In file included from C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\DawnOfAV.ino:5:
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\AudioOutput.h: In member function 'void AudioOutput::init(AudioSystem&)':
AudioOutput.h:18:23: error: invalid conversion from 'int' to 'timer_alarm_t' [-fpermissive]
     config.alarm_en = 1;
                       ^
AudioOutput.h:19:26: error: invalid conversion from 'int' to 'timer_autoreload_t' [-fpermissive]
     config.auto_reload = 1;
                          ^
In file included from C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\DawnOfAV.ino:8:
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\SimplePALOutput.h: In member function 'void SimplePALOutput::init()':
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\SimplePALOutput.h:106:32: warning: 'I2S_COMM_FORMAT_I2S_MSB' is deprecated [-Wdeprecated-declarations]
        .communication_format = I2S_COMM_FORMAT_I2S_MSB,
                                ^~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\Tiago\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.3-RC1/tools/sdk/esp32/include/driver/include/driver/i2s.h:16,
                 from C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\SimplePALOutput.h:2,
                 from C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\DawnOfAV.ino:8:
C:\Users\Tiago\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.3-RC1/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:88:5: note: declared here
     I2S_COMM_FORMAT_I2S_MSB   __attribute__((deprecated)) = 0x01, /*!< I2S format MSB, (I2S_COMM_FORMAT_I2S |I2S_COMM_FORMAT_I2S_MSB) correspond to `I2S_COMM_FORMAT_STAND_I2S`*/
     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\DawnOfAV.ino:8:
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\SimplePALOutput.h: In member function 'void SimplePALOutput::sendLine(short unsigned int*)':
SimplePALOutput.h:129:5: error: 'i2s_write_bytes' was not declared in this scope
     i2s_write_bytes(I2S_PORT, (char*)l, lineSamples * sizeof(unsigned short), portMAX_DELAY);
     ^~~~~~~~~~~~~~~
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\SimplePALOutput.h:129:5: note: suggested alternative: 'i2s_write_expand'
     i2s_write_bytes(I2S_PORT, (char*)l, lineSamples * sizeof(unsigned short), portMAX_DELAY);
     ^~~~~~~~~~~~~~~
     i2s_write_expand
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\DawnOfAV.ino: In function 'void setup()':
DawnOfAV:59:3: error: 'rtc_clk_cpu_freq_set' was not declared in this scope
   rtc_clk_cpu_freq_set(RTC_CPU_FREQ_240M);              //highest cpu frequency
   ^~~~~~~~~~~~~~~~~~~~
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\DawnOfAV.ino:59:3: note: suggested alternative: 'rtc_clk_apb_freq_get'
   rtc_clk_cpu_freq_set(RTC_CPU_FREQ_240M);              //highest cpu frequency
   ^~~~~~~~~~~~~~~~~~~~
   rtc_clk_apb_freq_get
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\DawnOfAV.ino: In function 'void loop()':
C:\Users\Tiago\Documents\Arduino\libraries\DawnOfAV\DawnOfAV.ino:155:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     char *text0 = "Greetings from bitluni's lab!";
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
invalid conversion from 'int' to 'timer_alarm_t' [-fpermissive]
limaomerces commented 2 years ago

After removing the joystick and audio features, it throws this error:

C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\Graphics.cpp:1:9: warning: #pragma once in main file
 #pragma once
         ^~~~
In file included from C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\DawnOfAV.ino:6:
C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\SimplePALOutput.h: In member function 'void SimplePALOutput::init()':
C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\SimplePALOutput.h:106:32: warning: 'I2S_COMM_FORMAT_I2S_MSB' is deprecated [-Wdeprecated-declarations]
        .communication_format = I2S_COMM_FORMAT_I2S_MSB,
                                ^~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\Tiago\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.3-RC1/tools/sdk/esp32/include/driver/include/driver/i2s.h:16,
                 from C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\SimplePALOutput.h:2,
                 from C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\DawnOfAV.ino:6:
C:\Users\Tiago\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.3-RC1/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:88:5: note: declared here
     I2S_COMM_FORMAT_I2S_MSB   __attribute__((deprecated)) = 0x01, /*!< I2S format MSB, (I2S_COMM_FORMAT_I2S |I2S_COMM_FORMAT_I2S_MSB) correspond to `I2S_COMM_FORMAT_STAND_I2S`*/
     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\DawnOfAV.ino:6:
C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\SimplePALOutput.h: In member function 'void SimplePALOutput::sendLine(short unsigned int*)':
SimplePALOutput.h:129:5: error: 'i2s_write_bytes' was not declared in this scope
     i2s_write_bytes(I2S_PORT, (char*)l, lineSamples * sizeof(unsigned short), portMAX_DELAY);
     ^~~~~~~~~~~~~~~
C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\SimplePALOutput.h:129:5: note: suggested alternative: 'i2s_write_expand'
     i2s_write_bytes(I2S_PORT, (char*)l, lineSamples * sizeof(unsigned short), portMAX_DELAY);
     ^~~~~~~~~~~~~~~
     i2s_write_expand
C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\DawnOfAV.ino: In function 'void setup()':
DawnOfAV:43:3: error: 'rtc_clk_cpu_freq_set' was not declared in this scope
   rtc_clk_cpu_freq_set(RTC_CPU_FREQ_240M);              //highest cpu frequency
   ^~~~~~~~~~~~~~~~~~~~
C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\DawnOfAV.ino:43:3: note: suggested alternative: 'rtc_clk_apb_freq_get'
   rtc_clk_cpu_freq_set(RTC_CPU_FREQ_240M);              //highest cpu frequency
   ^~~~~~~~~~~~~~~~~~~~
   rtc_clk_apb_freq_get
C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\DawnOfAV.ino: In function 'void loop()':
C:\Users\Tiago\Downloads\DawnOfAV-master (1)\DawnOfAV-master\DawnOfAV\DawnOfAV.ino:119:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     char *text0 = "Greetings from bitluni's lab!";
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
'i2s_write_bytes' was not declared in this scope
limaomerces commented 2 years ago

I then realized that switching to version 1.0.6 of the board solves the problem.

Could you update the code to the latest version (2.0.3)?

elhigu commented 10 months ago

Here are some similar changes that has been done for some other project to update i2s code:

https://github.com/bitluni/ESP32AMRadioTransmitter/pull/8/files

I'm just fixing this, so I will make a PR in case if I succeed to make this compile with latest arduino ide + esp32 platform libs.

elhigu commented 10 months ago

It was easy to make it to compile, but I was not able to get any signal out of the compiled app. Also I had to cut music shorter to make image small enough to fit to esp32.

elhigu commented 9 months ago

FabGL was the only project I was able to compile and get working color composite video output with Arduino IDE 2.2.1 and esp board manager 2.0.12