STM CUBE IDE Tracing Is Not Supported - Page 1
Forum section: electronics / general

author: imk
author_rank: Regular Contributor
timestamp: March 14, 2021, 06:17:40 pm
content: Hello,Anyone seen the message "Tracing Is Not Supported" in the STM32CUBEIDE v1.6, i have searched and search and can't fine any reference of what it means or how to fix it.It pops up when I start the debugger, See attached photoMany thanks in advance imk

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 14, 2021, 09:49:01 pm
content: I had the same issue some time ago:- Debug / Debug configurations/ Select your debugging profile / Debugger tab / Enable Serial Wire Viewer (SWV).- CubeMX / System Core / SYS, set debug mode to Trace Asynchronous Sw.- Tracing doesn't work through SWDIO, you must also connect the ST-Link SWO pin to the STM32.

author: imk
author_rank: Regular Contributor
timestamp: March 14, 2021, 10:19:20 pm
content: Hello David Alfa and many thanks for the reply.I have tried both your suggestions, in the past and now set them again but problems is still the same.Interestingly though I have scope on pin PB3 SWO and can see (i think must be debug) output from the STM32 MCU.So I think it must be this new STM32CubeIDE ver 1.6 which is only three weeks old or this new STLINKV3MINI i have.As I have watched many videos and read n read and unable to get SWV to work. Although Live Expressions works perfectly :-)BTW What version of Cube and STLINK are you using please?Many thanks imk

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 14, 2021, 10:27:19 pm
content: I'm using v1.5.1.I didn't update yet because I still feel the pain from the last update. It was precisely to 1.5.1... it caused havoc.It deleted files in closed projects, Cubemx screen was distorted and unusable, and installing eGit was like an angry elephant against a paper home.I had to erase everything, every STM32 thing in my system, and itwasn't enough, also had to erase java and reinstall everything.Since then, it works. And you know what they say, "If it works, don't touch it".I know that some ST-LINK clones are defective. Pins not correctly routed, or directly not connected to the MCU.Mine was badly soldered, half of the pins were floating.Ensure that SWO is connected to PA10, as in the picture:

author: imk
author_rank: Regular Contributor
timestamp: March 14, 2021, 10:48:27 pm
content: Hello David,My story is that i just moved (Seven Days Ago) to ST from PIC Dsp as felt it right time to learn ARM and there are lots of mini development board out there.I am currently testing with a WeAct v3.0 stm32f411 which has what looks like genuine STM32 chip on it and there web site states they only us genuine :-)My chips uses PB3 for SWO and i can see output on it, see attached photo, hence i think it is either the new V3 genuine STLINK or 1.6.Tomorrow I think i'll purge this Cube 1.6 and try 1.51 or try one of the STM32 NUCLEO boards i have.But my guts tell me it is lack of regression testing from 1.51 to 1.6 :-(If you think of anything else, please add more.photo of PB3 SWO outputIan

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 14, 2021, 11:34:45 pm
content: Yep I also have that board, it's very nice. Did the same last year, I always worked with PIC, but I felt I was missing the STM32 thing.They're very powerful for their price, compared to a PIC24, dspic33 or even a PIC32... but messy to handle.Also: Remember to set the correct CPU frequency in the Debugger SWV settings, otherwise it won't work.Are you sure the stlink v3 is genuine?I quickly made a SWO test project for the 411 board. It just sends a string every 500mS. It's attached, download it if you want. Ignore my nude pics.Open Window / Show view / SWV / SWV ITM Data console.Start the debug session, but set a breakpoint at the main.Go to the ITM Data console, open settings and enable ITM stimulus port 0. Close and click on the red circle button.Sadly, everytime you start a debug session, you need to pause, enable the SWO (The red button) and resume.Now resume the cpu, and you should see the print messages. STM32 IDE has a slow response, the messages appear in pairs, although the STM32 sends it correctly every 500mS.

