Real-Time Windows Target error while build with 'to Video Display' block - matlab

I tried to run in real time a simple acquisition from the webcam and to send it to a to Video Display block. I used Real-Time Windows Target selecting rtwin.tlc as system target file, fixed-step discrete solver, 32-bit x86 compatible as device type (despite I use 64-bit Windows 7); when I try to build it returns the error:
Error(s) encountered while building model "untitled"
without specify cause of the error. Did I have miss something?
PS: I tried it replacing Webcam acquisition with From Multimedia File block and it returns same error.

Take a look at the documentation, the "to Video Display" does not support rtwin.
Note This block supports code generation and is only available on Windows platforms with available file I/O. This excludes Real-Time Windows Targetâ„¢ (RTWin). This block performs best on platforms with DirectX Version 9.0 or later and Windows Media Version 9.0 or later.
From Media File can't work as well, rtwin does not support file I/O

Related

Using qemu-system-gnuarmeclipse command-line for nrf52840

I want to run unit-tests for a firmware code written for nrf52840 using QEMU. I came across the GNU MCU Eclipse project which has forked the main QEMU project to provide better support for Cortex-M SoCs by allowing the creation of cortex-m devices through data definitions provided in CMSIS SVD files (as noted here). Even though the project primarily supports the STM32 based boards and MCUs, their eclipse plugin does support adding new device packs for development and debugging. But I am not able to figure out how to use their command-line tool qemu-system-gnuarmeclipse to run an ELF file created for nrf52840. I have the following questions:
How does eclipse plugin allow debugging for nrf52840 using custom SVD file even though their command-line tool doesn't have any option to provide a custom SVD file?
How can I add support for nrf52840? Can I reuse board and MCU definitions for STM32 and just provide a JSON variant for SVD file here?
See the discussion here for response to this question

Where Can i find an emulator to test my operating system for ARMv8?

I am currently writing an OS based on ARMv8 processor. I want to find an emulator that acts like the processor so I can see my OS working or not and to check my work.
I am on windows 10. are there any emulators recommended ?
I searched SO but no answer. thanks.
Looks like QEMU version 2.1+ is what you want
the latest version of upstream QEMU (2.1) now includes full ARMv8 system emulation support. This means that users can use upstream QEMU to run a full 64-bit ARMv8-A kernel and filesystem, such as a 64-bit Ubuntu cloud image. This was no small endeavour as it involved emulating a completely new instruction set, exception model, CPU implementation, and more. The implementation was verified with a custom instruction verification tool (RISU) and was heavily reviewed upstream by an engaged and incredibly supportive upstream QEMU community.
source

Building Darwin 16.6 from source?

Put succinctly I need a base for my system, since it was built on macOS Darwin seems like the logical choice as it will require the least porting effort. I know you can download up to Darwin 8.0.1 from Apple, and the full source tree is available for up to 10.0, however v8 is too old and lacks many standard modern features (i.e. a password system that doesn't restrict the root user to 10 characters, or support for the case-sensitive version of HFS+). I've tried building Darwin 9/10/11/12 from source using darwinbuild, but it always fails for various server-side reasons.
There has to be some way to create the equivalent of a vanilla Darwin 16 image. Perhaps taking an existing copy of macOS and stripping away all the closed-source stuff? Building the source that Apple provides at Apple Open Source Repository and substituting the rest of the packages required for the OS to function with source from another BSD distro? Taking an existing copy of FreeBSD and substituting the kernel with XNU? There has to be some way. Any ideas or thoughts on the ideas I suggested are welcome. Thanks.
The last xnu build instructions are for El Capitan (Darwin 15) but you might be able to follow them for Sierra (Darwin 16). The latest source available at time of writing is for 10.12.4, which isn't overly out of date.
This gets you most of the kernel of shipping macOS. It doesn't get you the driver stack - especially the SATA/AHCI stack is not open source, which could be a problem. (One of these days I'll get around to publishing our full virtio driver stack including virtio-blk and virtio-scsi drivers, with which you should be able to run without SATA in Qemu/KVM at least.)
I have no idea about getting a useful userland going - macOS/OSX uses launchd as its "init" process, and the last published source code for that is some years old. I don't know if it will need some tweaking to get it working on newer kernels.

