Uisng Pulse for HoloLens 2 with ARM platform build

look if its helpful for this.
Any specific thing which i can look into.

hi @abray did you found any configuration setting?

Hi Anand,

I have just pulled that article and will take a look.
I am having internet difficulties this week and its making things difficult

I think the best course of action is to find a ARM emulator I can run on regular ol Windows 10
And see if I can build an executable that runs pulse on it.

I am not sure where to get the windows emulator though…
I tried to google for it, but have a limited amount of time for this.
Do you think you can figure out how/where to get an emulator?

i got this two links and it might be helpful , as any specific emulator is not available , also hololens 2 emulator doesn’t use ARM while building for emulator .


: here you can fin the windows ARM mobile emulator and related info

https://docs.microsoft.com/en-us/visualstudio/test/vstest-console-options?view=vs-2019
: have you tried this VS console dll test option.

Also have you checked that project configuration link , does that made any changes in config setup.

is there option to set preferred build tool architecture to ARM?
let me know if i can help you to test anything on device.

I am pretty sure that just uses the 32bit cl.exe or the 64bit cl.exe when building
It does not affect the final build product, so that setting is not for us.

I have still not figured out what to download/install to get an emulator running on my machine
I have not looked in depth though…

Hello @abray , today i downloaded the project and tried to build it and i got this error:

5>CMake Error at schema/CMakeLists.txt:81 (add_library):
5> Cannot find source file:
5>
5> C:/Anand work2/enginePulse/schema/bind/cpp/cdm/Actions.pb.cc
5>
5> Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
5> .hpp .hxx .in .txx
5>
5>
5>CMake Error at schema/CMakeLists.txt:81 (add_library):
5> No SOURCES given to target: DataModelBindings
5>
5>
5>CMake Generate step failed. Build files cannot be regenerated correctly.

what i’m doing wrong?

First off
I suggest you check out the 3.x branch, not master
We have a significant change to CMake and the directory structure from master (should have a new release this month to update master)

I also think that the space in your ‘Anand work2’ folder may cause an issue. I am not sure. Is the file there?

Just to be safe, check out 3.x and remove the space in your home folder.

You building and tweeking settings is probably going to be the quickest way to get a working PulseC.dll for you

thanks, does that cmake configure setting is okay?

When you start again, make sure your build directory is empty
Then, just configure, generate, open and build
You don’t have to click on any cmake settings


do i missing anything now…

Well nuts
I see what is happening
Technically, you are cross compiling for ARM

In the Pulse build process, we build the protobuf compiler (protoc.exe) to generate code files based on our proto schema. But when you build for ARM, the protoc.exe built cannot run on regular windows, do the build does not generate the C++ files from the proto files.

Create a new build directory and target the regular MSVC 2019 x64 toolset, and build
That will successfully generate all the code files from the proto files

Then go back and build this ARM specific solution, and it will find the generated files

Sorry about that.
Cross compiling always adds a few wrenches into the system…

Hi, So id did the same and still i’m getting same error , i’m pasting the log here, it shows error related zlib but I’ve installed that already .

5>-- 3.10.1.0
5>-- Looking for pthread.h
5>-- Looking for pthread.h - not found
5>-- Found Threads: TRUE
5>-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
5>-- Generating Schema Bindings
5>-- Using : C:/PulseEngine/Build64/protobuf/install/bin/protoc
5>-- From C:/PulseEngine/Engine/engine/schema/proto
5>-- To C:/PulseEngine/Engine/engine/schema/bind
5>-- Not generating bindings, nothing has changed since last build
5>-- Looking for zip shas
5>-- Found Java: C:/Program Files/Amazon Corretto/jdk1.8.0_242/bin/java.exe (found version “1.8.0_242”)
5>-- Found JNI: C:/Program Files/Amazon Corretto/jdk1.8.0_242/lib/jawt.lib
5>-- Configuring done
5>CMake Error at schema/CMakeLists.txt:81 (add_library):
5> Cannot find source file:
5>
5> C:/PulseEngine/Engine/engine/schema/bind/cpp/cdm/Actions.pb.cc
5>
5> Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
5> .hpp .hxx .in .txx
5>
5>
5>CMake Error at schema/CMakeLists.txt:81 (add_library):
5> No SOURCES given to target: DataModelBindings
5>
5>
5>CMake Generate step failed. Build files cannot be regenerated correctly.
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(230,5): error MSB6006: “cmd.exe” exited with code 1.
5>Done building project “Pulse.vcxproj” – FAILED.
6>------ Build started: Project: PulseData, Configuration: Release x64 ------
6>Building Custom Rule C:/PulseEngine/Engine/engine/CMakeLists.txt
6>-- Found Java: C:/Program Files/Amazon Corretto/jdk1.8.0_242/bin/java.exe (found version “1.8.0_242”)
6>-- Using JAVA_HOME as my Java executable (set to : C:/Program Files/Amazon Corretto/jdk1.8.0_242)
6>EXEC : error : Could not find or load main class com.kitware.physiology.pulse.dataset.DataSetReader
6>-- Found Java: C:/Program Files/Amazon Corretto/jdk1.8.0_242/bin/java.exe (found version “1.8.0_242”)
6>-- Using JAVA_HOME as my Java executable (set to : C:/Program Files/Amazon Corretto/jdk1.8.0_242)
6>EXEC : error : Could not find or load main class com.kitware.physiology.testing.SETestDriver

It looks like you are not on the 3.x

But you also should delete the schema_last_built file in your source directory
It should be in C:/PulseEngine/Engine/engine/schema/bind

Yes ,i cloned the 3.x version, and deleteting schema work for x64
then i created build folder for ARM64, and it didn’t gave the last error but the new at the end of the pulse build.

5>Done building project “Pulse.vcxproj” – FAILED.
6>------ Build started: Project: PulseData, Configuration: Release ARM ------
6>Building Custom Rule C:/PulseEngine/Engine/engine/CMakeLists.txt
6>-- Found Java: C:/Program Files/Amazon Corretto/jdk1.8.0_242/bin/java.exe (found version “1.8.0_242”)
6>-- Using JAVA_HOME as my Java executable (set to : C:/Program Files/Amazon Corretto/jdk1.8.0_242)
6>INFO FileUtils::57::Loading native library : C:\PulseEngine\ARMBUILD\install\bin/PulseJNI
6>EXEC : error FileUtils: :83::Unable to load C:\PulseEngine\ARMBUILD\install\bin/PulseJNI
6>java.lang.UnsatisfiedLinkError: no PulseJNI in java.library.path
6> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
6> at java.lang.Runtime.loadLibrary0(Runtime.java:871)
6> at java.lang.System.loadLibrary(System.java:1124)
6> at com.kitware.physiology.utilities.FileUtils.loadLibrary(FileUtils.java:78)
6> at com.kitware.physiology.utilities.FileUtils.loadLibraries(FileUtils.java:48)
6> at com.kitware.physiology.utilities.jniBridge.initialize(jniBridge.java:10)
6> at com.kitware.physiology.pulse.dataset.DataSetReader.main(DataSetReader.java:48)
6>Exception in thread “main” java.lang.RuntimeException: Could not load PulseJNI library
6> at com.kitware.physiology.utilities.jniBridge.initialize(jniBridge.java:11)
6> at com.kitware.physiology.pulse.dataset.DataSetReader.main(DataSetReader.java:48)
6>-- Found Java: C:/Program Files/Amazon Corretto/jdk1.8.0_242/bin/java.exe (found version “1.8.0_242”)
6>-- Using JAVA_HOME as my Java executable (set to : C:/Program Files/Amazon Corretto/jdk1.8.0_242)
6>INFO FileUtils::57::Loading native library : C:\PulseEngine\ARMBUILD\install\bin/PulseJNI
6>EXEC : error FileUtils: :83::Unable to load C:\PulseEngine\ARMBUILD\install\bin/PulseJNI
6>java.lang.UnsatisfiedLinkError: no PulseJNI in java.library.path
6> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1871)
6> at java.lang.Runtime.loadLibrary0(Runtime.java:871)
6> at java.lang.System.loadLibrary(System.java:1124)
6> at com.kitware.physiology.utilities.FileUtils.loadLibrary(FileUtils.java:78)
6> at com.kitware.physiology.utilities.FileUtils.loadLibraries(FileUtils.java:48)
6> at com.kitware.physiology.utilities.jniBridge.initialize(jniBridge.java:10)
6> at com.kitware.physiology.testing.SETestDriver.main(SETestDriver.java:30)
6>Exception in thread “main” java.lang.RuntimeException: Could not load PulseJNI library
6> at com.kitware.physiology.utilities.jniBridge.initialize(jniBridge.java:11)
6> at com.kitware.physiology.testing.SETestDriver.main(SETestDriver.java:30)

i should use different build folder for different platform right, as i cant change the toolset setting for same build folder again, right ?

That is a good build
The build is trying to generate data for you, but it cannot as it is trying to load native dlls built for ARM and not regular Windows

You can use the same source folder for multiple builds
But yes, for each platform you should use a new build folder
i usually use

pulse-engine : This is my regular windows build, I build this first
pulse-engine-arm : This is for an ARM target
pulse-engine-arm64 : This is for an ARM64 target

Again, when you build arm targets, the PulseData project will fail to build as it is trying to generate data with the binaries you just built, and they cannot run on Windows

Good job! You are built and you can use that PulseC.dll on your HoloLens2!

Thanks :slight_smile:
i can see PulseC.dll is there in x64 build , but as arm build failed , i cant find that in ARM build folder.

okay so i again tried to build just Pulse project and not Pulse data ,
and i’m getting this now .

Error C1083 Cannot open include file: ‘unistd.h’: No such file or directory (compiling source file C:\PulseEngine\ARMBUILD\protobuf\src\protobuf\src\google\protobuf\io\gzip_stream.cc) [C:\PulseEngine\ARMBUILD\protobuf\src\protobuf-build\libprotobuf.vcxproj] Pulse C:\Program Files (x86)\GnuWin32\include\zconf.h 289

Try rebuilding the arm build

Let me know where it fails

yeah, please have a look: