ESP32Console icon indicating copy to clipboard operation
ESP32Console copied to clipboard

ESP32-C3 support?

Open acruise opened this issue 1 year ago • 1 comments

Hi there, I was idly trying to use ESP32Console on an ESP32-C3 board, which is RiscV rather than xtensa, so the XTSTR macro isn't available... How hard would it be to use a fallback? :)

acruise avatar Jan 11 '24 04:01 acruise

The XTSTR macro is only used in the system info command: https://github.com/jbtronics/ESP32Console/blob/8369b9566014e67a6fa6b816d56b657734ab57dd/src/ESP32Console/Commands/SystemCommands.cpp#L87

You could just simply comment this line out, and it should work.

But the macro is also pretty simple, as it just returns the value of the define constant as a string. You should be able to emulate it with something like this:

#define __STR(x) #x
#define XTSTR(x) __STR(x)

jbtronics avatar Jan 11 '24 09:01 jbtronics