-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from klonyyy/devel
MCUViewer v1.0.0
- Loading branch information
Showing
58 changed files
with
12,223 additions
and
591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,9 @@ elseif("${PLATFORM}" STREQUAL "WIN") | |
set(CMAKE_SYSTEM_NAME Windows) | ||
endif() | ||
|
||
project(STMViewer) | ||
project(MCUViewer) | ||
|
||
set(STMVIEWER_VERSION 0.5.0) | ||
set(MCUVIEWER_VERSION 1.0.0) | ||
|
||
set(CMAKE_BUILD_TYPE Release) | ||
set(CMAKE_CXX_STANDARD 20) | ||
|
@@ -70,7 +70,7 @@ if(UNIX) | |
find_package(glfw3 REQUIRED) | ||
set(STLINK_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/third_party/stlink/lib/linux/libstlink.a) | ||
set(JLINK_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jlink/lib/linux/libjlinkarm.so.7) | ||
set(INSTALL_PATH /usr/local/STMViewer) | ||
set(INSTALL_PATH /usr/local/MCUViewer) | ||
set(LIB_INSTALL_PATH /usr/local/lib) | ||
set(DESKTOP_FILE_PATH /usr/share/applications) | ||
|
||
|
@@ -107,9 +107,10 @@ set(PROJECT_SOURCES | |
${CMAKE_CURRENT_SOURCE_DIR}/src/Gui/GuiSwoControl.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/Gui/GuiAbout.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/Gui/GuiImportVariables.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/TargetMemoryHandler/TargetMemoryHandler.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/TargetMemoryHandler/StlinkHandler.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/TargetMemoryHandler/JlinkHandler.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/Gui/GuiAcqusition.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/MemoryReader/MemoryReader.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/MemoryReader/StlinkDebugProbe.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/MemoryReader/JlinkDebugProbe.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/Plot/Plot.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/Variable/Variable.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/MovingAverage/MovingAverage.cpp | ||
|
@@ -121,7 +122,8 @@ set(PROJECT_SOURCES | |
${CMAKE_CURRENT_SOURCE_DIR}/src/PlotHandler/PlotHandler.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/PlotHandler/TracePlotHandler.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/TraceReader/TraceReader.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/TraceReader/StlinkTraceDevice.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/TraceReader/StlinkTraceProbe.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/TraceReader/JlinkTraceProbe.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/GdbParser/GdbParser.cpp) | ||
|
||
set(IMGUI_SOURCES | ||
|
@@ -150,24 +152,31 @@ set(EXECUTABLE ${CMAKE_PROJECT_NAME}) | |
|
||
add_executable(${EXECUTABLE} ${PROJECT_SOURCES} ${IMGUI_SOURCES} ${IMPLOT_SOURCES} ${ICON_RC}) | ||
|
||
# GIT version | ||
add_custom_target(addGitVersion COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR} python3 ${CMAKE_CURRENT_SOURCE_DIR}/launch/addGitVersion.py | ||
set(GIT_VERSION_HPP ${CMAKE_CURRENT_SOURCE_DIR}/src/gitversion.hpp) | ||
|
||
# Add a custom command to generate gitversion.hpp | ||
add_custom_command( | ||
OUTPUT ${GIT_VERSION_HPP} | ||
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR} python3 ${CMAKE_CURRENT_SOURCE_DIR}/launch/addGitVersion.py | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
COMMENT "Generating gitversion.hpp..." | ||
VERBATIM) | ||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/.git/HEAD | ||
COMMENT "Generating ${GIT_VERSION_HPP}..." | ||
VERBATIM | ||
) | ||
|
||
add_custom_target(addGitVersion ALL DEPENDS ${GIT_VERSION_HPP}) | ||
add_dependencies(${EXECUTABLE} addGitVersion) | ||
|
||
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" _ "${STMVIEWER_VERSION}") | ||
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" _ "${MCUVIEWER_VERSION}") | ||
target_compile_definitions(${EXECUTABLE} | ||
PRIVATE STMVIEWER_VERSION_MAJOR=${CMAKE_MATCH_1} | ||
PRIVATE STMVIEWER_VERSION_MINOR=${CMAKE_MATCH_2} | ||
PRIVATE STMVIEWER_VERSION_REVISION=${CMAKE_MATCH_3} | ||
PRIVATE MCUVIEWER_VERSION_MAJOR=${CMAKE_MATCH_1} | ||
PRIVATE MCUVIEWER_VERSION_MINOR=${CMAKE_MATCH_2} | ||
PRIVATE MCUVIEWER_VERSION_REVISION=${CMAKE_MATCH_3} | ||
) | ||
|
||
target_include_directories(${EXECUTABLE} PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/Gui | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/TargetMemoryHandler | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/MemoryReader | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/Plot | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/ScrollingBuffer | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/MovingAverage | ||
|
@@ -192,7 +201,8 @@ target_include_directories(${EXECUTABLE} SYSTEM PRIVATE | |
${CMAKE_CURRENT_SOURCE_DIR}/third_party/implot/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/third_party/mINI/src/mini/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/third_party/nfd/src/include/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog/inc/) | ||
${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog/inc/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/third_party/CLI11/inc/) | ||
|
||
if(APPLE) | ||
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${STLINK_INCLUDE_DIRS}) | ||
|
@@ -251,7 +261,7 @@ endif() | |
|
||
if(UNIX) | ||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/launch/icon.png DESTINATION ${INSTALL_PATH}) | ||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/launch/STMViewer.desktop | ||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/launch/MCUViewer.desktop | ||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE | ||
DESTINATION ${DESKTOP_FILE_PATH}) | ||
install(FILES ${JLINK_LINUX} | ||
|
@@ -262,7 +272,7 @@ if(UNIX) | |
endif() | ||
|
||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
set(CPACK_PROJECT_VERSION ${STMVIEWER_VERSION}) | ||
set(CPACK_PROJECT_VERSION ${MCUVIEWER_VERSION}) | ||
set(CPACK_PACKAGE_VERSION ${CPACK_PROJECT_VERSION}) | ||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE) | ||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Piotr Wasilewski <[email protected]>") | ||
|
Oops, something went wrong.