When you buy a Nucleo board there is a preloaded program loaded into it :
First B2 press : LD1 red led blinks fast
Second B2 press : LD2 blue led blinks medium
Third B2 press : LD3 green led blinks slow
and it loops all over.
Where to get that code ? it seems it's not included with Stm32 projects examples.