HDF5 running on ARM V 7 processor

Hi,

I am using an AT-501 SoM(System on Module) by Shiratech which is powered by
an ARM V 7 processor. I run WEC 2013 (Windows compact edition) upon it and
wrote software in C++ and/or C# and/or VB.net using VS2015 by Microsoft..
Now I want to use HDF5, but my nuget informed me, that there is no package
available for ARM and .net CF 3.9.

Any idea how I can get it running, or is there no chance at all?

With best regards

Gerhard

Gerhard, how are you? The HDF.PInvoke assemblies in our NuGet packages
are built for the "Any CPU" platform. We provide native HDF5 binaries
for x86 and x86_64 only. How is the .NET Compact Framework different
from the regular thing?

Regards,
Gerd (or Gerhard)

···

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Gerhard Kreuzer
Sent: Thursday, August 18, 2016 7:32 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] HDF5 running on ARM V 7 processor

Hi,

I am using an AT-501 SoM(System on Module) by Shiratech which is powered by an ARM V 7 processor. I run WEC 2013 (Windows compact edition) upon it and wrote software in C++ and/or C# and/or VB.net using VS2015 by Microsoft.. Now I want to use HDF5, but my nuget informed me, that there is no package available for ARM and .net CF 3.9.

Any idea how I can get it running, or is there no chance at all?

With best regards

Gerhard

Hi Gerd,

the Compact Framework 3.9 is a subset of the normal .net framework. It is
made to allow development of .net applications which should run on embedded
devices, which normally didn't use x86 processors.

As far as I know, the project template I have to use to develop apps take
care of all that stuff. I use drivers for USB chips from FTDI and I have to
download special drivers built for the ARM V7 processor.

I hoped that hdf5 only relies on very basic functions like file IO and far
as I see, this functions were similar to the standard implementation.

I added a shot which shows the outcome as I tried to use nuget.

I am not so familar with this mailing lists. I tried to replay in the forum,
but I get an error, which told me, that I tried to use a restricted area .

With best regards

Gerhard

I think there are several issues here:

HDF.PInvoke.dll (.NET "Any CPU" or "ARM")):

···

-------------------------------------------

For the time being, you should stick to the 1.8 family of HDF5.
The 1.8.17.X NuGet packages won't help you though, because they target the
.NET 4.5 framework and include native dependencies only for x86 and x86_64.
What would be the equivalent Compact Framework version?
(Or you would have to build HDF.PInvoke with an earlier .NET framework target,
i.e., 2.0, 3.5 or 4.0)

hdf5.dll, hdf5_hl.dll, zlib.dll, szip.dll (native ARM):
-------------------------------------------------------

You'll have to compile the HDF5 library for ARM. At the moment, cross compilation
is a pain, but if you have a native build host (GCC + Autotools) this will work
just fine. I've built it for Raspberry Pi 2 (ARMv7) and 3 (ARMv8) under
Raspbian (Debian) with good success.

Once you have those, you should be good to go. (Build UnitTests.dll for a sanity check!)

It's not a configuration we've built or support, but there's a good chance that it'll work.

Best, G.

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Gerhard Kreuzer
Sent: Thursday, August 18, 2016 2:51 PM
To: hdf-forum@lists.hdfgroup.org
Subject: Re: [Hdf-forum] HDF5 running on ARM V 7 processor

Hi Gerd,

the Compact Framework 3.9 is a subset of the normal .net framework. It is made to allow development of .net applications which should run on embedded devices, which normally didn't use x86 processors.

As far as I know, the project template I have to use to develop apps take care of all that stuff. I use drivers for USB chips from FTDI and I have to download special drivers built for the ARM V7 processor.

I hoped that hdf5 only relies on very basic functions like file IO and far as I see, this functions were similar to the standard implementation.

I added a shot which shows the outcome as I tried to use nuget.

I am not so familar with this mailing lists. I tried to replay in the forum, but I get an error, which told me, that I tried to use a restricted area ...

With best regards

Gerhard

Hi Gerd,

my problem is, that I am not familar with low level cross compiling.

I can write C/C++ projects with my VS2015 and this projects get compiled to
my target hardware, no problem.

If there is some project which contains the source for HDF5 PInvoke 1.8,
this would work.

I also can reference native (unmanaged) dlls from managed (C# or VB.net)
code, so there is a way I can use such dlls containing the HDF5 stuff.

I actually wrote runtime critical code, which controls some hardware in C++
and packed this code blocks in a dll, which is called by my application
written in VB.net. Works fine.

If HDF5 isn't native and is based on some ,net Framework version, than my
.net Framework is CF 3.9, which is a subset of the full framework, cause it
is for embedded systems. Now it depends what HDF5 is using, if there is only
native file IO there isn't a problem ahead I think, but if it is using more
complex functions of the framework, maybe we run into troubles.

So is there a way to get a VS2015 project containing the HDF5 stuff and
compile it into one / or more dlls?

You did it for Raspi, but you used the Linux derivate running there, sorry,
but I can't use any kind of Linux here.

With best regards

Gerhard

Hi Gerhard,

a naive question .... did you try building hdf5 on your target platform with cmake directly?
As long as you have cmake and visual studio installed, I don't see a problem. cmake can generate the solutions and even call visual studio to do the compilation.

Best,
P

The HDF.PInvoke source code is on GitHub: https://github.com/HDFGroup/HDF.PInvoke

We don't maintain Visual Studio projects for the native HDF5 DLLs.
We use CMake (https://cmake.org/) to generate them. You should be able
to create a VS solution for x86 or x86_64, and then then switch the back end
to your ARM compiler.

WARNING: The size of certain types is established as part of the configuration
process. Make sure those number match your target system.

G.

···

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Gerhard Kreuzer
Sent: Friday, August 19, 2016 8:35 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] HDF5 running on ARM V 7 processor

Hi Gerd,

my problem is, that I am not familar with low level cross compiling.

I can write C/C++ projects with my VS2015 and this projects get compiled to my target hardware, no problem.
If there is some project which contains the source for HDF5 PInvoke 1.8, this would work.

I also can reference native (unmanaged) dlls from managed (C# or VB.net) code, so there is a way I can use such dlls containing the HDF5 stuff.

I actually wrote runtime critical code, which controls some hardware in C++ and packed this code blocks in a dll, which is called by my application written in VB.net. Works fine.

If HDF5 isn't native and is based on some ,net Framework version, than my .net Framework is CF 3.9, which is a subset of the full framework, cause it is for embedded systems. Now it depends what HDF5 is using, if there is only native file IO there isn't a problem ahead I think, but if it is using more complex functions of the framework, maybe we run into troubles.

So is there a way to get a VS2015 project containing the HDF5 stuff and compile it into one / or more dlls?

You did it for Raspi, but you used the Linux derivate running there, sorry, but I can't use any kind of Linux here.

With best regards

Gerhard

Ok, thanks.

So I have to learn to use CMake first, whatever this is.

With best regards

Gerhard

···

-----Ursprüngliche Nachricht-----
Von: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] Im Auftrag von
hdf-forum-request@lists.hdfgroup.org
Gesendet: Freitag, 19. August 2016 15:59
An: hdf-forum@lists.hdfgroup.org
Betreff: Hdf-forum Digest, Vol 86, Issue 16

Send Hdf-forum mailing list submissions to
  hdf-forum@lists.hdfgroup.org

To subscribe or unsubscribe via the World Wide Web, visit
  

or, via email, send a message with subject or body 'help' to
  hdf-forum-request@lists.hdfgroup.org

You can reach the person managing the list at
  hdf-forum-owner@lists.hdfgroup.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Hdf-forum digest..."

Today's Topics:

   1. HDF5 running on ARM V 7 processor (Gerhard Kreuzer)
   2. Re: HDF5 running on ARM V 7 processor (Peter Steinbach)
   3. Re: HDF5 running on ARM V 7 processor (Gerd Heber)

----------------------------------------------------------------------

Message: 1
Date: Fri, 19 Aug 2016 15:34:43 +0200
From: "Gerhard Kreuzer" <gerhard.kreuzer@liftoff.at>
To: <hdf-forum@lists.hdfgroup.org>
Subject: [Hdf-forum] HDF5 running on ARM V 7 processor
Message-ID: <076201d1fa1e$72300e90$56902bb0$@liftoff.at>
Content-Type: text/plain; charset="us-ascii"

Hi Gerd,

my problem is, that I am not familar with low level cross compiling.

I can write C/C++ projects with my VS2015 and this projects get compiled to
my target hardware, no problem.

If there is some project which contains the source for HDF5 PInvoke 1.8,
this would work.

I also can reference native (unmanaged) dlls from managed (C# or VB.net)
code, so there is a way I can use such dlls containing the HDF5 stuff.

I actually wrote runtime critical code, which controls some hardware in C++
and packed this code blocks in a dll, which is called by my application
written in VB.net. Works fine.

If HDF5 isn't native and is based on some ,net Framework version, than my
.net Framework is CF 3.9, which is a subset of the full framework, cause it
is for embedded systems. Now it depends what HDF5 is using, if there is only
native file IO there isn't a problem ahead I think, but if it is using more
complex functions of the framework, maybe we run into troubles.

So is there a way to get a VS2015 project containing the HDF5 stuff and
compile it into one / or more dlls?

You did it for Raspi, but you used the Linux derivate running there, sorry,
but I can't use any kind of Linux here.

With best regards

Gerhard

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.hdfgroup.org/pipermail/hdf-forum_lists.hdfgroup.org/attachment
s/20160819/b52cf9c5/attachment-0001.html>

------------------------------

Message: 2
Date: Fri, 19 Aug 2016 15:52:02 +0200
From: Peter Steinbach <steinbach@scionics.de>
To: hdf-forum@lists.hdfgroup.org
Subject: Re: [Hdf-forum] HDF5 running on ARM V 7 processor
Message-ID: <8b3c7444-cbf3-83ae-cf7d-8b0f21920352@scionics.de>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hi Gerhard,

a naive question .... did you try building hdf5 on your target platform with
cmake directly?
As long as you have cmake and visual studio installed, I don't see a
problem. cmake can generate the solutions and even call visual studio to do
the compilation.

Best,
P

------------------------------

Message: 3
Date: Fri, 19 Aug 2016 13:58:17 +0000
From: Gerd Heber <gheber@hdfgroup.org>
To: HDF Users Discussion List <hdf-forum@lists.hdfgroup.org>
Subject: Re: [Hdf-forum] HDF5 running on ARM V 7 processor
Message-ID:
  
<BLUPR17MB0113C3080EE3E93D5C111F1EA4160@BLUPR17MB0113.namprd17.prod.outlook.

Content-Type: text/plain; charset="us-ascii"

The HDF.PInvoke source code is on GitHub:
https://github.com/HDFGroup/HDF.PInvoke

We don't maintain Visual Studio projects for the native HDF5 DLLs.
We use CMake (https://cmake.org/) to generate them. You should be able to
create a VS solution for x86 or x86_64, and then then switch the back end to
your ARM compiler.

WARNING: The size of certain types is established as part of the
configuration process. Make sure those number match your target system.

G.

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of
Gerhard Kreuzer
Sent: Friday, August 19, 2016 8:35 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] HDF5 running on ARM V 7 processor

Hi Gerd,

my problem is, that I am not familar with low level cross compiling.

I can write C/C++ projects with my VS2015 and this projects get compiled to
my target hardware, no problem.
If there is some project which contains the source for HDF5 PInvoke 1.8,
this would work.

I also can reference native (unmanaged) dlls from managed (C# or VB.net)
code, so there is a way I can use such dlls containing the HDF5 stuff.

I actually wrote runtime critical code, which controls some hardware in C++
and packed this code blocks in a dll, which is called by my application
written in VB.net. Works fine.

If HDF5 isn't native and is based on some ,net Framework version, than my
.net Framework is CF 3.9, which is a subset of the full framework, cause it
is for embedded systems. Now it depends what HDF5 is using, if there is only
native file IO there isn't a problem ahead I think, but if it is using more
complex functions of the framework, maybe we run into troubles.

So is there a way to get a VS2015 project containing the HDF5 stuff and
compile it into one / or more dlls?

You did it for Raspi, but you used the Linux derivate running there, sorry,
but I can't use any kind of Linux here.

With best regards

Gerhard

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.hdfgroup.org/pipermail/hdf-forum_lists.hdfgroup.org/attachment
s/20160819/683a5acf/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

------------------------------

End of Hdf-forum Digest, Vol 86, Issue 16
*****************************************

Hi Gerd,

ok, I get CMake and I get the GitHub site.

Can you tell me something about the software structure, so I can find some
entry point?

In the directory HDF5 I found a lot of cs files, so if I create a solution
with my VS2015 setup to produce images for my target and include all the
cs. files into this project, can I get the output I want?

Is this a way to get a VS2015 project producing ARM V7 versions?

At which stage of this process CMake is needed?

Any dependencies?

Thanks a lot, to give me a good starting point.

With best regards

Gerhard

CMake is the tool that will create the solution. Don't create it by
yourself, you will miss too many things.
Cheers,

···

2016-08-20 8:27 GMT+01:00 Gerhard Kreuzer <gerhard.kreuzer@liftoff.at>:

Hi Gerd,

ok, I get CMake and I get the GitHub site.

Can you tell me something about the software structure, so I can find some
entry point?

In the directory HDF5 I found a lot of cs files, so if I create a solution
with my VS2015 setup to produce images for my target and include all the
cs. files into this project, can I get the output I want?

Is this a way to get a VS2015 project producing ARM V7 versions?

At which stage of this process CMake is needed?

Any dependencies?

Thanks a lot, to give me a good starting point.

With best regards

Gerhard

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

--
Information System Engineer, Ph.D.
Blog: http://blog.audio-tk.com/
LinkedIn: http://www.linkedin.com/in/matthieubrucher

Hi,

ok,

1.) HDF5.PInvoke is only an interface to have a way to use HDF5 from
managed code, right?

2.) It is no problem to create a VS2015 project, using my settings for my
target, include all the source files and compile it, right?

3.) HDF5PInvoke references 4 native dlls, right?

4.) So I also have to port this dlls, or get the correct versions if
available, right?

Where can I find this 4 native dlls, compiled for ARM V7, or where can I get
the source? I fiddle through the HDF5.org repository, but can't find
anything useful, maybe I don't have the experiance to identify this
projects. Is this a C++ or a Fortran software, found some notes about
Fortran.

Is this the point where this CMake software cames into play?

Sorry about that, but never used CMake or Fortran on modern machines (I
wrote Fortran programs 38 years ago, using a DEC PDP 8a computer, there has
something changed since this days, I guess).

So please help me to get this 4 native dlls running on ARM V7, I think I can
do the job porting PInvoke.

With best regards

Gerhard

Hi Gerd,

found something:

case PlatformID.WinCE:

return new H5WindowsDLLImporter();

case PlatformID.Xbox:

case PlatformID.MacOSX:

case PlatformID.Unix:

return new H5UnixDllImporter ();

default:

break;

}

throw new NotImplementedException();

}

}

#region Windows Importer

internal class H5WindowsDLLImporter : H5DLLImporter

{

[DllImport("kernel32.dll", SetLastError = true)]

internal static extern IntPtr GetModuleHandle(string lpszLib);

[DllImport("kernel32.dll", SetLastError = true)]

internal static extern IntPtr GetProcAddress

(IntPtr hModule, string procName);

Here you check for ,WinCE', and later on the ,H5WindowsDLLImporter' imports
from ,kernel32.dll', but if the software should run on WinCE you have to
import from ,coredll.dll'.

Not a big deal to fix that, I guess, but as I wrote I need some entry point
from where I can start. I don't check, which functions were imported and I
also didn't check, if there were appropriate functions available in
,coredll.dll', but I hope so.

Sorry, that I am not familar with CMake and all that other stuff.

With best regards

Gerhard

There is a VS2013 solution in the HDF.PInvoke GitHub project.
It shouldn't be too hard to upgrade that to VS2015.
You don't even need the native dependencies to build HDF.PInvoke.dll.
It's configured for "Any CPU". I don't know if that includes ARM,
but you can change that. It's also configured for the .NET Framework
4.5 target. You'll have to change that to your CE target and
maybe adjust the .NET core dependencies.

You need the native dependencies only to run the unit tests or
your own application.

CMake is only needed to build the native dependencies for ARM.
As Matthieu pointed out, it builds the VS solution as a side-effect.
You'll have to massage the project to pick up the ARM headers and
libs, because it'll be configured for x86(_64).

G.

···

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Gerhard Kreuzer
Sent: Saturday, August 20, 2016 2:28 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] HDF5 running on ARM V 7

