On 1/31/23 07:30, Sebastian Huber wrote:
so with zone being NULL the crash is expected here. However I'm still
curious if this is libbsd issue or my issue with naive configuration?
Did you use select() before libbsd is initialized? Do you have more than
64 file descriptors? In this case the fd set type is too small and you
have a stack overflow.
And this is exactly what was happening and why I increase STACK size
insanely. Anyway, thanks to your help, this is no longer happening.
Which branch of libbsd do you use? Maybe try out
the other branch as well.
master. I've thought this is were development happens, isn't it?
Also noted interesting thing. If I modify buildset to remove all USB, I
still get linked error USB related (missing functions) due to functions
being used from device-nexus.h. Is this current behavior or have I did
anything wrong again?
E.g. stm32h7 USB setup in libbsd is wrong for my board (causes RTEMS
crash) so I've tried to disable that by build set modification (all
dev_usb* = off) and this does not helped hence I've modified
device-nexus.h also to not use dwg at all.
Hmm, looks like patch like attach may solve the issue? At least it did
for my case here. But I don't know if this is the right way to attack
this issue.
From the 16MiB you already waste 4MiB for unused features if you use
the latest 6-freebsd-12 branch of libbsd.
No, master here. Also I've not attempted to optimize for size yet as the
project is currently still not done yet.
Thanks!
Karel
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index d98e6f76..11f74771 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -187,6 +187,7 @@ RTEMS_BSD_DRIVER_USB_MASS;
RTEMS_BSD_DEFINE_NEXUS_DEVICE(stmac, 0, 0, NULL);
SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
+#if defined(RTEMS_BSD_MODULE_DEV_USB_CONTROLLER)
static const rtems_bsd_device_resource dwcotg_res[] = {
{
.type = RTEMS_BSD_RES_MEMORY,
@@ -200,6 +201,8 @@ static const rtems_bsd_device_resource dwcotg_res[] = {
};
RTEMS_BSD_DEFINE_NEXUS_DEVICE(dwcotg, 0, RTEMS_ARRAY_SIZE(dwcotg_res),
dwcotg_res);
+#endif
+
RTEMS_BSD_DRIVER_ST_SDMMC(0, SDMMC1_BASE, DLYB_SDMMC1_BASE, SDMMC1_IRQn);
RTEMS_BSD_DRIVER_MMC;
RTEMS_BSD_DRIVER_USB;
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel