I am taking this opportunity to document a cross compilation procedure for libjpeg targeting ARM Linux mostly so that I won’t have to go searching for it again in the future!

 
First create a directory and cd to it:

Now get the source and un-tar it:

Configure the build, specifying your C compiler and cross compilation host, then make:

Here, I am using the xilinx build of the compiler, hence the reference to xilinx in the host and CC parameters, if I wasn’t using the xilinx tools the above configure command may have looked more like this:

Now make install, specifying a directory for the output:

If all goes well the output of the build process should be written to the _install directory, copy the .so files to the appropriate directory on your target device (e.g. /usr/local/lib)

By default #include statements are not inserted into files for dependency relationships when generating C++ code from UML models in Sparx Enterprise Architect – this is a bit annoying but we are well used to UML editors doing annoying things so at least it’s not a terrible surprise!

 

In Enterprise Architect’s defence it is quite easy to add this missing functionality. In order to get it to generate #include statements we have to edit two of the code generation templates: “Import” and “Import Section”.

 

To edit the templates go to the “Settings / Code Generation Templates…”, menu and you should see a list of the templates on the left-hand side of the screen.

 

Change the “Import” template so that it looks like this:

And then change the “Import Section” template so that it looks like this:

Now when you generate C++ code from your modle #include statements should be inserted to satisify dependency relationships.

 

Thanks to this article for the instructions (in German!).

 

Related Posts

If you are using the easy social module in drupal 6 with a quirky (read rubbish) theme (or sometimes ubercart) then you may notice that the social media buttons don’t get displayed on some node types.

 

To get around this problem you may have to alter the node’s template to manually insert the Easy Social module’s output – and hence the social media buttons. Add the following to the relevant node template which can be found in your theme folder:

More information can be found here.

 

PS It’s high time you were using drupal 7! ;-)

 

Related Posts

If you are trying to use sleep_for() in the standard C++ thread library via GCC and are getting an error like the following:

 

‘sleep_for’ is not a member of ‘std::this_thread’

 

The you may have to define the following symbol:

 

More information can be found here.

 

Related Posts

If you are scratching your head about how to setup Eclipse and CDT to use the boost thread library then have a look at the first post in this thread:

 

http://www.eclipse.org/forums/index.php/m/787571/

 

It explains which project settings need to be changed.

 

Thanks to Robert!

 

Related Posts

April 30, 2013

I came across this interesting article in Dr. Dobbs that details the implementation of a light weight logging framework in C++ that uses policy classes:

 

http://www.drdobbs.com/cpp/a-lightweight-logger-for-c/240147505?pgno=1

 

I reckon that it could be of special of interest for use with embedded systems.

 

Related Posts

I recently started getting the following error when opening a solution in Visual Studio 2010:

 

“The associated source control plug-in is not installed or could not be initialized. Common causes for this error include server unavailability and/or incorrect workspace mappings”

 

I had just installed Visual Studio 2012 and was worried this had caused the problem in VS2010, but now thankfully I think that it was just a coincidence, from my research this error seems to pop up frequently enough all on its own.

 

So, more information on how to fix the problem can be found here:

 

http://stackoverflow.com/questions/5081405/tfs-error-source-control-unable-to-access-database

 

But in summary the way I was able to fix it was to edit the solution file by hand and remove the following section:

Once I had changed the solution file, I loaded it up in Visual Studio and put it on-line with TFS by choosing the File -> Source Control -> Go Online menu item.

 

Now my solution was back to normal and happily reconnected to TFS.

 

I was mightily relieved to get rid of that annoying problem, so many thanks to all at stackoverflow!

 

Related Posts

You may have been having problems mounting an NFS volume on a Xilinx Zynq kernel build, perhaps mount fails with a ‘Connection Refused’ error message. If you check the /var/log/messages

Then you may see some entries like this:

If this is the case, then you may have to provide some extra option arguments to mount to get things working as follows:

I was having huge problems getting mount to work but this fixed things for me, thanks to all here for the tip!.

 

Related Posts

If you don’t want to use apache or the like to publish your web2py app then you can use web2py’s own little web server (rocket) by running web2py.py like this:

 

This won’t accept external connections however, and it also listens on port 8000 rather than port 80.

 

So, to allow external connections from web clients on port 80, run web2py.py as follows:

I keep forgetting this, so it’s getting written down for once and for all!

 

Related Posts

It is quite easy to get up and running with Ubuntu on Virtual Box, however a few tweaks will help you get the best out of your Linux installation. You might notice that your Ubuntu VM appears to run quite slowly, recent Ubuntu releases involve quite a lot of fancy visual effects on the desktop – these can really grind along very slowly on Virtual Box unless the ‘Enable 3D Acceleration’ setting is checked.

 

To enable this setting, first shut down your VM, then right-click on it and choose ‘settings…’, click ‘Display’ (on the left), and check the ‘Enable 3D Acceleration’ check box – The Ubuntu desktop should now be much snappier.

 

While you are at it it is probably a good idea to allow virtual box to use more Video Memory (why not 128Mb?!), also let it allocate it more base memory on the ‘System’ settings tab (set this to a few Gigs!).

 

To get the best out of your Ubuntu installation you will probably want to increase its screen resolution from the poky 1024×768, to do this you must first install the ‘Guest Additions’, once you have these installed you will be able to increase the screen resolution and also auto-mount directories on your host system for sharing files between the host and guest.

 

Here is a a short tutorial on installing Guest Additions. if you find that the guest additions don’t install or work properly with Ubuntu, it may be worth upgrading your installation of Open Box, I had problems getting them to work with v4.1.x, but they installed perfectly with v4.2.8.

 

Once they are installed you can drag the screen to the size you want and the choose the ‘View’ / ‘Auto-size Guest Display’ menu item, this will change your screens resolution to match the screen size.

 

Related Posts