2016-11-17 08:36:10 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
|
|
|
#include "unity.h"
|
2017-03-16 03:07:50 +00:00
|
|
|
#include "unity_config.h"
|
2018-02-19 13:14:02 +00:00
|
|
|
#include "tcpip_adapter.h"
|
2016-11-17 08:36:10 +00:00
|
|
|
|
2017-03-16 03:07:50 +00:00
|
|
|
void unityTask(void *pvParameters)
|
2016-11-17 08:36:10 +00:00
|
|
|
{
|
2017-11-23 14:35:54 +00:00
|
|
|
vTaskDelay(2); /* Delay a bit to let the main task be deleted */
|
2017-11-09 09:26:43 +00:00
|
|
|
unity_run_menu(); /* Doesn't return */
|
2016-11-17 08:36:10 +00:00
|
|
|
}
|
|
|
|
|
2017-03-22 03:50:05 +00:00
|
|
|
void app_main()
|
2016-11-17 08:36:10 +00:00
|
|
|
{
|
2018-02-19 13:14:02 +00:00
|
|
|
// TCP/IP adapter is initialized here because it leaks memory so the
|
|
|
|
// initialization in test cases would make the test fail because of leak.
|
|
|
|
tcpip_adapter_init();
|
|
|
|
|
2017-03-22 03:50:05 +00:00
|
|
|
// Note: if unpinning this task, change the way run times are calculated in
|
|
|
|
// unity_platform
|
2016-11-07 00:54:44 +00:00
|
|
|
xTaskCreatePinnedToCore(unityTask, "unityTask", 8192, NULL,
|
2017-03-16 03:07:50 +00:00
|
|
|
UNITY_FREERTOS_PRIORITY, NULL, UNITY_FREERTOS_CPU);
|
2016-11-17 08:36:10 +00:00
|
|
|
}
|