diff --git a/targets/CMSIS-OS/ChibiOS/MBN_QUAIL/nanoBooter/main.c b/targets/CMSIS-OS/ChibiOS/MBN_QUAIL/nanoBooter/main.c index 84e696553a..c9c035021f 100644 --- a/targets/CMSIS-OS/ChibiOS/MBN_QUAIL/nanoBooter/main.c +++ b/targets/CMSIS-OS/ChibiOS/MBN_QUAIL/nanoBooter/main.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -47,11 +46,6 @@ int main(void) { // and performs the board-specific initializations. halInit(); - // init SWO as soon as possible to make it available to output ASAP - #if (SWO_OUTPUT == TRUE) - SwoInit(); - #endif - // check for valid CLR image at address contiguous to nanoBooter if(CheckValidCLRImage((uint32_t)&__nanoImage_end__)) { diff --git a/targets/CMSIS-OS/ChibiOS/NETDUINO3_WIFI/nanoBooter/main.c b/targets/CMSIS-OS/ChibiOS/NETDUINO3_WIFI/nanoBooter/main.c index 50245ab305..ef315c5ee1 100644 --- a/targets/CMSIS-OS/ChibiOS/NETDUINO3_WIFI/nanoBooter/main.c +++ b/targets/CMSIS-OS/ChibiOS/NETDUINO3_WIFI/nanoBooter/main.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -56,11 +55,6 @@ int main(void) { // and performs the board-specific initializations. halInit(); - // init SWO as soon as possible to make it available to output ASAP - #if (SWO_OUTPUT == TRUE) - SwoInit(); - #endif - // check for valid CLR image at address contiguous to nanoBooter if(CheckValidCLRImage((uint32_t)&__nanoImage_end__)) { diff --git a/targets/CMSIS-OS/ChibiOS/ST_NUCLEO144_F746ZG/nanoBooter/main.c b/targets/CMSIS-OS/ChibiOS/ST_NUCLEO144_F746ZG/nanoBooter/main.c index 7c495d4091..a8b238bedf 100644 --- a/targets/CMSIS-OS/ChibiOS/ST_NUCLEO144_F746ZG/nanoBooter/main.c +++ b/targets/CMSIS-OS/ChibiOS/ST_NUCLEO144_F746ZG/nanoBooter/main.c @@ -47,6 +47,11 @@ int main(void) { SwoInit(); #endif + // The kernel is initialized but not started yet, this means that + // main() is executing with absolute priority but interrupts are already enabled. + osKernelInitialize(); + osDelay(20); // Let init stabilize + // the following IF is not mandatory, it's just providing a way for a user to 'force' // the board to remain in nanoBooter and not launching nanoCLR @@ -63,10 +68,6 @@ int main(void) { } } - // The kernel is initialized but not started yet, this means that - // main() is executing with absolute priority but interrupts are already enabled. - osKernelInitialize(); - // Initializes a serial-over-USB CDC driver. sduObjectInit(&SDU1); sduStart(&SDU1, &serusbcfg); diff --git a/targets/CMSIS-OS/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/main.c b/targets/CMSIS-OS/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/main.c index 4b253307ab..be1f4b899f 100644 --- a/targets/CMSIS-OS/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/main.c +++ b/targets/CMSIS-OS/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/main.c @@ -45,6 +45,11 @@ int main(void) { SwoInit(); #endif + // The kernel is initialized but not started yet, this means that + // main() is executing with absolute priority but interrupts are already enabled. + osKernelInitialize(); + osDelay(20); // Let init stabilize + // the following IF is not mandatory, it's just providing a way for a user to 'force' // the board to remain in nanoBooter and not launching nanoCLR @@ -60,10 +65,6 @@ int main(void) { } } - // The kernel is initialized but not started yet, this means that - // main() is executing with absolute priority but interrupts are already enabled. - osKernelInitialize(); - // Prepares the serial driver 2 using UART2 sdStart(&SD2, NULL); palSetPadMode(GPIOA, 2, PAL_MODE_ALTERNATE(1)); // USART2 TX diff --git a/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/main.c b/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/main.c index fccaf89749..3e1f9b8b5d 100644 --- a/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/main.c +++ b/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/main.c @@ -47,6 +47,11 @@ int main(void) { SwoInit(); #endif + // The kernel is initialized but not started yet, this means that + // main() is executing with absolute priority but interrupts are already enabled. + osKernelInitialize(); + osDelay(20); // Let init stabilize + // the following IF is not mandatory, it's just providing a way for a user to 'force' // the board to remain in nanoBooter and not launching nanoCLR @@ -63,10 +68,6 @@ int main(void) { } } - // The kernel is initialized but not started yet, this means that - // main() is executing with absolute priority but interrupts are already enabled. - osKernelInitialize(); - // Initializes a serial-over-USB CDC driver. sduObjectInit(&SDU1); sduStart(&SDU1, &serusbcfg); diff --git a/targets/CMSIS-OS/ChibiOS/ST_STM32F4_DISCOVERY/nanoBooter/main.c b/targets/CMSIS-OS/ChibiOS/ST_STM32F4_DISCOVERY/nanoBooter/main.c index 5346fa8f01..a684dc13a6 100644 --- a/targets/CMSIS-OS/ChibiOS/ST_STM32F4_DISCOVERY/nanoBooter/main.c +++ b/targets/CMSIS-OS/ChibiOS/ST_STM32F4_DISCOVERY/nanoBooter/main.c @@ -48,6 +48,11 @@ int main(void) { SwoInit(); #endif + // The kernel is initialized but not started yet, this means that + // main() is executing with absolute priority but interrupts are already enabled. + osKernelInitialize(); + osDelay(20); // Let init stabilize + // the following IF is not mandatory, it's just providing a way for a user to 'force' // the board to remain in nanoBooter and not launching nanoCLR @@ -64,10 +69,6 @@ int main(void) { } } - // The kernel is initialized but not started yet, this means that - // main() is executing with absolute priority but interrupts are already enabled. - osKernelInitialize(); - // Initializes a serial-over-USB CDC driver. sduObjectInit(&SDU1); sduStart(&SDU1, &serusbcfg); diff --git a/targets/CMSIS-OS/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/main.c b/targets/CMSIS-OS/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/main.c index 0fda0589f8..da2b19deca 100644 --- a/targets/CMSIS-OS/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/main.c +++ b/targets/CMSIS-OS/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/main.c @@ -47,6 +47,11 @@ int main(void) { SwoInit(); #endif + // The kernel is initialized but not started yet, this means that + // main() is executing with absolute priority but interrupts are already enabled. + osKernelInitialize(); + osDelay(20); // Let init stabilize + // the following IF is not mandatory, it's just providing a way for a user to 'force' // the board to remain in nanoBooter and not launching nanoCLR @@ -63,10 +68,6 @@ int main(void) { } } - // The kernel is initialized but not started yet, this means that - // main() is executing with absolute priority but interrupts are already enabled. - osKernelInitialize(); - // Initializes a serial-over-USB CDC driver. sduObjectInit(&SDU1); sduStart(&SDU1, &serusbcfg);