bricks/stm32/main: show run status only on success
If we are not going to run a program because we did not receive one, don't say that we do.
@@ -258,6 +258,9 @@ static void run_user_program(uint32_t len, uint8_t *buf) {
uint32_t free_len = len;
#endif
+ // Send a message to say we will run a program
+ mp_print_str(&mp_plat_print, "\n>>>> RUNNING\n");
+
mp_reader_t reader;
mp_reader_new_mem(&reader, buf, len, free_len);
@@ -352,9 +355,6 @@ soft_reset:
mp_init();
pb_imports();
- // Send a message to say we will run a program
- mp_print_str(&mp_plat_print, "\n>>>> RUNNING\n");
-
// Execute the user script
run_user_program(len, program);