author: imk
author_rank: Regular Contributor
timestamp: March 15, 2021, 12:10:36 am
content: Hello David,I just replied with ZIP of my project but EEVBLOG did a thread refresh and my message seems to have diapered, think was too big.All what you have done i have done and my app core iswhile(1){HAL_GPIO_TogglePin( LED_C13_GPIO_Port, LED_C13_Pin );printf("HHH\n");HAL_Delay(100);LEDPinState = HAL_GPIO_ReadPin( LED_C13_GPIO_Port, LED_C13_Pin );TestVar = LEDPinState;}I have zero output from the console, but both LEDPinState and TestVar show toggling in Live Expression.Yes the STLINKV3 I have is from RS and i think genuine as in little ST box and it is tiny.I 3D printed it a little box for it which is about 1" cube.It late in UK and i have brain fade so hitting the hay, more ideas most welcome.I still think it is v1.6 as it shows this "Trace is not supported" message.Tomorrow I'll post some photos of my config, stay safe, good night Ian

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 15, 2021, 12:21:22 am
content: No worries! Must be some stupid thing missing out.Delete Release and Debug folders before exporting the project, otherwise it will take a lot of space. Tested now - 500KB vs 4.8MB!I think the file limit was 4MB.

author: imk
author_rank: Regular Contributor
timestamp: March 15, 2021, 09:20:03 am
content: Morning David,Please find the attached project folder, i have deleted files from the debug folder but had not yet created a Release project hence no Release folder.Chat later and many many thanks for your help.BTW my project path is D:\NewDev\STM32Cube\STM32F411CE_BLACK_PILL_V1Not sure if that matter as don't know if paths are relative or absoluteIan

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 15, 2021, 10:15:30 am
content: Morningwill test it in a moment.I did a backup of everything and updated to STM32 IDE to v1.6.0, SWO is working fine in my project.Paths are usually relative to project root folder.Edit: Your project doesn't work. Even by copying the main.c code from my project.Not the root of the problem, but you have assigned "PA0_SwitchInput" to PC14 (BlackPill user button is PA0).Edit2:Your debug profile had the port 61234. Mine had 61235.Setting the same port in your project made it work.

author: imk
author_rank: Regular Contributor
timestamp: March 15, 2021, 11:08:07 am
content: David,Mmmmm most interest re the switch, the switch used to work as you can see I have few bits of code that have been #ifdef'ed out.As i mentioned i have moved from PIC to this IDE only week or so ago and still finding my way about so trying things, proving them and moving on.Now as i mentioned the switch used to work, I have NEVER edited file main.h. only main.c and used used the project tools to configure the .IOCBut in my countless desperate attempts to get this trace working I have regenerated many many many times and wondering if these regeneration have screwed up the project.So given the issues you had moving to 1.5.1 originally i wonder if there are bugs in 1.6 that after MANY regenerations the project gets messed up.I think i will build a new simple project that just toggles GPIO pin C13 LED pin on the Black Pill and set the SWO configuration correctly first time.I just noticed in .IOC pin configuration PA0 was incorrect, maybe i did this or maybe multiple regeneration have messed it up.Also in SYS MODE and Configuration I see a Configuration window message saying "Warning: This peripheral has no parameters to be configuredSo i wonder if you could give me a list of .IOC thing to set up please egSYS Mode Debug type, Timebase Sourse etcMany thanks ian

