Skip to content

Commit

Permalink
Move CLR_SETTINGS to targets
Browse files Browse the repository at this point in the history
- Following nanoframework/nf-interpreter#832

Signed-off-by: José Simões <[email protected]>
  • Loading branch information
josesimoes committed Aug 29, 2018
1 parent d22273f commit a9df783
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 6 deletions.
11 changes: 10 additions & 1 deletion CMSIS-OS/ChibiOS/GHI_FEZ_CERB40_NF/nanoCLR/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,17 @@ int main(void) {

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

// CLR settings to launch CLR thread
CLR_SETTINGS clrSettings;
(void)memset(&clrSettings, 0, sizeof(CLR_SETTINGS));

clrSettings.MaxContextSwitches = 50;
clrSettings.WaitForDebugger = false;
clrSettings.EnterDebuggerLoopAfterExit = true;

// create the CLR Startup thread
osThreadCreate(osThread(CLRStartupThread), NULL);
osThreadCreate(osThread(CLRStartupThread), &clrSettings);

// EXT driver needs to be started from main
#if (HAL_USE_EXT == TRUE)
Expand Down
11 changes: 10 additions & 1 deletion CMSIS-OS/ChibiOS/I2M_ELECTRON_NF/nanoCLR/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,17 @@ int main(void) {

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

// CLR settings to launch CLR thread
CLR_SETTINGS clrSettings;
(void)memset(&clrSettings, 0, sizeof(CLR_SETTINGS));

clrSettings.MaxContextSwitches = 50;
clrSettings.WaitForDebugger = false;
clrSettings.EnterDebuggerLoopAfterExit = true;

// create the CLR Startup thread
osThreadCreate(osThread(CLRStartupThread), NULL);
osThreadCreate(osThread(CLRStartupThread), &clrSettings);

// EXT driver needs to be started from main
#if (HAL_USE_EXT == TRUE)
Expand Down
11 changes: 10 additions & 1 deletion CMSIS-OS/ChibiOS/I2M_OXYGEN_NF/nanoCLR/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,17 @@ int main(void) {

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

// CLR settings to launch CLR thread
CLR_SETTINGS clrSettings;
(void)memset(&clrSettings, 0, sizeof(CLR_SETTINGS));

clrSettings.MaxContextSwitches = 50;
clrSettings.WaitForDebugger = false;
clrSettings.EnterDebuggerLoopAfterExit = true;

// create the CLR Startup thread
osThreadCreate(osThread(CLRStartupThread), NULL);
osThreadCreate(osThread(CLRStartupThread), &clrSettings);

// EXT driver needs to be started from main
#if (HAL_USE_EXT == TRUE)
Expand Down
11 changes: 10 additions & 1 deletion CMSIS-OS/ChibiOS/ST_NUCLEO144_F412ZG_NF/nanoCLR/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,17 @@ int main(void) {

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

// CLR settings to launch CLR thread
CLR_SETTINGS clrSettings;
(void)memset(&clrSettings, 0, sizeof(CLR_SETTINGS));

clrSettings.MaxContextSwitches = 50;
clrSettings.WaitForDebugger = false;
clrSettings.EnterDebuggerLoopAfterExit = true;

// create the CLR Startup thread
osThreadCreate(osThread(CLRStartupThread), NULL);
osThreadCreate(osThread(CLRStartupThread), &clrSettings);

// start kernel, after this main() will behave like a thread with priority osPriorityNormal
osKernelStart();
Expand Down
11 changes: 10 additions & 1 deletion CMSIS-OS/ChibiOS/ST_NUCLEO64_F401RE_NF/nanoCLR/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,17 @@ int main(void) {

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

// CLR settings to launch CLR thread
CLR_SETTINGS clrSettings;
(void)memset(&clrSettings, 0, sizeof(CLR_SETTINGS));

clrSettings.MaxContextSwitches = 50;
clrSettings.WaitForDebugger = false;
clrSettings.EnterDebuggerLoopAfterExit = true;

// create the CLR Startup thread
osThreadCreate(osThread(CLRStartupThread), NULL);
osThreadCreate(osThread(CLRStartupThread), &clrSettings);

// EXT driver needs to be started from main
#if (HAL_USE_EXT == TRUE)
Expand Down
11 changes: 10 additions & 1 deletion CMSIS-OS/ChibiOS/ST_NUCLEO64_F411RE_NF/nanoCLR/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,17 @@ int main(void) {

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

// CLR settings to launch CLR thread
CLR_SETTINGS clrSettings;
(void)memset(&clrSettings, 0, sizeof(CLR_SETTINGS));

clrSettings.MaxContextSwitches = 50;
clrSettings.WaitForDebugger = false;
clrSettings.EnterDebuggerLoopAfterExit = true;

// create the CLR Startup thread
osThreadCreate(osThread(CLRStartupThread), NULL);
osThreadCreate(osThread(CLRStartupThread), &clrSettings);

// EXT driver needs to be started from main
#if (HAL_USE_EXT == TRUE)
Expand Down

0 comments on commit a9df783

Please sign in to comment.