Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCUViewer v1.0.0 #78

Merged
merged 29 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fe18143
feature: elf path relative to project cfg by default
dzid26 Jun 5, 2024
abcd863
Merge pull request #71 from dzid26/elf-relative
klonyyy Jun 9, 2024
56db6d0
fix: removed magic number in jlink handler module
klonyyy Jul 21, 2024
7bc0956
wip: working on jlink device select window
klonyyy Jul 21, 2024
e5dda09
fix: default to absolute path when project path is empty #75
klonyyy Jul 23, 2024
23a272f
feature: changed the target select button
klonyyy Jul 23, 2024
41e43ef
wip: workin on adding J-Link trace viewer feature
klonyyy Aug 18, 2024
0e59d15
wip: working prototype of JLink trace support
klonyyy Sep 1, 2024
eec9e79
fix: increased max sampling rate in VarViewer
klonyyy Sep 1, 2024
cb8f76e
wip: working on trace probe settings
klonyyy Sep 1, 2024
e465f8b
fix: trying to fix failing CI/CD
klonyyy Sep 2, 2024
9147cf9
fix: trying to fix failing CI/CD
klonyyy Sep 2, 2024
5013eaf
feature: added trace settings saving
klonyyy Sep 5, 2024
83035e5
refactor: changed std::atomic store to = operator
klonyyy Sep 6, 2024
ceb7abe
refactor: refactored some minor things
klonyyy Sep 6, 2024
34f97bd
test: fixed failing Trace tests
klonyyy Sep 8, 2024
cc005a2
test: fixed tests segfault
klonyyy Sep 8, 2024
089c12b
refactor: renamed things for better readability
klonyyy Sep 8, 2024
cb903df
test: fixed failing tests compilation
klonyyy Sep 8, 2024
88f399e
feature: set version to 0.6.0
klonyyy Sep 8, 2024
22fc169
fix: fixed bar plot colors porblem #72
klonyyy Sep 8, 2024
3947b9f
fix: fixed compilation errors
klonyyy Sep 8, 2024
67bc2ba
feature: changed project name to MCUViewer
klonyyy Sep 9, 2024
cc403d6
feature: modified README.md
klonyyy Sep 9, 2024
104f9aa
feature: added basic command line parsing using CLI11 #76
klonyyy Sep 10, 2024
8ac891b
docs: added support section in README.md
klonyyy Sep 11, 2024
c578982
fix: renaming stuff to MCUViewer
klonyyy Sep 11, 2024
1f92a66
fix: renaming stuff to MCUViewer
klonyyy Sep 11, 2024
e5332bb
fix: renaming to MCUViewer
klonyyy Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <piwasilewski@interia.pl>")
Expand Down
Loading