opencv/modules
Francesco Petrogalli d29c7e7871
Merge pull request #20392 from fpetrogalli:aarch64-semihosting
AArch64 semihosting

* [ts] Disable filesystem support in the TS module.

Because of this change, all the tests loading data will file, but tat
least the core module can be tested with the following line:

    opencv_test_core --gtest_filter=-"*Core_InputOutput*:*Core_globbing.accuracy*"

* [aarch64] Build OpenCV for AArch64 semihosting.

This patch provide a toolchain file that allows to build the library
for semihosting applications [1]. Minimal changes have been applied to
the code to be able to compile with a baremetal toolchain.

[1] https://developer.arm.com/documentation/100863/latest

The option `CV_SEMIHOSTING` is used to guard the bits in the code that
are specific to the target.

To build the code:

    cmake ../opencv/ \
        -DCMAKE_TOOLCHAIN_FILE=../opencv/platforms/semihosting/aarch64-semihosting.toolchain.cmake \
        -DSEMIHOSTING_TOOLCHAIN_PATH=/path/to/baremetal-toolchain/bin/ \
        -DBUILD_EXAMPLES=ON -GNinja

A barematel toolchain for targeting aarch64 semihosting can be found
at [2], under `aarch64-none-elf`.

[2] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads

The folder `samples/semihosting` provides two example semihosting
applications.

The two binaries can be executed on the host platform with:

    qemu-aarch64 ./bin/example_semihosting_histogram
    qemu-aarch64 ./bin/example_semihosting_norm

Similarly, the test and perf executables of the modules can be run
with:

    qemu-aarch64 ./bin/opecv_[test|perf]_<module>

Notice that filesystem support is disabled by the toolchain file,
hence some of the test that depend on filesystem support will fail.

* [semihosting] Remove blank like at the end of file. [NFC]

The spurious blankline was reported by
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31158.

* [semihosting] Make the raw pixel file generation OS independent.

Use the facilities provided by Cmake to generate the header file
instead of a shell script, so that the build doesn't fail on systems
that do not have a unix shell.

* [semihosting] Rename variable for semihosting compilation.

* [semihosting] Move the cmake configuration to a variable file.

* [semihosting] Make the guard macro private for the core module.

* [semihosting] Remove space. [NFC]

* [semihosting] Improve comment with information about semihosting. [NFC]

* [semihosting] Update license statement on top of sourvce file. [NFC]

* [semihosting] Replace BM_SUFFIX with SEMIHOSTING_SUFFIX. [NFC]

* [semihosting] Remove double space. [NFC]

* [semihosting] Add some text output to the sample applications.

* [semihosting] Remove duplicate entry in cmake configuration. [NFCI]

* [semihosting] Replace `long` with `int` in sample apps. [NFCI]

* [semihosting] Use `configure_file` to create the random pixels. [NFCI]

* [semihosting][bugfix] Fix name of cmakedefine variable.

* [semihosting][samples] Use CV_8UC1 for grayscale images. [NFCI]

* [semihosting] Add readme file.

* [semihosting] Remove blank like at the end of README. [NFC]

This fixes the failure at
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31272.
2021-07-21 18:46:05 +03:00
..
calib3d Merge pull request #20392 from fpetrogalli:aarch64-semihosting 2021-07-21 18:46:05 +03:00
core Merge pull request #20392 from fpetrogalli:aarch64-semihosting 2021-07-21 18:46:05 +03:00
dnn Merge pull request #20402 from rogday:tf_diag_dummy 2021-07-16 15:44:29 +00:00
features2d Merge pull request #20204 from Developer-Ecosystem-Engineering:improve-sift 2021-06-22 22:58:52 +00:00
flann Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-05-18 18:06:26 +00:00
gapi Merge pull request #20383 from dbudniko:dbudniko/mtcnn_1st_pnet_simplification 2021-07-13 19:33:13 +00:00
highgui Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-07-10 13:01:03 +00:00
imgcodecs Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-06-03 16:23:36 +00:00
imgproc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-06-19 18:44:16 +00:00
java java: force using of 'Ptr<>' for OpenCV classes 2021-07-02 21:20:08 +00:00
js Merge pull request #19771 from lionkunonly:opencvjsNodeFix 2021-04-01 12:29:48 +00:00
ml Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-04-15 20:50:26 +00:00
objc cmake: fix tracking detail headers 2021-04-01 12:21:18 +00:00
objdetect Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-06-03 16:23:36 +00:00
photo Merge pull request #20054 from danielenricocahall:fix-robertson-calibration-bug 2021-05-30 23:29:39 +03:00
python Merge pull request #20143 from rogday:base64_encoding 2021-07-19 20:43:19 +00:00
stitching Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-05-01 09:44:24 +00:00
ts Merge pull request #20392 from fpetrogalli:aarch64-semihosting 2021-07-21 18:46:05 +03:00
video java: force using of 'Ptr<>' for OpenCV classes 2021-07-02 21:13:49 +00:00
videoio Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-07-10 13:01:03 +00:00
world vtk 9.0 autoinit fix 2021-05-18 10:20:54 +03:00
CMakeLists.txt highgui: cleanup and fixes 2021-05-31 17:03:53 +00:00