Skip to main content

Posts

Showing posts with the label linux

CANbus on the Omega2

Omega2S Omega2+ If you are as big a fan of the Omega2 as I am I'm guessing you want to do as much with the platform as possible. Recently I've been looking to get a low cost Linux system on a CANbus, to sniff on some traffic. What are the options for adding a CAN interface to your Omega2, either when you are designing a solution or looking to easily add it to an existing system? eLinux has a great guide on a number of CANbus adapters that I'd recommend to anyone looking to integrate CAN into their system. Interface Typical use case Available on Omega2 / Omega2S serial (via SLCAN) Design-in/Add-on Simple protocol but not considered reliable, efficient or fast by Linux CAN developers . SPI Design-in Not usable , the Omega2 (MT7688 cpu) is only half duplex SPI Software SPI Design-in Higher cpu load than hardware SPI USB Design-in/Add-on Available (Omega2 has one USB host port) Note that all of the design-in options could be used ...

Converting a physical Windows installation into a virtual machine

Looking to run Linux on your computer but preserve the current Windows installation as a virtual machine? Trying to virtualize a Windows installation so you can transfer it to another computer? Using these steps you are likely to be able to take your existing physical Windows partition and convert it into a working virtual machine. I did this with a Windows 7 physical image then installing  Fedora 23 and using VirtualBox  to run Windows 7. Amazingly, to me at least, the process of creating the virtual disk image is performed from the running Windows system you'd like to virtualize. This is really convenient and much nicer than having to reinstall from scratch. disk2vhd is what enables you to do this on-the-fly virtual disk creation. It is created by Microsoft, so its kind of funny to use their tool to make it easy to convert a computer to Linux. NOTE - This level of monkeying around with operating systems and file systems does not always end well. You should back...

Performance of std::vector vs. arrays

The surprising results of a performance comparison between std::vector<> operator= and memcpy() with a raw array. An application profiling effort by a colleague and I led us to investigate the performance tradeoffs between std::vector<> and a raw array ( uint8_t blah[] ). The application was a c++ rewrite of a c# application. The rewrite was undertaken because the overhead of running a c# application on our memory and cpu constrained ARM Linux system was affecting system performance and responsiveness. Using Mono to run C# applications on Linux resulted in ~40MB of ram overhead for our application that itself allocated tens of thousands of bytes at most. Startup time left much to be desired. It took a few seconds to start the application up from mmc on the 1GHz ARM processor. We verified the long startup time by printing an “I’m started” string as the first function in Main. We tried upgrading to a newer version of Mono to see if that would improve performance. We las...