int main() { init_rs232(); enable_rs232_interrupts(); enable_rs232(); fs_init(); fio_init(); register_romfs("romfs", &_sromfs); pwd_hash=hash_djb2((const uint8_t *)&"",-1); // init pwd to /romfs/ /* Create the queue used by the serial task. Messages for write to * the RS232. */ vSemaphoreCreateBinary(serial_tx_wait_sem); /* Add for serial input * Reference: www.freertos.org/a00116.html */ serial_rx_queue = xQueueCreate(1, sizeof(char)); /* Create a task to output text read from romfs. */ xTaskCreate(command_prompt, (signed portCHAR *) "CLI", 512 /* stack size */, NULL, tskIDLE_PRIORITY + 2, NULL); #if 0 /* Create a task to record system log. */ xTaskCreate(system_logger, (signed portCHAR *) "Logger", 1024 /* stack size */, NULL, tskIDLE_PRIORITY + 1, NULL); #endif /* Start running the tasks. */ vTaskStartScheduler(); return 0; }
int main() { init_rs232(); enable_rs232_interrupts(); enable_rs232(); fs_init(); fio_init(); register_romfs("romfs", &_sromfs); /* Create the queue used by the serial task. Messages for write to * the RS232. */ vSemaphoreCreateBinary(serial_tx_wait_sem); /* Add for serial input * Reference: www.freertos.org/a00116.html */ serial_rx_queue = xQueueCreate(1, sizeof(char)); /* Create a task to output text read from romfs. */ xTaskCreate(command_prompt, (signed portCHAR *) "Command Prompt", 512 /* stack size */, NULL, configMAX_PRIORITIES, NULL); xTaskCreate(semihost_sysinfo, (signed portCHAR *) "Semihost Sysinfo", 512 /* stack size */, NULL, tskIDLE_PRIORITY + 2, NULL); /* Start running the tasks. */ vTaskStartScheduler(); return 0; }
int main() { init_rs232(); enable_rs232_interrupts(); enable_rs232(); fs_init(); fio_init(); register_romfs("romfs", &_sromfs); /* Create the queue used by the serial task. Messages for write to * the RS232. */ vSemaphoreCreateBinary(serial_tx_wait_sem); serial_rx_queue = xQueueCreate(1, sizeof(ch)); /*Create a task handle reference to http://www.freertos.org/a00128.html */ xTaskHandle xHandle; xTaskCreate(shell_task, (signed portCHAR *) "Implement shell", 512 /* stack size */, NULL, tskIDLE_PRIORITY + 2, NULL); /* Start running the tasks. */ vTaskStartScheduler(); return 0; }
int main() { //uint8_t testint=12; init_rs232(); enable_rs232_interrupts(); enable_rs232(); fs_init(); fio_init(); register_romfs("romfs", &_sromfs); /* Create the queue used by the serial task. Messages for write to * the RS232. */ vSemaphoreCreateBinary(serial_tx_wait_sem); /* Add for serial input * Reference: www.freertos.org/a00116.html */ serial_rx_queue = xQueueCreate(1, sizeof(char)); /* Test zone */ // testint = fs_open("romfs/test.txt", 0, O_RDONLY); /*fs_open is working if we input correct name // fio_printf(1, "\rWelcome to FreeRTOS Shell %d \r\n",testint); // fio_printf(1, "\rWelcome to FreeRTOS Shell\r\n"); /* Create a task to output text read from romfs. */ xTaskCreate(command_prompt, (signed portCHAR *) "CLI", 512 /* stack size */, NULL, tskIDLE_PRIORITY + 2, NULL); #if 0 /* Create a task to record system log. */ xTaskCreate(system_logger, (signed portCHAR *) "Logger", 1024 /* stack size */, NULL, tskIDLE_PRIORITY + 1, NULL); #endif /* Start running the tasks. */ vTaskStartScheduler(); return 0; }
int main() { init_rs232(); enable_rs232_interrupts(); enable_rs232(); fs_init(); fio_init(); register_romfs("romfs", &_sromfs); /* Create the queue used by the serial task. Messages for write to * the RS232. */ vSemaphoreCreateBinary(serial_tx_wait_sem); serial_rx_queue = xQueueCreate(1, sizeof(serial_ch_msg)); #ifdef UNIT_TEST xTaskCreate(unit_test_task, (signed portCHAR *) "Unit Test", 256, // stack size NULL, tskIDLE_PRIORITY + 2, NULL); #endif xTaskCreate(shell_task, (signed portCHAR*) "Shell", 512, /* Stack Size*/ NULL, tskIDLE_PRIORITY + 1, NULL); /* Start running the tasks. */ vTaskStartScheduler(); return 0; }