diff --git a/os/oslib/src/chobjcaches.c b/os/oslib/src/chobjcaches.c index 860ba7542..bbe467bcb 100644 --- a/os/oslib/src/chobjcaches.c +++ b/os/oslib/src/chobjcaches.c @@ -311,11 +311,11 @@ oc_object_t *chCacheGetObject(objects_cache_t *ocp, /* Checking the cache for a hit.*/ objp = hash_get_s(ocp, group, key); - - chDbgAssert((objp->obj_flags & OC_FLAG_INHASH) == OC_FLAG_INHASH, - "not in hash"); - if (objp != NULL) { + + chDbgAssert((objp->obj_flags & OC_FLAG_INHASH) == OC_FLAG_INHASH, + "not in hash"); + /* Cache hit, checking if the buffer is owned by some other thread.*/ if (chSemGetCounterI(&objp->obj_sem) > (cnt_t)0) { diff --git a/testhal/STM32/multi/USB_CDC/.project b/testhal/STM32/multi/USB_CDC/.project index d2ce0172b..f3803a1ed 100644 --- a/testhal/STM32/multi/USB_CDC/.project +++ b/testhal/STM32/multi/USB_CDC/.project @@ -81,5 +81,10 @@ 2 CHIBIOS/os + + test + 2 + CHIBIOS/test + diff --git a/testhal/STM32/multi/USB_CDC/debug/STM32-USB_CDC (Select ELF file)(OpenOCD, Flash and Run).launch b/testhal/STM32/multi/USB_CDC/debug/STM32-USB_CDC (Select ELF file)(OpenOCD, Flash and Run).launch index ce12c6a3d..aaa1e1857 100644 --- a/testhal/STM32/multi/USB_CDC/debug/STM32-USB_CDC (Select ELF file)(OpenOCD, Flash and Run).launch +++ b/testhal/STM32/multi/USB_CDC/debug/STM32-USB_CDC (Select ELF file)(OpenOCD, Flash and Run).launch @@ -33,9 +33,9 @@ - + - + diff --git a/testhal/STM32/multi/USB_CDC/make/stm32h743_nucleo144.make b/testhal/STM32/multi/USB_CDC/make/stm32h743_nucleo144.make index 06e63fbdb..a73e64220 100644 --- a/testhal/STM32/multi/USB_CDC/make/stm32h743_nucleo144.make +++ b/testhal/STM32/multi/USB_CDC/make/stm32h743_nucleo144.make @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). diff --git a/testhal/STM32/multi/USB_CDC/make/stm32l4r5_nucleo144.make b/testhal/STM32/multi/USB_CDC/make/stm32l4r5_nucleo144.make index 4550e132b..a077795d5 100644 --- a/testhal/STM32/multi/USB_CDC/make/stm32l4r5_nucleo144.make +++ b/testhal/STM32/multi/USB_CDC/make/stm32l4r5_nucleo144.make @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT).