Open nexendaniel opened 9 months ago
My apologies for the high-latency reply. You have exposed a mistake in my pre-processor checks. I'll push a real fix for that shortly. In the meantime...
I see that you are building under an Arduino-esque environment. You might want to try using this version of the driver, which was intended for Arduino. https://github.com/jspark311/Arduino-ADG2128
It appears that you are trying to use the version of the driver that I wrote against CppPotpourri, which is faster and more flexible, but carries a great deal more complexity.
If you want to keep the driver arrangement you already have:
Try setting this in your build system:
#define CONFIG_C3P_CBOR 1
Or otherwise pass it into your build command with -DCONFIG_C3P_CBOR
.
If that clears up some of your errors, you can probably clear up the rest by doing the same thing to the flag CONFIG_C3P_IMG_SUPPORT
.
If it works, be sure that your linker was able to GC all the unused code. That is: make sure it didn't increase your build size by an unreasonable amount.
Unless you are actually using those features, you could probably also hack up the library and simply remove any lines (or source files) that break the build.
Thank you for the bug report. It is fixed in most-recent master
of CppPotpourri
.
I will leave this issue open, in case you get further build errors.
I've fixed the gaps you identified with the following commit. Judging by your build output, you have a fairly recent pull of C3P. Might be worth simply re-pulling the whole lib, but if you just want to patch what you have, these are the changes to make. https://github.com/jspark311/CppPotpourri/commit/74e0b4a65895ea1a9d0f9418be55182dafa5b459
As far as the other warning...
/Users/danielmoon/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:43: warning: "PI" redefined
#define PI 3.1415926535897932384626433832795
...this is Arduino committing exactly the same sin (insufficient pre-proccessor guards). C3P is not at fault.
The build system is calling out this line in C3P as the definition being clobbered: https://github.com/jspark311/CppPotpourri/blob/master/src/EnumeratedTypeCodes.h#L49
Because that header has pre-processor guards (to protect against this case), I make the following inferences about your build system/project:
Arduino.h
.Arduino.h
do not have comparable pre-processor guards.You can fix it a few different ways. The simplest way would be to ensure that Arduino.h
is being included before anything from C3P. You can usually do this at the top of your sketch. Really, Arduino should header-guard that define in the same manner as I did. I bet they'd take a PR if you made them one. They are very easy to work with.
That said, you might also be able to drop the definition of PI
in CppPotpourri/EnumeratedTypeCodes.h
. The odds are low that the inclusion chain needs it defined, and if that's the case, the build warning will be resolved using the value of PI
given in Arduino.h
, despite the upside-down inclusion ordering.
Hello. First of all, thank you for creating this library. I am trying to connect ADG2128 on ESP32-S3.
At first, it is very difficult for me to find information about ADG2128. I am curious as to whether ADG2128 is a crosspoint switch capable of both analog and digital. Is this a chip that operates like the AD75019 or MT8816?
The issues are as follows I just installed the library, but the following error occurs when building. This error occurs in the CppPotpourri library. Please check the error code below.
Could this error be caused by using ESP32-S3? Or do I need to install additional libraries?
I've collected only the error codes here.
Please reply.