Forum Replies Created
-
AuthorPosts
-
codex653Participant
Got it. I ended up needing to do a repair/upgrade on VS, but now communication between VisualGDB and my Nucleo board is back up to speed. Unfortunately, I went to go test the Real-Time Watch window with the basic blinking LED program and still did not see any output. I have dynamic analysis set up and it is instructed to instrument all functions. I asked it to watch for when HAL_GPIO_WritePin gets called, but only get a blank screen, even after the function has been called multiple times already.
Attachments:
You must be logged in to view attached files.codex653ParticipantOh, and it definitely does affect other programs, mainly Visual Studio 2017. It keeps crashing. However this is only localized to my desktop. The exact same code and VS2017 setup works perfectly fine on my laptop.
codex653ParticipantBy temporary directory do you mean my folder under C:\LocalTempProjects\embeddedUKFTesting\embeddedUKFTesting\VisualGDB\Debug\??? Or do you mean the Windows temp under C:\Windows\Temp, or maybe the VisualGDB temp folder in C:\Users\<myusername>\AppData\Local\VisualGDB?? I don’t want to accidentally delete the wrong thing.
codex653ParticipantThe logging worked this time. I’ve attached the output of the console.
Attachments:
You must be logged in to view attached files.codex653ParticipantI have reinstalled using the given file, yet no error message was displayed after the project properties window crashed.
codex653ParticipantThat does not appear to be the problem. I re-applied the license, got a “thank you for purchasing VisualGDB” message, restarted my computer, and still had the same issue.
On another note, I noticed while digging through the ProfileDriver_STM32_HAL.cpp file that the default Timer was set to 2. Coincidentally, that is the same timer I use in some of the code that I am trying to profile. Once I get this crash issue resolved I am going to switch the default Timer instance and see if that fixes it.
- This reply was modified 6 years, 12 months ago by codex653.
codex653ParticipantI went to go try out the LEDBlink project and found that I could not check the box for “Allow tracing function calls in Real-Time Watch” under the dynamic analysis page. When I click it, the box turns slightly grey for a moment and then the entire VisualGDB project properties window crashes without applying anything. The same thing happens when attempting to click any of the other tick boxes in that window as well.
I also opened up my slow project I originally mentioned and found that the Real-Time Watch functionality had been disabled (not by me) between when I posted the original question and now. I tried to re-enable it, but discovered that the project properties window crashed.
I tried reinstalling VisualGDB, but that did no good. What’s going on?
codex653ParticipantGood to know! I’ll try that out.
codex653ParticipantFor anyone coming across this later, I’ve ended up using what I think might be a better option for viewing the full matrix in a manner similar to Matlab. I wrote a quick ‘n dirty function that prints out the contents of a generic Eigen matrix to the VisualGDB provided ARM Semihosting Console. It actually works pretty well! I’d like to still get the .natvis file working, but this is ok for now.
template <typename T> void prettyPrint(T matrix, std::string name) { size_t num_rows = matrix.rows(); size_t num_cols = matrix.cols(); //Matrix header name printf(name.data()); printf("Size: [%d,%d]\n", num_rows, num_cols); //Create column labels printf("\t"); for (size_t col = 0; col < num_cols; col++) printf("[%d]\t", col); printf("\n\n"); //Create row data double data = 0.0; for (size_t row = 0; row < num_rows; row++) { printf("[%d]\t", row); for (size_t col = 0; col < num_cols; col++) { data = matrix(row, col); printf("%.2f\t", data); } printf("\n\n\n"); } }
codex653ParticipantI have done this, but I still only see the first value in memory. I’ve experiment with the .natvis file a bit and it seems that the XML structure is unable to discern what value is associated with the wildcard character “*” in the DisplayString block. For example, if I have a dynamic [3×3] matrix, the value in the debugger window will read “[ERROR, ERROR] (fixed matrix)”. For whatever reason, the wildcard * is not read into $T2 and $T3, and the matrix is not identified as dynamic. An example of the XML section that gets triggered is shown below:
<!-- Fixed x Fixed Matrix --> <Type Name="Eigen::Matrix<*,*,*,*,*,*>"> <DisplayString>[{$T2},{$T3}] (fixed matrix)</DisplayString> <Expand> <ArrayItems Condition="Flags%2"> <!-- row major layout --> <Rank>2</Rank> <Size>$i==0 ? $T2 : $T3</Size> <ValuePointer>m_storage.m_data.array</ValuePointer> </ArrayItems> <ArrayItems Condition="!(Flags%2)"> <!-- column major layout --> <Direction>Backward</Direction> <Rank>2</Rank> <Size>$i==0 ? $T2 : $T3</Size> <ValuePointer>m_storage.m_data.array</ValuePointer> </ArrayItems> </Expand> </Type>
- This reply was modified 7 years ago by codex653.
codex653ParticipantManually adding it worked. In the past when I’ve tried to manually add the variable it did not work, so I’m a tad perplexed. Oh well. It works now and that’s all that matters!
codex653ParticipantIt’s just a local variable inside of my primary .cpp file that has the main(void) function. This variable, shown below as “flag”, is only accessed by the main function and a callback function from TIM2_IRQHandler().
/*****************UartTesting.cpp************************/
#include <stm32f7xx_hal.h>
#include “core.h”
#include “definitions.h”
#include “gpio.h”
#include “uart.h”
#include “event.h”/****************
*Some setup code went here
****************/
//Variable I am trying to watch live
volatile bool flag = false;int main(void)
{
HAL_Init();
SystemClockConfig();/****************
*Place holder for non-important code here…
****************/
for (;;)
{
if (flag)
//Do a thing
}
}void testCallback()
{
testPin.toggle();
ledPin_Blue.toggle();
flag = true;
}void TIM2_IRQHandler()
{
uint32_t isrflags = READ_REG(TIM2->SR);
isrflags &= ~(1 << 1u);testCallback();
WRITE_REG(TIM2->SR, isrflags);
HAL_NVIC_DisableIRQ(TIM2_IRQn);
} -
AuthorPosts