author: imk
author_rank: Regular Contributor
timestamp: March 15, 2021, 01:03:09 pm
content: David,Change port to 61235 and it works here to, many many thanks! :-)However below is the debug session startup output, notice is has port requests for both 61234 and 61235 in it.Again many many thanks IanPS i am going to mention this to ST SupportSTMicroelectronics ST-LINK GDB server. Version 5.8.0Copyright (c) 2020, STMicroelectronics. All rights reserved.Starting server with the following options:Persistent Mode : DisabledLogFile Name : D:\NewDev\STM32Cube\STM32F411CE_BLACK_PILL_V1\Debug\st-link_gdbserver_log.txtLogging Level : 31Listen Port Number : 61235Status Refresh Delay : 15sVerbose Mode : EnabledSWD Debug : EnabledTarget connection mode: AttachReading ROM table for AP 0 @0xe00fffd0Hardware watchpoint supported by the targetCOM frequency = 24000 kHzST-LINK Firmware version : V3J7M3Device ID: 0x431PC: 0x75f9e0ST-LINK device status: RUN_MODEST-LINK detects target voltage = 3.25 VST-LINK device status: RUN_MODEST-LINK device initialization OKWaiting for debugger connection...Waiting for connection on port 61235...Waiting for connection on port 61234...Accepted connection on port 61235...Debugger connectedTry halt...ST-LINK device status: HALT_MODEEnter STM32_AppReset() functionNVIC_DFSR_REG = 0x00000008NVIC_CFGFSR_REG = 0x00000000Accepted connection on port 61234...------ Switching to STM32CubeProgrammer ------------------------------------------------------------------------STM32CubeProgrammer v2.7.0-RC1-------------------------------------------------------------------Log output file: C:\Users\Me\AppData\Local\Temp\STM32CubeProgrammer_a20436.logST-LINK SN : 003F002B5553500720393256ST-LINK FW : V3J7M3Board : STLINK-V3MINIVoltage : 3.32VSWD freq : 24000 KHzConnect mode: Under ResetReset mode : Hardware resetDevice ID : 0x431Revision ID : Rev ADevice name : STM32F411xC/EFlash size : 512 KBytesDevice type : MCUDevice CPU : Cortex-M4Memory Programming ...Opening and parsing file: ST-LINK_GDB_server_a20436.srecFile : ST-LINK_GDB_server_a20436.srecSize : 9040 BytesAddress : 0x08000000Erasing memory corresponding to segment 0:Erasing internal memory sector 0Download in Progress:�������������������������������������������������� 0%�������������������������������������������������� 100%File download completeTime elapsed during download operation: 00:00:00.305Verifying ...Read progress:�������������������������������������������������� 50%����������� 22%����� 33%������ 45%������ 56%����� 67%������ 79%������ 90%����� 100%Download verified successfully------ Switching context -----Target connection mode: DefaultReading ROM table for AP 0 @0xe00fffd0Hardware watchpoint supported by the targetCOM frequency = 24000 kHzST-LINK Firmware version : V3J7M3Device ID: 0x431PC: 0x8000968ST-LINK detects target voltage = 3.32 VST-LINK device status: HALT_MODEST-LINK device initialization OKSWV_SetStatus(true): stop_reply_pending == 0handle_vCont_c, continue threadSWV_SetStatus(false): stop_reply_pending == 1TraceCaptureStart and SWV event set to APP_FALSE (0)NVIC_DFSR_REG = 0x0000000A

author: imk
author_rank: Regular Contributor
timestamp: March 15, 2021, 01:20:11 pm
content: Hello David,After bit of testing, in Debug ConfigConnect to remote GDB server port 61235SWV Port 61234Works!Setting them to the same port, which was i think the default does not workIan

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 15, 2021, 01:25:03 pm
content: I think it's just logging too much data.I you check the debugger settings, port 61234 is used for remote GDB server, so another computer could connect to it, I guess.My output:QuoteChanging the remote port to 12345 does nothing, it works ok:QuoteJust remove the "Log to file" option unless you really need it.

