Updated versions of ChibiOS/RT, NilRTOS, and FreeRTOS

Hi, fat16lib,

I'm currently stuck with something damn simple on Due, your latest FreeRTOS ARM, and 1.52 IDE.

I have an early draft for a software which should control 2 step motors, display data on TM1639, and exchange data via Firmata with Linux PC (3rd feature is not written yet). Currently I have only 1 step motor and TM1638 LED connected, and both work wit conventional Arduino setup.

I took a FreeRTOS example which basically spawns 2 threads, and in my case call of vTaskStartScheduler() hangs Due. I even removed all TM1639 calls, result is still the same.

void setup(void) {
portBASE_TYPE s1, s2;
Serial.begin(9600);

pinMode(MOTORCLK, OUTPUT);

s1 = xTaskCreate(vNumericLED, (signed char*)"Task 1", 200, NULL, 1, NULL);
s2 = xTaskCreate(vRunStepMotor1, (signed char*)"Task 2", 200, NULL, 2, NULL);

if (s1 != pdPASS || s2 != pdPASS ) {
Serial.println(F("Creation problem"));
// while(1);
}
else
Serial.println(F("Creation OK"));;

vTaskStartScheduler();

for (;;);
}

static void vNumericLED(void *pvParameters)
{}

static void vRunStepMotor1(void *pvParameters)
{
digitalWrite(MOTORCLK, HIGH);
vTaskDelay(20000 * 250 / portTICK_RATE_MS);
digitalWrite(MOTORCLK, LOW);
vTaskDelay(20000 * 250 / portTICK_RATE_MS);
}

extern "C"{
void vApplicationIdleHook(void) {}
}

Anything after vTaskStartScheduler() is not executed, so I assume its a system freeze. Please correct if I'm wrong here.

Any idea what might get wrong?

Thanks in advance.