Skip to content

Commit

Permalink
Remove unused code from nanoBooter main
Browse files Browse the repository at this point in the history
- Following nanoframework/nf-interpreter#730

Signed-off-by: José Simões <[email protected]>
  • Loading branch information
josesimoes committed Jun 6, 2018
1 parent d228cce commit 1c11b89
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
8 changes: 3 additions & 5 deletions CMSIS-OS/ChibiOS/GHI_FEZ_CERB40_NF/nanoBooter/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -36,9 +37,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -74,10 +72,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
8 changes: 3 additions & 5 deletions CMSIS-OS/ChibiOS/I2M_ELECTRON_NF/nanoBooter/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -36,9 +37,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -73,10 +71,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
8 changes: 3 additions & 5 deletions CMSIS-OS/ChibiOS/I2M_OXYGEN_NF/nanoBooter/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -36,9 +37,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -73,10 +71,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
8 changes: 3 additions & 5 deletions CMSIS-OS/ChibiOS/ST_NUCLEO64_F401RE_NF/nanoBooter/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -36,9 +37,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -80,10 +78,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
8 changes: 3 additions & 5 deletions CMSIS-OS/ChibiOS/ST_NUCLEO64_F411RE_NF/nanoBooter/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <swo.h>
#include <targetHAL.h>
#include <WireProtocol_ReceiverThread.h>
#include <nanoPAL_BlockStorage.h>
#include <LaunchCLR.h>

void BlinkerThread(void const * argument)
Expand All @@ -36,9 +37,6 @@ osThreadDef(ReceiverThread, osPriorityHigh, 3072, "ReceiverThread");
// Application entry point.
int main(void) {

osThreadId blinkerThreadId;
osThreadId receiverThreadId;

// HAL initialization, this also initializes the configured device drivers
// and performs the board-specific initializations.
halInit();
Expand Down Expand Up @@ -81,10 +79,10 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);

// Creates the blinker thread, it does not start immediately.
blinkerThreadId = osThreadCreate(osThread(BlinkerThread), NULL);
osThreadCreate(osThread(BlinkerThread), NULL);

// create the receiver thread
receiverThreadId = osThreadCreate(osThread(ReceiverThread), NULL);
osThreadCreate(osThread(ReceiverThread), NULL);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down

0 comments on commit 1c11b89

Please sign in to comment.