Skip to content

Commit

Permalink
Merge pull request #78 from klonyyy/devel
Browse files Browse the repository at this point in the history
MCUViewer v1.0.0
  • Loading branch information
klonyyy authored Sep 16, 2024
2 parents eb3030f + e5332bb commit fc52d03
Show file tree
Hide file tree
Showing 58 changed files with 12,223 additions and 591 deletions.
20 changes: 10 additions & 10 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- omit in toc -->
# Contributing to STMViewer
# Contributing to MCUViewer

First off, thanks for taking the time to contribute! ❤️

Expand All @@ -13,39 +13,39 @@ All types of contributions are encouraged and valued. Please make sure to read t
## I Have a Question

> If you want to ask a question, we assume that you have read the [README file](https://github.com/klonyyy/STMViewer/blob/devel/README.md).
> If you want to ask a question, we assume that you have read the [README file](https://github.com/klonyyy/MCUViewer/blob/devel/README.md).
Before you ask a question, it is best to search for existing [Issues](https://github.com/klonyyy/STMViewer/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
Before you ask a question, it is best to search for existing [Issues](https://github.com/klonyyy/MCUViewer/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.

If you then still feel the need to ask a question and need clarification, we recommend to open an [Issue](https://github.com/klonyyy/STMViewer/issues/new).
If you then still feel the need to ask a question and need clarification, we recommend to open an [Issue](https://github.com/klonyyy/MCUViewer/issues/new).

<!-- omit in toc -->
### Submitting a Bug Report

A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [README file](https://github.com/klonyyy/STMViewer/blob/devel/README.md).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/klonyyy/STMViewer/issues?q=label%3Abug).
- If the issue is new please open an [Issue](https://github.com/klonyyy/STMViewer/issues/new).
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [README file](https://github.com/klonyyy/MCUViewer/blob/devel/README.md).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/klonyyy/MCUViewer/issues?q=label%3Abug).
- If the issue is new please open an [Issue](https://github.com/klonyyy/MCUViewer/issues/new).

<!-- omit in toc -->
### Before Submitting an Enhancement

- Make sure that you are using the latest version.
- Perform a [search](https://github.com/klonyyy/STMViewer/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Perform a [search](https://github.com/klonyyy/MCUViewer/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.

<!-- omit in toc -->
### How Do I Submit a Good Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://github.com/klonyyy/STMViewer/issues).
Enhancement suggestions are tracked as [GitHub issues](https://github.com/klonyyy/MCUViewer/issues).

- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
- You may want to **include screenshots or screen recordings** which help you demonstrate the steps or point out the part which the suggestion is related to.
- **Explain why this enhancement would be useful** to most STMViewer users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
- **Explain why this enhancement would be useful** to most MCUViewer users. You may also want to point out the other projects that solved it better and which could serve as inspiration.


## Styleguides
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:

- name: build_step
shell: bash
run: git config --global --add safe.directory /__w/STMViewer/ && ./launch/release.sh
run: git config --global --add safe.directory /__w/MCUViewer/ && ./launch/release.sh
- uses: actions/upload-artifact@v4
with:
name: STMViewer_installer
path: /__w/STMViewer/STMViewer/build/packages
name: MCUViewer_installer
path: /__w/MCUViewer/MCUViewer/build/packages
test:
runs-on: ubuntu-20.04
container:
Expand All @@ -38,4 +38,4 @@ jobs:

- name: test_step
shell: bash
run: git config --global --add safe.directory /__w/STMViewer/ && ./launch/run_tests.sh
run: git config --global --add safe.directory /__w/MCUViewer/ && ./launch/run_tests.sh
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ src/gitversion.hpp
**/[Dd]ebug/
**/[Rr]elease/

test/STMViewer_test/.settings/
test/MCUViewer_test/.settings/

# Prerequisites
*.d
Expand Down
10 changes: 5 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/STMViewer",
"program": "${workspaceFolder}/build/MCUViewer",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
Expand All @@ -33,7 +33,7 @@
"name": "(gdb) tests debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build_test/test/STMViewer_test",
"program": "${workspaceFolder}/build_test/test/MCUViewer_test",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
Expand All @@ -58,7 +58,7 @@
"name": "Remote Debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/STMViewer",
"program": "${workspaceFolder}/build/MCUViewer",
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
Expand All @@ -78,7 +78,7 @@
"name": "Remote Debug Attach",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/build/STMViewer",
"program": "${workspaceFolder}/build/MCUViewer",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"useExtendedRemote": true,
Expand All @@ -98,7 +98,7 @@
"name": "Remote Debug Tests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build_test/test/STMViewer_test",
"program": "${workspaceFolder}/build_test/test/MCUViewer_test",
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
Expand Down
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
"filesystem": "cpp",
"coroutine": "cpp",
"resumable": "cpp",
"future": "cpp"
}
"future": "cpp",
"codecvt": "cpp"
},
"docwriter.style": "Doxygen"
}
48 changes: 29 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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})
Expand Down Expand Up @@ -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}
Expand All @@ -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]>")
Expand Down
Loading

0 comments on commit fc52d03

Please sign in to comment.