Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino IDE compiling error in aac_decoder.cpp library #531

Open
amishrabbit opened this issue Jul 8, 2024 · 2 comments
Open

Arduino IDE compiling error in aac_decoder.cpp library #531

amishrabbit opened this issue Jul 8, 2024 · 2 comments

Comments

@amishrabbit
Copy link

amishrabbit commented Jul 8, 2024

Hello there. While attempting to build/upload to a "Hackerbox # 70" hardware build (https://www.instructables.com/HackerBox-0070-Radio-Over-Internet/) of this project, the Arduino IDE 1.8.19 throws an error with this detail:

ESP32Radio\aac_decoder.cpp: In function 'void GenerateNoiseVector(int*, int*, int)':

aac_decoder.cpp:5297:41: error: invalid conversion from 'uint32_t*' {aka 'long unsigned int*'} to 'unsigned int*' [-fpermissive]

5297 | coef[i] = ((int32_t)Get32BitVal((uint32_t *)last)) >> 16;

  |                                         ^~~~~~~~~~~~~~~~

  |                                         |

  |                                         uint32_t* {aka long unsigned int*}

As an inexperienced developer who is just trying to follow directions, this has been a challenging project to complete. I'd welcome any guidance or assistance you can provide to work around this problem.

Thanks!

@Edzelf
Copy link
Owner

Edzelf commented Jul 9, 2024

Try this:
coef[i] = ((int32_t)Get32BitVal((unsigned int*)last)) >> 16;

Better use the new version of the ESP32 radio, see here.

@amishrabbit
Copy link
Author

Thanks for the update, Ed. I really appreciate it.

I was having difficulty with reflashing this particular kit, which is a few years old now. I wanted to reproduce the steps I went through originally, but so many of the libraries have updated beyond supporting what they did a few years ago, it was very, very difficult.

I was also trying to avoid installing an entirely different IDE other than Arduino, which I am comfortable with.

In the end, the trick that seemed to work for the Hackerboxes kit was to flash the settings into the device using the V1 Esp32_radio_init.ino in Arduino IDE with the "Erase entire flash memory" enabled, then switching to the Visual Studio Code/PlatformIO to flash over the (V2) firmware. That managed to get the user interface working and the device bootable.

Without flashing the settings first in Arduino, this particular device build (ESP-WROOM32 "DOIT ESP32 DEVKIT V1" + VS1053 + ST7735R 'GreenTab') does not seem to "take" the defaultsettings.txt content that was being flashed from the V2 software over PlatformIO, and fails to boot at all. Doing it this way, the device fires right up.

So while I'm grateful for the line of updated code, it was not necessary.

However, I'm now experiencing a different problem with this hardware so I will close this ticket and open a new one for that issue.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants