cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Rebuild C SDK for ARM to run DotNet on Raspberry Pi?

ttyler
1-Newbie

Rebuild C SDK for ARM to run DotNet on Raspberry Pi?

Hi,

I'm looking to use the DotNet SDK ("thingworx-dotnet-common.dll") in a DotNet application using Mono on a Raspberry Pi (ARM CPU).

The dotnet DLL is a wrapper for the ANSI C twApi.dll, which comes compiled for x86 or x64 architectures, so when running the DotNet SteamSensor example (which has been rebuilt in Mono on the Pi) on the Pi the DotNet wrapper DLL has no entry points to the twApi.dll - wrong architecture.


I can 'gcc Make' an ARM suitable lib from the C SDK but the DotNet wrapper is not looking for it and I can't edit the source.


Please could anyone advise if they have any knowledge about a DotNet SDK DLL that has been rebuilt for an ARM suitable C DLL?


Failing that, has anyone developed their own basic wrapper class for the C DLL using PInvoke, and if so how would you rate the triviality of this task?


Thanks,

Tim

5 REPLIES 5
posipova
20-Turquoise
(To:ttyler)

As far as I'm aware, this has not been done by Thingworx people. Tuning in to see if any customers/partners have tried anything like that.

Thanks for the response Polina. From the outside it seems it would be fairly trivial to do/test and would open up a slew of devices to DotNet - is there a process I could follow to log it as a new feature request please?

Hi Tim,

Could you please explain how you compiled the C SDK for ARM? I am trying to compile for linux-arm by using make PLATFORM=gcc-linux-arm BUILD=release in Ubuntu but I am getting the error:

     gcc: unrecognized command line option '-mstructure-size-boundary=32'; did you mean '-mpreferred-stack-boundary='?

I am just trying to compile one of the examples from the C-SDK and I am in the linux folder of such example (in this case ExampleClient/linux).

Thank you for your help!

Eric

Hi Eric,

I built the C SDK from the C_SDK/build/platforms/gcc-linux-arm folder with the same "make PLATFORM=gcc-linux-arm BUILD=debug" command (but for the debug version).

Then I did the same make command (debug build) for the Steam Sensor example from the C_SDK/examples/SteamSensor/linux folder.


This worked fine on Debian based Raspbian OS - I'm afraid I can't advise beyond that.


Good luck.

Tim

Hi Tim,

I think the answer is that I must build it from an ARM device or use an ARM virtual machine, thank you for the response. Good luck!

Eric

Top Tags