author: imk
author_rank: Regular Contributor
timestamp: March 15, 2021, 08:04:32 pm
content: Hello DavidFirstly i can't thanks you enough for all the help you have been getting this tracing function working.It was a significant annoyance and source of much frustration not being able to get it going and you have helped enormously.------------------------ I owe you big time -------------------------Now i have some idea of what to expect from tracing I have been having a little play with various setting and discovered something interesting.In my project i had in SYS Mode and Config -> Debug->Trace Async SW and Timebase ->SysTick configuredAnd added a little count up/down function with variables Cnt and UpDown to see how it plotted in trace, see below:When i ran it something very strange happened inasmuch as the UpDown variable didn't change in the trace graph, but did change in Expression view.So I changed the value of the HAL_Delay 50, 100, 250 and 500ms and some setting the UpDown variable would Trace and other values it wouldn't TraceAlthough the value of Cnt was always displayed in Trace as expected.So i changed SYS Mode and Config -> Debug->Disable and now no matter what value i put in HAL_DelayBoth Cnt and UpDown both Trace perfectly..... Me thinks there are many mysteries to Tracing is this IDEAgain many thanks for the help IanHAL_Delay(50);LEDPinState = HAL_GPIO_ReadPin( GPIOC , GPIO_PIN_13 );TestVar = LEDPinState;if( LEDPinState == GPIO_PIN_SET )HAL_GPIO_WritePin( GPIOC , GPIO_PIN_13 , GPIO_PIN_RESET );elseHAL_GPIO_WritePin( GPIOC , GPIO_PIN_13 , GPIO_PIN_SET );if( Cnt > 10 )UpDown = 0;else if( Cnt < -10 )UpDown = 1;if( UpDown == 1 )Cnt++;elseCnt--;

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 15, 2021, 08:49:25 pm
content: I know stm32 is not easy at firstWill check it in a while.Before mixing everything up like you're doing, try each part at once.Are you still printing to the swo console? Maybe you're outputting too much data?The last time you didn't had a delay in the printf line, that would definitely saturate the available bandwidth.I usually only use expressions and swo console, don't have a lot of experience in the rest of swv.

author: imk
author_rank: Regular Contributor
timestamp: March 16, 2021, 10:28:34 am
content: Good morning David,Your are of course right about making small steps to get were i am going and was taking it ease.Testing HAL_gpio function by function and getting along fine as i have 40 years of C behind me.But then searching the documentation and tutorial videos I found a video on the Trace function having been using Live Expressions successfully.So off i go on this journey to get Trace working having not realizing I needed the extra SWO wire from the micro to the STLINK.This as i am sure you can image led to many many project reconfigurations and regeneration tweaking this and that trying to get trace to work.Then i found this threadhttps://electronics.stackexchange.com/questions/445815/stm32-swd-printf-not-workingre SWO wire.But by then it was too late as my project was totally messed up.in hindsight I should have tested with one of the NUCLEO boards i have as they have built in debugger.All that said i am still testing graphical trace and found last night that in my project it doesn't work in single step mode but seems to like running with 100ms delays.I have more testing to do but heading of to my woodwork shop today to assemble the speaker cabinets i have been making.Bit of luck if all goes well I might even get the drives in them today and give them a try.BTW what are are you using the STM32 for?Again many thanks for you help Ian

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 16, 2021, 11:25:50 am
content: Yeah, I know that feeling, when nothign works and you have no clue what to blame. In the end it was the simplest thing, but you already changed everything else haha.In my case, it's just hobbie. I always liked MCUs. Last time I worked with MCUs was 10 years ago. My current job is a lot more boring, no development, just testing and repairing.I don't have currently any active project. I'm maintaining the T12 soldering fw and little else.Now I'm just trying different things, to keep learning, but without any target.Few months ago I did a few little things for my car:- A bluetooth interface bridge. This is a 2003 radio all-in-one system (radio, phone, clima, navi) that can't be replaced. It has CD changer, but also tape!.I removed the tape mechanism and used the stm32 to emulate sensors / positions, and connected the bluetooth audio to the tape circuit.When I use the factory controls, the stm32 recognize the changes and sends commands to the bluetooth control.Much better since I no longer have to use the phone to skip songs. It really makes me nervous, I d'd prefer not getting fined, neither running over someone.- Later, this was somethign I wanted since a long timer ago. To emulate the CD changer. there are commercial products in the 100-quid range.I was sure I could do something a lot cheaper, and open source. It uses the Sony Unilink protocol (Actually, a Becker version, and old protocol (before CAN appeared) with very scarce documentation.It was a lot of fun and challenging, because most sites were gone. Spent hours using archive.org site, looking for sites that had disappeared between 1999-2003.I got it working after a lot of hours debugging with the logic analyzer. Then I connected a USB to the stm32, made folder scanning and automatic CD listing generation for the stereo.But it came the moment to setup a software MP3 decoder (100MHz stm32 is more than capable). My plan was to use a I2S DAC.It was getting hard, and as I didn't really want to use it, (I'm used to using Spotify+BT now), in the end I ditched it.Uploaded the code to github anyways, as it was 90% done. Maybe someone can further develop it.

