In STM32 flash driver, don't use semaphore if multithreading isn't defined. If multithreading isn't defined, a call to sem_give function generates a hardware fault exception. Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>