diff --git a/demos/rt/RT-STM32F429-DISCOVERY/main.c b/demos/rt/RT-STM32F429-DISCOVERY/main.c
index bb8e7ea2f..84b6b3afc 100644
--- a/demos/rt/RT-STM32F429-DISCOVERY/main.c
+++ b/demos/rt/RT-STM32F429-DISCOVERY/main.c
@@ -136,6 +136,7 @@ static const ShellConfig shell_cfg1 = {
* Application entry point.
*/
int main(void) {
+ static THD_WORKING_AREA(wa_usb_lld_pump, STM32_USB_OTG_THREAD_STACK_SIZE);
thread_t *shelltp = NULL;
/*
@@ -164,6 +165,8 @@ int main(void) {
* Note, a delay is inserted in order to not have to disconnect the cable
* after a reset.
*/
+ chThdCreateStatic(wa_usb_lld_pump, sizeof(wa_usb_lld_pump),
+ STM32_USB_OTG_THREAD_PRIO, usb_lld_pump, serusbcfg.usbp);
usbDisconnectBus(serusbcfg.usbp);
chThdSleepMilliseconds(1000);
usbStart(serusbcfg.usbp, &usbcfg);
diff --git a/testhal/STM32F4xx/USB_CDC/.project b/testhal/STM32F4xx/USB_CDC/.project
index 135abc544..defd5f312 100644
--- a/testhal/STM32F4xx/USB_CDC/.project
+++ b/testhal/STM32F4xx/USB_CDC/.project
@@ -24,11 +24,6 @@
org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
-
- board
- 2
- CHIBIOS/boards/OLIMEX_STM32_E407
-
os
2
diff --git a/testhal/STM32F4xx/USB_CDC/main.c b/testhal/STM32F4xx/USB_CDC/main.c
index 2426320ff..dd01ecb25 100644
--- a/testhal/STM32F4xx/USB_CDC/main.c
+++ b/testhal/STM32F4xx/USB_CDC/main.c
@@ -457,7 +457,8 @@ static msg_t Thread1(void *arg) {
* Application entry point.
*/
int main(void) {
-thread_t *shelltp = NULL;
+ static THD_WORKING_AREA(wa_usb_lld_pump, STM32_USB_OTG_THREAD_STACK_SIZE);
+ thread_t *shelltp = NULL;
/*
* System initializations.
@@ -480,6 +481,8 @@ thread_t *shelltp = NULL;
* Note, a delay is inserted in order to not have to disconnect the cable
* after a reset.
*/
+ chThdCreateStatic(wa_usb_lld_pump, sizeof(wa_usb_lld_pump),
+ STM32_USB_OTG_THREAD_PRIO, usb_lld_pump, serusbcfg.usbp);
usbDisconnectBus(serusbcfg.usbp);
chThdSleepMilliseconds(1500);
usbStart(serusbcfg.usbp, &usbcfg);