author: imk
author_rank: Regular Contributor
timestamp: March 18, 2021, 10:34:48 pm
content: Hello David,Really sorry for delayed reply but been busy woodworking making pair of speaker cabinets and by time i get in the house cold/tired, bath then sorted dinner i am knackered.Sorry to hear your present occupation is not capturing your attention but my job/career has gone thru similar phases.Then something exciting is offered and off i'd go, i hope something interesting finds you soon.That said it sounds like you are finding some interesting projects to do in your spare time which is more than i am managing for past year.I am retired now and moved house about a year ago because arthritis is setting in, so big house had to go and have moved into single story house.Hence, past year has been just about trying to get a gallon into a pint pot, basically I have loads of IT/Electronic stuff to store hence been converting loft etc.Building my man cave/office and converting garage into workshop which is about half done at this time.What i am aiming to do is build a stud wall in the garage so can have wood/metal (all the dusty dirty jobs) in two thirds.Then in the remaining third I'll have a 3d printers, desk for PC fixing and soldering etc.When all the building/conversion work is completed i am going to make something i have wanted todo for a lifetime but never had the time/tools/space.ERIN (Electronic Robot with Integrated Navigation) basically ERIN is going to be an autonomous mapping Robot.That i can charge up and leave to wander about the place making a map its home.I figure it is going to be about a years works designing, building and writing the software for the multiple micros solution i am planning to use, hence the WeAct boards.About five years ago our local (Potteries) HackSpace had a line following robot competition, which i won by default as no one else bothered which was a bit of a disappointment really.All the below are based on the same motor, gearbox, wheels and power source but they really show which design works best.This one was the first which was a real HACK built on breadboards that i used to test different designs for chassis, Nose Sliders Always Win :-)https://youtu.be/f-CwNg24PfoThis one just uses CMOS logic and has TWO bits of memory, (Yes Two Bits) just enough to remember how the line changedhttps://youtu.be/SY2Kz1dJ7KgThis one uses a PIC Dsp and as you can see if much faster as is basically smarter at reacquiring the lineDo keep in touch and thanks again for sorting the Cube Tracing, i know it will be a great help when ERIN turns her wheels for the first time.Ian

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 19, 2021, 03:22:41 am
content: Hehe the famous line-following robot with two IR sensors, and few gates!I remember it too, 15 years ago... it was a very famous project since the 90s, they sold cheap DIY kits in electronics magazines.When I was studying electronics, I liked digital stuff a lot. I had designed something similar, if I remember correctly it had near 40 logic chips, counters, flipflops, gates...It was just a fancy measuring tape, the thing had stepper motors, so you put it on the floor, push a button and it went straight until finding an obstacle, then it stored the value and go back the starting point, stop, and only then, turn on some 7-segment displays showing the distance.The teacher scratched his head when I showed the A3 sheets... holy shi*t David, that was your weekend about?And that's when he told me about the MCUs. Ohhh something you can program somehow? Doing the same or more than hundreds of logic gates? What's that? I'm interested!So I never made the robot, the schematics are stored somewhere... nice memories.And I started my road with the mighty PIC16F84, learned assembler, later jumped into PIC16, PIC18...By then I realised that assembly was a huge PITA when you wanted to do huge projects. And started my first steps in C.5 years later I was hired in a small electronics engineering company. It was a lot of fun and a lot of pain, but overall I enjoyed the everyday challenge.Then the economic world crysis finally got so bad that I lost the job. Since then I only found between "meh", and terrible jobs.The actual is more like a "meh" type. Not good, not bad. I've been worse hehe.

author: peter-h
author_rank: Super Contributor
timestamp: April 21, 2021, 01:44:32 pm
content: I have been chasing round some of these issues with ST LINK V3. It was bought from Mouser so should not be a fake one...Does anyone know where to set the GDB server logging level? With the V2 it was 31 but with V3 it got set to 1 but only on one of two PCs I am testingPresumably there is a script somewhere where these command lines are stored.