Hi Gerd,

ok, I get CMake and I get the GitHub site.

Can you tell me something about the software structure, so I can find some entry point?

In the directory HDF5 I found a lot of cs files, so if I create a solution with my VS2015 setup to produce images for my target and include all the cs. files into this project, can I get the output I want?
Is this a way to get a VS2015 project producing ARM V7 versions?

At which stage of this process CMake is needed?

Any dependencies?

Thanks a lot, to give me a good starting point.

With best regards

Gerhard

1.) Yes.

2.) Yes.

3.) Yes. (Plus the VS C/C++ runtime for ARM)

4.) Yes.

The HDF5 source is available from https://www.hdfgroup.org/HDF5/release/obtainsrc.html
(Is our website really that bad?)

Unless you need the Fortran bindings (I guess not), it's a straight C-build. (no C++ either)

G.

···

From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Gerhard Kreuzer
Sent: Saturday, August 20, 2016 3:10 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] HDF5 running on ARM V 7

Hi,

ok,

1.) HDF5.PInvoke is only an interface to have a way to use HDF5 from managed code, right?

2.) It is no problem to create a VS2015 project, using my settings for my target, include all the source files and compile it, right?

3.) HDF5PInvoke references 4 native dlls, right?

4.) So I also have to port this dlls, or get the correct versions if available, right?

Where can I find this 4 native dlls, compiled for ARM V7, or where can I get the source? I fiddle through the HDF5.org repository, but can't find anything useful, maybe I don't have the experiance to identify this projects. Is this a C++ or a Fortran software, found some notes about Fortran.
Is this the point where this CMake software cames into play?

Sorry about that, but never used CMake or Fortran on modern machines (I wrote Fortran programs 38 years ago, using a DEC PDP 8a computer, there has something changed since this days, I guess).

So please help me to get this 4 native dlls running on ARM V7, I think I can do the job porting PInvoke.

With best regards

Gerhard