ArduCAM ESP32S UNO platform install fails and char* to uint8_t* conversion error in Arduino IDE

I’m stuck trying to get the Arducam Mega 3MP (10th anniversary edition) working with the ESP32S-UNO board definition in the Arduino IDE. I’m following the full-featured example from the Arducam docs (ESP32Node page). When I try to compile the sketch it fails in ArducamLink.cpp with:

error: invalid conversion from ‘char*’ to ‘uint8_t*’ {aka ‘unsigned char*’} [-fpermissive]

pointing at the line arducamUartWriteBuff(buff,len); at ArducamLink.cpp:218:26.

I’ve already refreshed the libraries and restarted everything, but it still fails. Board definition is ArduCAM_ESP32S_UNO, platform ESP32.

Thanks for the details. That error usually means printf() is passing a char* buffer into a function that expects a uint8_t*. Can you open ArducamLink.cpp and paste the printf(char* buff) function, plus the arducamUartWriteBuff(…) signature around lines 205-218? I want to confirm the exact types before suggesting the change.

Here’s the printf function:

void ArducamLink::printf(char* buff)
{
uint16_t len = strlen(buff);
// SerialPrintf(buff);
// delayUs(12);
arducamUartWriteBuff(buff, len);
}

And the function it calls:

void ArducamLink::arducamUartWriteBuff(uint8_t* buff, uint16_t length)

Full compiler output:

C:\Users<user>\AppData\Local\Temp.arduinoIDE-unsaved2023311-152-207iss.t6lrp\full_featured\ArducamLink.cpp: In member function ‘void ArducamLink::printf(char*)’:
C:\Users<user>\AppData\Local\Temp.arduinoIDE-unsaved2023311-152-207iss.t6lrp\full_featured\ArducamLink.cpp:218:26: error: invalid conversion from ‘char*’ to ‘uint8_t*’ {aka ‘unsigned char*’} [-fpermissive]
arducamUartWriteBuff(buff,len);
^~~~
C:\Users<user>\AppData\Local\Temp.arduinoIDE-unsaved2023311-152-207iss.t6lrp\full_featured\ArducamLink.cpp:205:49: note: initializing argument 1 of ‘void ArducamLink::arducamUartWriteBuff(uint8_t*, uint16_t)’
void ArducamLink::arducamUartWriteBuff(uint8_t* buff, uint16_t length)

exit status 1
Compilation error: invalid conversion from 'char*' to 'uint8_t*' {aka 'unsigned char*'} [-fpermissive]

Confirmed. printf(char* buff) is passing a char* to arducamUartWriteBuff(), which expects uint8_t*. Some compilers allow that implicitly, but this ESP32 toolchain treats it as an error, so you need an explicit cast.

Find:

void ArducamLink::printf(char* buff)
{
uint16_t len = strlen(buff);
// SerialPrintf(buff);
// delayUs(12);
arducamUartWriteBuff(buff, len);
}

Change the last line to:

arducamUartWriteBuff((uint8_t*)buff, len);

That tells the compiler you’re intentionally passing the buffer as a byte array. The library should have this fixed in the next version.

That cast fixed the compile error, thanks. But now I’ve hit a new problem. When I try to use the esp32s-uno board definition in the Arduino IDE, the platform install fails. The IDE shows:

Tool ArduCAM_ESP32S_UNO:[email protected] already installed
Tool ArduCAM_ESP32S_UNO:[email protected] already installed
Tool ArduCAM_ESP32S_UNO:[email protected] already installed
Downloading packages
ArduCAM_ESP32S_UNO:[email protected]
Installing platform ArduCAM_ESP32S_UNO:[email protected]
Failed to install platform: ArduCAM_ESP32S_UNO:esp32.
Error: 13 INTERNAL: Cannot install platform: installing platform ArduCAM_ESP32S_UNO:[email protected]: testing local archive integrity: testing archive size: fetched archive size differs from size specified in index: 30810480 != 30814208

That’s an archive integrity failure, not a board definition problem. The downloaded platform archive is 30810480 bytes but the index says it should be 30814208 bytes, so the IDE rejects it. This mismatch happens with some versions of the Arduino IDE / Board Manager. The simplest workaround is to switch to Arduino IDE 1.8 and try the install again.

Steps:

  1. Install Arduino IDE 1.8 (or use an existing 1.8 install).
  2. In 1.8, re-add the board manager URL if needed.
  3. Install the ArduCAM_ESP32S_UNO board definition / ArduCAM_ESP32S_UNO:[email protected] platform again.

Understood. Before I set up 1.8, is there any way to force the current IDE to accept the archive, or is the mismatch purely on the server/index side? I’d rather not downgrade if there’s a quick fix.

To sum up where things stand: the compile error is resolved with the (uint8_t*) cast in printf(). The remaining issue is the platform install — the archive size mismatch (30810480 vs 30814208) is causing the integrity check to fail in the current IDE setup. I don’t have a reliable way to force the current IDE past that check; the recommended workaround is to install the ESP32S-UNO board definition using Arduino IDE 1.8. The library cast fix should also be included in the next release.