MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / main

Function main

test/common/unit_test_arbitrator_app0.cpp:230–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228 ***********************************************************************************/
229
230int main(void)
231{
232 int fake_argc = 1;
233 const auto fake_arg0 = "dummy";
234 char *fake_argv0 = const_cast<char *>(fake_arg0);
235 char **fake_argv = &fake_argv0;
236 ::testing::InitGoogleTest(&fake_argc, fake_argv);
237 BOARD_InitHardware();
238
239 ::testing::TestEventListeners &listeners = ::testing::UnitTest::GetInstance()->listeners();
240 delete listeners.Release(listeners.default_result_printer());
241 listeners.Append(new MinimalistPrinter);
242#ifdef UNITY_DUMP_RESULTS
243 listeners.Append(new CornTestingFrameworkPrint());
244#endif
245
246#ifdef CORE1_IMAGE_COPY_TO_RAM
247 // Calculate size of the image
248 uint32_t core1_image_size;
249 core1_image_size = get_core1_image_size();
250 PRINTF("Copy CORE1 image to address: 0x%x, size: %d\r\n", (void *)(char *)CORE1_BOOT_ADDRESS, core1_image_size);
251
252 // Copy application from FLASH to RAM
253 memcpy((void *)(char *)CORE1_BOOT_ADDRESS, (void *)CORE1_IMAGE_START, core1_image_size);
254
255#ifdef APP_INVALIDATE_CACHE_FOR_SECONDARY_CORE_IMAGE_MEMORY
256 invalidate_cache_for_core1_image_memory(CORE1_BOOT_ADDRESS, core1_image_size);
257#endif /* APP_INVALIDATE_CACHE_FOR_SECONDARY_CORE_IMAGE_MEMORY */
258
259#endif /* CORE1_IMAGE_COPY_TO_RAM */
260
261 g_initThread.init(&runInit, 1, 256 * 4);
262 g_serverThread.init(&runServer, 2, 1536 * 4);
263 g_clientThread.init(&runClient, 1, 1536 * 4);
264
265 g_initThread.start();
266 g_serverThread.start();
267 g_clientThread.start();
268
269 vTaskStartScheduler();
270
271 while (1)
272 {
273 }
274}
275
276extern "C" {
277void quitSecondInterfaceServer()

Callers

nothing calls this directly

Calls 5

InitGoogleTestFunction · 0.85
ReleaseMethod · 0.80
AppendMethod · 0.80
initMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected