### Install Project Documentation and Files Source: https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Middlewares/Third_Party/OpenAMP/libmetal/doc/CMakeLists.txt Installs the generated HTML documentation, README, and LICENSE files to the system's share directory. This ensures documentation is accessible after installation. ```cmake install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/${PROJECT_NAME}) install (FILES ${PROJECT_SOURCE_DIR}/README.md DESTINATION share/doc/${PROJECT_NAME}) install (FILES ${PROJECT_SOURCE_DIR}/LICENSE.md DESTINATION share/doc/${PROJECT_NAME}) ``` -------------------------------- ### CMake Project Setup Source: https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Examples/ARM/arm_signal_converge_example/CMakeLists.txt Sets the minimum CMake version and project name for the signal convergence example. ```cmake cmake_minimum_required (VERSION 3.14) project (arm_signal_convergence_example VERSION 0.1) ``` -------------------------------- ### Library Name and Installation Directory Setup Source: https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Middlewares/Third_Party/OpenAMP/open-amp/lib/CMakeLists.txt Sets the base name for the OpenAMP library and ensures the installation directory for libraries is set to 'lib' if not already defined. ```cmake set (OPENAMP_LIB open_amp) if (NOT CMAKE_INSTALL_LIBDIR) set (CMAKE_INSTALL_LIBDIR "lib") endif (NOT CMAKE_INSTALL_LIBDIR) ``` -------------------------------- ### Basic CMake Setup Source: https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Middlewares/Third_Party/OpenAMP/open-amp/CMakeLists.txt Sets the minimum CMake version required and configures a policy for compatibility. ```cmake cmake_minimum_required (VERSION 2.6) if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) endif() ``` -------------------------------- ### Executable and Configuration Source: https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Examples/ARM/arm_class_marks_example/CMakeLists.txt Defines the main executable for the example and includes the configuration script. The configApp function is used to configure the application with the root path. ```cmake add_executable(arm_class_marks_example) include(config) configApp(arm_class_marks_example ${ROOT}) target_sources(arm_class_marks_example PRIVATE arm_class_marks_example_f32.c) ``` -------------------------------- ### Remoteproc Start Application Source: https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Middlewares/Third_Party/OpenAMP/open-amp/docs/remoteproc-design.md Starts the application running on the remoteproc instance. ```c int remoteproc_start(struct remoteproc *rproc) ``` -------------------------------- ### CMake Examples with Different TARGET_CPU Source: https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/NN/README.md These examples demonstrate how to configure the build with different target CPUs using the Arm Ethos-U Core Platform toolchain. Adjust the path to the toolchain as needed. ```bash cmake .. -DCMAKE_TOOLCHAIN_FILE=~/ethos-u-core-platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DTARGET_CPU=cortex-m55 ``` ```bash cmake .. -DCMAKE_TOOLCHAIN_FILE=~/ethos-u-core-platform/cmake/toolchain/arm-none-eabi-gcc.cmake -DTARGET_CPU=cortex-m7 ``` ```bash cmake .. -DCMAKE_TOOLCHAIN_FILE=~/ethos-u-core-platform/cmake/toolchain/armclang.cmake -DTARGET_CPU=cortex-m3 ``` -------------------------------- ### Install OpenAMP Header Directory Source: https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Middlewares/Third_Party/OpenAMP/open-amp/lib/CMakeLists.txt Installs the OpenAMP header directory to the include path during the build process. ```cmake install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/openamp" DESTINATION include) ```