You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, testing does not work. It gets stuck forever and I have to reset the device. I added a custom unity_config.h, which is simply a copy of the default one for espidf from here.
I could never get it to work until I edited .pio/libdeps/esp32-c6/Unity/src/unity.c and redefined the UNITY_OUTPUT_CHAR macro like this:
#defineUNITY_OUTPUT_CHAR(c) putchar(c)
This results in a very revealing compiler warning:
.pio/libdeps/esp32-c6/Unity/src/unity.c: In function 'UnityPrintChar':
.pio/libdeps/esp32-c6/Unity/src/unity.c:80: warning: "UNITY_OUTPUT_CHAR" redefined
80 | #define UNITY_OUTPUT_CHAR(c) putchar(c)
|
In file included from .pio/libdeps/esp32-c6/Unity/src/unity_internals.h:11,
from .pio/libdeps/esp32-c6/Unity/src/unity.h:21,
from .pio/libdeps/esp32-c6/Unity/src/unity.c:7:
/home/vscode/.platformio/packages/framework-espidf/components/unity/include/unity_config.h:41: note: this is the location of the previous definition
41 | #define UNITY_OUTPUT_CHAR(a) unity_putc(a)
|
For some reason the wrong unity_config.h gets included: .platformio/packages/framework-espidf/components/unity/include/unity_config.h This one contains an implementation which simply doesn't work for my board. The default implementation for from here would work perfectly fine, but it is not used for some reason. My own implementation is also not used because the order of the inlcude directories is wrong:
-Itest needs to be the first include directory so that I can override whatever comes from /home/vscode/.platformio/packages/framework-espidf/components/unity/include. However, I would prefer not needing to override it in the first place.
If I edit .pio/libdeps/esp32-c6/Unity/src/unity_internals.h and add an absolute path for unity_config.h everything works:
This confirms that the wrong header was included. Is there a nicer way to work around this issue and get unit tests to run on a generic esp32-c6 board?
Thanks!
The text was updated successfully, but these errors were encountered:
I have an unbranded esp32-c6 board. Building, uploading and monitoring works with the following
platformio.ini
:However, testing does not work. It gets stuck forever and I have to reset the device. I added a custom
unity_config.h
, which is simply a copy of the default one forespidf
from here.I could never get it to work until I edited
.pio/libdeps/esp32-c6/Unity/src/unity.c
and redefined theUNITY_OUTPUT_CHAR
macro like this:This results in a very revealing compiler warning:
For some reason the wrong
unity_config.h
gets included:.platformio/packages/framework-espidf/components/unity/include/unity_config.h
This one contains an implementation which simply doesn't work for my board. The default implementation for from here would work perfectly fine, but it is not used for some reason. My own implementation is also not used because the order of the inlcude directories is wrong:The command looks like this:
-Itest
needs to be the first include directory so that I can override whatever comes from/home/vscode/.platformio/packages/framework-espidf/components/unity/include
. However, I would prefer not needing to override it in the first place.If I edit
.pio/libdeps/esp32-c6/Unity/src/unity_internals.h
and add an absolute path forunity_config.h
everything works:This confirms that the wrong header was included. Is there a nicer way to work around this issue and get unit tests to run on a generic esp32-c6 board?
Thanks!
The text was updated successfully, but these errors were encountered: