Skip to content

Commit

Permalink
Merge pull request #99 from klonyyy/devel
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
klonyyy authored Dec 8, 2024
2 parents 352e8f4 + 7012fec commit 3650ed7
Show file tree
Hide file tree
Showing 174 changed files with 6,451 additions and 4,136 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
"coroutine": "cpp",
"resumable": "cpp",
"future": "cpp",
"codecvt": "cpp"
"codecvt": "cpp",
"complex": "cpp",
"queue": "cpp"
},
"docwriter.style": "Doxygen"
}
19 changes: 11 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif()

project(MCUViewer)

set(MCUVIEWER_VERSION 1.0.1)
set(MCUVIEWER_VERSION 1.1.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

Expand Down Expand Up @@ -77,7 +77,7 @@ if(UNIX)
find_package(libusb REQUIRED)
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(JLINK_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jlink/lib/linux/libjlinkarm.so.8)
set(INSTALL_PATH /usr/local/MCUViewer)
set(LIB_INSTALL_PATH /usr/local/lib)
set(DESKTOP_FILE_PATH /usr/share/applications)
Expand Down Expand Up @@ -117,9 +117,8 @@ set(PROJECT_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/Gui/GuiSwoPlots.cpp
${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/Gui/GuiAcqusition.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/MemoryReader/MemoryReader.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Gui/GuiHelper.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
Expand All @@ -129,14 +128,15 @@ set(PROJECT_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/FileHandler/NFDFileHandler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ImguiPlugins/ImguiPlugins.cpp
${CMAKE_CURRENT_SOURCE_DIR}/third_party/stlink/inc/spdlogWrapper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/PlotHandler/PlotHandlerBase.cpp
${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/StlinkTraceProbe.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/TraceReader/JlinkTraceProbe.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/GdbParser/GdbParser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/CSVStreamer/CSVStreamer.cpp)
${CMAKE_CURRENT_SOURCE_DIR}/src/CSVStreamer/CSVStreamer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/VariableHandler/VariableHandler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/DataHandler/ViewerDataHandler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/DataHandler/TraceDataHandler.cpp)

set(IMGUI_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/third_party/imgui/imgui.cpp
Expand Down Expand Up @@ -201,7 +201,10 @@ target_include_directories(${EXECUTABLE} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/RingBuffer
${CMAKE_CURRENT_SOURCE_DIR}/src/Statistics
${CMAKE_CURRENT_SOURCE_DIR}/src/GdbParser
${CMAKE_CURRENT_SOURCE_DIR}/src/CSVStreamer)
${CMAKE_CURRENT_SOURCE_DIR}/src/PlotGroupHandler
${CMAKE_CURRENT_SOURCE_DIR}/src/CSVStreamer
${CMAKE_CURRENT_SOURCE_DIR}/src/VariableHandler
${CMAKE_CURRENT_SOURCE_DIR}/src/DataHandler)

target_include_directories(${EXECUTABLE} SYSTEM PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/third_party/stlink/inc/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TraceViewer is not influenced by optimizations, which means it is a great tool t
All dependencies should be installed and you should be ready to go.

Stlink users:
- in case your STLink is not detected, please copy the `/launch/udevrules/` folder contents to your `/etc/udev/rules.d/` directory.
- in case your STLink is not detected, please copy the `launch/install/Unix/udevrules/` folder contents to your `/etc/udev/rules.d/` directory.

### Windows:
1. Download and run the MCUViewer installer from the releases page (right hand side menu of the main repo page).
Expand Down
196 changes: 93 additions & 103 deletions example/STMViewer_test/.cproject → example/MCUViewer_test/.cproject

Large diffs are not rendered by default.

Large diffs are not rendered by default.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.234318883" name="Debug">
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1710865587" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-690955499330090190" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1371419899404254478" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.857087973" name="Release">
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1900443092" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-690955499330090190" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1371419899404254478" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
5 changes: 5 additions & 0 deletions example/MCUViewer_test/.settings/stm32cubeide.project.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
635E684B79701B039C64EA45C3F84D30=9AB01335C7D9AD93FC9CCF6DC64E7459
66BE74F758C12D739921AEA421D593D3=0
8DF89ED150041C4CBC7CB9A9CAA90856=4055E183FFA96263B32827A7F84797DE
DC22A860405A8BF2F2C095E5B6529F12=4055E183FFA96263B32827A7F84797DE
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,24 @@
#include "stm32g4xx_ll_gpio.h"
#include "testClass.hpp"
#include "testClass2.hpp"
#include <cmath>

TestClass test;
TemplateTest<uint32_t, bool> templateTest;
volatile float sinTest = 0.0f;
volatile float cosTest = 0.0f;
volatile float LissajousX = 0.0f;
volatile float LissajousY1 = 0.0f;
volatile float LissajousY2 = 0.0f;
volatile float LissajousY3 = 0.0f;

volatile float roseX = 0.0f;
volatile float roseY = 0.0f;

volatile float smallRoseX = 0.0f;
volatile float smallRoseY = 0.0f;

volatile float petalsNumber = 8.0f;

void maincpp()
{
Expand All @@ -35,7 +48,17 @@ void maincpp()
{
sinTest = test.getSin(x);
cosTest = test.getCos(x);
x += 0.001f;
LissajousX = test.getLissajousX(x);
LissajousY1 = test.getLissajousY1(x);
LissajousY2 = test.getLissajousY2(x);
LissajousY3 = test.getLissajousY3(x);

float r = cosf(petalsNumber / 2.0f * x);
roseX = r * cosf(x);
roseY = r * sinf(x);
smallRoseY = 0.4f * r * sinf(x);

x += 0.01f;

if (x > 6.28f)
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,29 @@ float TestClass::getCos(float x)
return cosf(x);
}

float TestClass::getLissajousX(float x)
{
return sinf(x);
}

float TestClass::getLissajousY1(float x)
{
return sinf(4.0f * x);
}

float TestClass::getLissajousY2(float x)
{
return sinf(7.0f * x);
}

float TestClass::getLissajousY3(float x)
{
return sinf(15.0f * x);
}

void TestClass::spin()
{
x += 0.0001f;
x += 0.02f;

if(x > 2.0f*M_PI)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class TestClass

float getSin(float x);
float getCos(float x);
float getLissajousX(float x);
float getLissajousY1(float x);
float getLissajousY2(float x);
float getLissajousY3(float x);
void spin();

struct __attribute__((packed, aligned(1))) StructA
Expand All @@ -34,7 +38,7 @@ class TestClass

private:
volatile float triangle = 0.0f;
volatile float triangleFrequency = 1.0f;
volatile float triangleFrequency = 0.01f;
volatile float a,b,c;
volatile float x, dir = 1.0f;
volatile int8_t tri = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand All @@ -21,6 +21,7 @@

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Private typedef -----------------------------------------------------------*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ Reset_Handler:
ldr r0, =_estack
mov sp, r0 /* set stack pointer */

/* Call the clock system initialization function.*/
bl SystemInit

/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
Expand Down Expand Up @@ -93,8 +96,6 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
Expand Down Expand Up @@ -127,7 +128,6 @@ Infinite_Loop:
******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
.size g_pfnVectors, .-g_pfnVectors


g_pfnVectors:
Expand Down Expand Up @@ -250,6 +250,8 @@ g_pfnVectors:
.word CORDIC_IRQHandler
.word FMAC_IRQHandler

.size g_pfnVectors, .-g_pfnVectors

/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
Expand Down
Loading

0 comments on commit 3650ed7

Please sign in to comment.