I try to run a freertos demo on maple. After I upload the firmware, the /dev/ttyACM0 disappear as soon as the maple completes booting. I think there should be some problem with the firmware. There is the source of the firmware. Could someone find the problem of the source for me. thanks in advance.
#include "wirish.h"
#include "FreeRTOS.h"
#include "task.h"
#define PWM_PIN 2
void setup()
{
/* Set up the LED to blink */
pinMode(BOARD_LED_PIN, OUTPUT);
/* Turn on PWM on pin PWM_PIN */
pinMode(PWM_PIN, PWM);
pwmWrite(PWM_PIN, 0x8000);
/* Send a message out USART2 */
Serial2.begin(9600);
}
/* Multi-task example */
void vTaskCodePing( void * pvParameters )
{
while(1) {
SerialUSB.print("Ping\n");
delay(900);
}
}
void vTaskCodePang( void * pvParameters )
{
while(1) {
SerialUSB.print("PANG\n");
delay(900);
}
}
#define STACK_SIZE 200
/* Please Do Not Remove & Edit Following Code */
int main(void) {
setup();
/* Create two tasks Ping and Pang */
xTaskCreate(vTaskCodePing, (const signed char*)"Ping", STACK_SIZE, NULL, 1, NULL);
xTaskCreate(vTaskCodePang, (const signed char*)"Pang", STACK_SIZE, NULL, 1, NULL);
vTaskStartScheduler();
return 0;
}