clGetPlatformIDs error -1001 when called in PostgreSQL UDF

I'm trying to write an OpenCL function that would be executed inside PostgreSQL. To do this i create DLL from my OpenCL code and link it to postgres using User-Defined Function mechanism. Everything goes well until clGetPlatformIDs is called. Function returns error -1001, which I read that indicates problem with finding OpenCL drivers.
I've tried to compile the same code(i had to remove some postgres magic) to exe and runed it with success - all platforms were found correctly, so I assume that i have correctly set up SDK and drivers.
I am runing PostgreSQL 9.1 on windows 7 x64. I am also using Nvidia CUDA SDK 4.2 with Visual Studio 2010 and running my code on GeForce GTS 450.
It's MSFT's problem with Windows, Services, GPUs, Security and device drivers.
You can't run PostgreSQL as a service on Windows AND see any GPUs. You are hitting Session O Isolation which does NOT allow any 'graphics' device access from a Windows Service. You can start PostgreSQL as a process (not a service) or put the server on Linux.
See http://www.scribd.com/doc/58343489/Windows-Session-0-Isolation-Impact-on-GPU-as-Service
Also there are other important reasons to run on Linux, as Windows will want to reboot your GPU if the screen is not accessed before the timeout period. See
http://msdn.microsoft.com/en-us/library/windows/hardware/ff570088%28v=vs.85%29.aspx
NVida have a non-graphics GPU device driver for specific Tesla cards on Windows. These cards don't have any video output. So they aren't considered to be graphics device drivers.
Maybe the libraries try to locate the SDK using some environment-variables and the environment is not inherited inside the PostegreSQL context.
So try to dump the environment from your two codes and check if any OpenCL/Cuda variables is available in your standalone program and missing in your PostegreSQL UDF.

How to debug CUDA using eclipse Nsight with only one GPU

I'm getting an error: "all cuda devices are used for display and cannot be used while debugging"
(Using Ubuntu)
Is there ANY way to use Nsight eclipse with only one GPU for debugging?
I have seen solutions like
"sudo service lightdm stop"
to kill X but that kills Nsight eclipse too so what's the point?
Update: Since it is not possible to debug with the same GPU that runs X, I have to ask: How does one go about using ANOTHER computer in his home network to "remotely" access Ubuntu in such a way that the X desktop rendering will be performed by the Guest computer while letting the host GPU run the debugger?
In general, it's not supported to debug on the same GPU that is hosting an X display. From the nsight getting started guide: "A GPU that is running X11 (on Linux) or Aqua (on Mac) cannot be used to debug a CUDA application and will be hidden from the application ran in the debugger. Such GPU can still be used for profiling GPU applications. "
I believe there is actually different behavior amongst different window managers, however. I have a laptop with Quadro1000M and RHEL 6.2 (with GNOME), with CUDA 5.0, and I am able to get into the debugger in nsight EE (Project...Build Project followed by Run...Debug). At that point I can step through and set breakpoints in host code. And if I run the code to completion I get proper output. However, you still can't debug device code. If you set a breakpoint in the device code (and hit that breakpoint), you will hang the X session.
EDIT: CUDA 5.5 and beyond now support the ability to debug on a single cc3.5 or higher GPU.
It seems that you can use CUDA 5.5 to debug CUDA programs in a machine with only one GPU.
See section 1.7.3.2. CUDA-GDB of CUDA_Toolkit_Release_Notes
Another approach which might work is to use the onboard video output for the display.
That way you use the onboard graphics for the display and the GPU for debugging.
For this you have to:
Go to BIOS and change the primary display adapter to "On-Board" (this varies from manufacturer to manufacturer)
Physically connect you display to the on-board display output feed
Restart and then run Nsight
If you are using a system with no on-board graphics, then you are out of luck!
This guy here has been able to get it up and running in Windows with Visual studio and Nsight plugin.
P.S. You would probably need to edit your xorg.conf to make X use onboard graphics instead of your Nvidia GPU.