2018-04-23 04:09 AM
Hello all,
I am pretty new to the STM32 MCUs and I am trying to get around and learn new things. I have found a few tutorials presenting the SWV and it seems really good to be able to use it. However, even following the tutorials, I have no output in the SWV Console so I am asking for your help.
My setup:
NUCLEO-F767ZI
Matlab/Simulink 2017b with STM32 Adapter support package.
STM32CubeMX
TrueSTUDIO
My issue:
First: I have made a very simple project, generated with CubeMX only, where I enabled the 'Debug: Serial Wire' under SYS. I imported it in TrueSTUDIO and in main.c I wrote a line 'ITM_SendChar(65);' to send to ITM channel 0 the character 'A'. Everything build fine and I don't get any errors.
Next: I opened Debug Configurations in TrueSTUDIO and I enabled Serial Wire Viewer (SWV), and I set the Core CLock to 216.0 MHz. Default Port number: 61234. SWO Clock is automatically set to 2000 kHz.
Then: I start the debugger, and everything seems fine. I open the SWV configuration and select Port 0. I click 'Ok', I click on the 'Start Trace' button, and I run the program expecting to see 'A' in the SWV Port 0 console. But I have no output.
I ran the code line by line and it enters the ITM_SendChar function and it executes it fine. I also checkked the PB3 pin and the CN6 (Pin6 - SWO) pin with an oscilloscope and everytime the ITM_SendChar reaches the send line, I get the same signal on these 2 pins so my uinderstanding is that the code is executing the send, but it seems the SWV console does not receive it.
Any Ideas and/or suggestions on what to try next would be appreciated.
The SWO pin is connected via SB110 on the back of my nucleo board.
Thank you in advance for your time and help
#swd #debug #nucleo-f767zi #truestudio #swv2018-04-23 10:26 PM
Hello,
radu.ghiga
Could you please give me more information?
If you provide a little test case if possible or at least an simulink file.
Thanks.
2018-04-24 06:45 AM
Hello Aimagin Co., Ltd.
Thank you for your reply.
For now I have excluded the Simulink code generation in order to try and reduce the issue to a minimum. So I only use CubeMX to generate the TrueSTUDIO project with the initialization code. So the only extra line I add to the project, in the main.c, is 'ITM_SendChar(65);' Everything builds fine, and executes fine but I still don't see anything in the SWV Console.
I have also installed EWARM, and I generated a project for this IDE with CubeMX. I have added the same ITM_SendCHar(65); line in main.c and surprise! The Terminal I/O prints A every time the ITM_SendChar is executed. Therefore, now I know this can actually work. I just don't know why can't I use it with TrueSTUDIO.
Is it possible to upload files here? I could upload a .zip file with the .ioc and the generated project.
Thanks in advance!
2018-04-25 10:59 PM
Yes, you can upload files here.
2018-04-26 12:04 AM
I have attached the TrueSTUDIO project,and the .ioc configuration file. In main.c I have the 3 lines that I added, the rest is generated by STM32CubeMX.
The lines are:
Line 75: char data2send = 'A';
Line 107: ITM_SendChar(data2send);
Line 108: HAL_Delay(1000);
________________ Attachments : SWO.7z.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxfN&d=%2Fa%2F0X0000000b0j%2FjL4JhN7c4srPuHviBCOm3R0vkKg2rc9uUxLc6VM0Vpk&asPdf=false2018-05-06 01:20 PM
Hello,
I have the exact same problem as Radu Ghiga has. I followed all instruction sin the video tutorials, but nothing shows in the console. Did you find a solution?
Thanks in advance.
BR. Jan
2018-05-07 02:10 AM
Hello Jan Lundskov,
Unfortunately, I did not find a solution yet, and I have tried everything I could find online. What I did to monitor variables in real time was to install STM Studio load the .elf file which also has the symbols definition, and find in the list the variable I wanted to see and send it to one of the plots. Although this is better than nothing, I would still like to be able to see what is going on while I am in the debug mode in TrueStudio for STM32.
If I manage to get it working, I will post here.
Thanks,
Radu
2018-05-07 02:36 AM
Hello Radu,
Thank you for your reply and for introducing me to STM Studio. It looks like a nice tool. I will try that.
Have you tried the Dynamic printf feature to monitor a variable? I can get it to work, but the SWV would be a good feature to have while debugging.
Let me know if you find a solution:-)
Regards,
Jan
Den 7. maj 2018 kl. 09.12 skrev Radu Ghiga <st-microelectronics@jiveon.com<mailto:st-microelectronics@jiveon.com>>:
STMicroelectronics Community <https://community.st.com/?et=watches.email.thread>
Re: NUCLEO-F767ZIand Serial Wire Viewer
reply from Radu Ghiga<https://community.st.com/0D70X000006SwXXSA0
2018-05-10 02:33 AM
Is the serial wire viewer now available in the TrueSTUDIO none pro version?
2018-05-10 05:31 AM
Hello g.lewis,
As far as I understood, TrueSTUDIO for STM32 comes with all the Pro version tools. Since I am using an STM32 this is the one I downloaded and I am currently using.
Cheers,
Radu