Calling xscope_fread() in xscope_io_device.c causes an Illegal Resource exception as shown below:
C:\Users\michaelb\sandboxes\sln_hark\build>nmake run_application_hark
Microsoft (R) Program Maintenance Utility Version 14.25.28610.4
Copyright (C) Microsoft Corporation. All rights reserved.
Run application
xrun: Program received signal ET_ILLEGAL_RESOURCE, Resource exception.
[Switching to tile[0] core[5]]
0x00084174 in xscope_data_from_host (c=2147614722, buf=@0x8a5bc, n=@0x8a58c) at xscope_shared_xc.xc:44
44 xscope_shared_xc.xc: No such file or directory.
in xscope_shared_xc.xc
NMAKE : fatal error U1077: '"C:\Program Files (x86)\XMOS\XTC\15.1.4\bin\xrun.EXE"' : return code '0x7d'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x86\nmake.exe"' : return code '0x2'
Stop.
This failure was seen when running the non-premeptive FreeRTOS Hark application from the sln_hark repository. The dump state after the execption appears below:
The problem disappears by adding a 1 ms delay in xscope_fread() after the call to xscope_bytes(XSCOPE_ID_READ_BYTES, sizeof(packet), packet); and before the call to xscope_data_from_host(c_xscope, (char *)buffer_ptr, &bytes_read); which suggests a race condition between xscope_fileio functionality on the device and the speed with which the host provides the requested data.
Calling
xscope_fread()
in xscope_io_device.c causes an Illegal Resource exception as shown below:This failure was seen when running the non-premeptive FreeRTOS Hark application from the sln_hark repository. The dump state after the execption appears below:
The problem disappears by adding a 1 ms delay in
xscope_fread()
after the call toxscope_bytes(XSCOPE_ID_READ_BYTES, sizeof(packet), packet);
and before the call toxscope_data_from_host(c_xscope, (char *)buffer_ptr, &bytes_read);
which suggests a race condition between xscope_fileio functionality on the device and the speed with which the host provides the requested data.