Using Printf Debugging, LIVE expressions and SWV Trace in CubeIDE || STM32 || ITM || SWV

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2019
  • Purchase the Products shown in this video from :: controllerstech.store
    ________________________________________________________________________________________
    Printf debugging and SWV trace might not work for some microcontrollers. For example it does not work with F103, if you are using cloned st-link. Although Live Expressions will work for everyone.
    The write function is in the pinned comment.
    ________________________________________________________________________________________
    ****** SUPPORT US BY DONATING*****
    paypal.me/controllertech
    ******Join the Membership******
    / @controllerstech
    Join the Discord Server / discord
    Join the Telegram Group t.me/controllerstechdiscuss
    Follow me on Instagram / controllerstech
    For more info, visit www.controllerstech.com
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 151

  • @ControllersTech
    @ControllersTech  4 ปีที่แล้ว +33

    the write function is as mentioned below:
    int _write(int file, char *ptr, int len)
    {
    /* Implement your write code here, this is used by puts and printf for example */
    int i=0;
    for(i=0 ; i

    • @asaf6391
      @asaf6391 2 ปีที่แล้ว

      Is it possible to use this function to write to a text file as well in some way? If you can help me with that I will be glad.

  • @iforce2d
    @iforce2d 3 ปีที่แล้ว +18

    Thanks, very helpful!
    Small addition: if you don't have a newline at the end of what you're printf-ing, nothing will show up until a very large buffer has been filled, then you get it all at once, on a single line. At least that's my experience.

    • @AryanSingh-by7ee
      @AryanSingh-by7ee 6 หลายเดือนก่อน

      Worked! was facing the same issue thanks!

  • @faithhl7421
    @faithhl7421 ปีที่แล้ว

    I have been binge watching your STM32 videos. They are well thought through and thorough. Thank you, Arun.

  • @chrisrogers5415
    @chrisrogers5415 4 ปีที่แล้ว +5

    Brilliant! Slow and careful explanation - unlike 99% of other tech channels!

  • @xiaoyi982
    @xiaoyi982 3 ปีที่แล้ว +5

    I've been helped. This is a great tutorial! Keep up the good work.

  • @CircuitandoEL
    @CircuitandoEL 2 ปีที่แล้ว

    Hey! Thanks for your support! It help me a lot!

  • @Youngduck93
    @Youngduck93 3 ปีที่แล้ว +1

    Works like a charm! Thanks!

  • @estebanvidal721
    @estebanvidal721 4 ปีที่แล้ว

    I didnt see your video and im already loving you

  • @gaelvangheluwe2923
    @gaelvangheluwe2923 3 ปีที่แล้ว

    thanks for the extremely good content quality !
    What's your OS desktop environment ? it's smooth

  • @harrymagooslum5770
    @harrymagooslum5770 4 ปีที่แล้ว +4

    Your videos are fabulous and quite empowering! I have two questions:
    How can I contribute some money to help fund more of the same?
    And if that is a computer voice on the video, can you share what technology is being used? I'd love to know.
    This virtual world is without borders and everyone benefits from the sharing of knowledge. Thank you SO MUCH, once again!

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      1. To contribute, just go to the website ( link is in the description) and at the end of every post, there is a donation link.
      2. Yes. I use Amazon polly for the voice over.

  • @eduardodelarosaferrer2205
    @eduardodelarosaferrer2205 4 ปีที่แล้ว +1

    Simply perfect !!

  • @prajaktagavandi6058
    @prajaktagavandi6058 3 ปีที่แล้ว

    Thanku for this video may god bless you

  • @relcominc.9647
    @relcominc.9647 4 ปีที่แล้ว +1

    IT WORKS! THANK YOU!

  • @SalarAzad
    @SalarAzad 4 ปีที่แล้ว +1

    sooo helpful, thank you!!!

  • @stm32user
    @stm32user 4 ปีที่แล้ว

    hi, thank you so much, Now I am new to this cubeide

  • @dimaabualfoul9281
    @dimaabualfoul9281 8 หลายเดือนก่อน

    it works thanks

  • @BilginistAdam
    @BilginistAdam 4 ปีที่แล้ว +1

    so helpful, thank you bro.

  • @antoinenauzet1568
    @antoinenauzet1568 2 ปีที่แล้ว

    Hello,
    Thank you for this tutorial! Really usfull. Two questions
    - The printf are working even when I do not activate any comparator. Is it normal?
    - When activating the comparator 1 (with address 0x0), it display a "data" 0x0 in the SWV Data trace Timeline Graph. Is it still the comparator 1 that should activate printf?

  • @deniverreinkeschiitz5497
    @deniverreinkeschiitz5497 3 ปีที่แล้ว

    Hi, thank you for the video. Works great, however, only in .c files. Is there a way to work in cpp files?

  • @bennguyen1313
    @bennguyen1313 4 ปีที่แล้ว

    I'm using STM32CubeIDE version 1.2.1 on a Nucleo board (STM32H743 has an stlinkv3 v3.J6.m2), but I can't find where to set HCLK. I've enabled SWV in the debugger config and set the clock there, but not in the project. My HAL_Delay (1000) is *way* longer than a second so the default is probably wrong.
    Also, I've included stdio.h however, I don't see the "Hello World" in any of the window views (Console, Debugger Console, SWV Data Trace Timeline Graph, SWV ITM Data Console). In the SWV view properties, I've enabled Comparators 0 and *1* (although that don't seem to be necessary), and checked the ITM Stimulus Port bit 0, and the red 'Start Trace' record button is set. Could the HCLK setting also be causing the ITM_SendChar to fail? I assume the ST-Link's usb connector, when not programming, just passes the SWV data to/from the cpu?
    UPDATE: Pressing the Blue MX button on the right doesn't seem to do anything, but double clicking the .ioc file did! After checking the clock speed shown in the Clock Configuration (64Mhz) and applying it to the SWV Debugger Clock speed it worked! Would be nice for ITM record to start automatically, but what exactly does enabling the stimulus bit 0 do?

  • @noweare1
    @noweare1 4 ปีที่แล้ว

    Thank you for this. What is the serial comm program are you using it looks like it is integrated with eclipse.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      it's the serial console and by default integrated with the IDE.

  • @smitpatel1315
    @smitpatel1315 ปีที่แล้ว

    Hello , Guys..
    This person has shown a true configuration for using printf() function. If you facing issue in printing context using printf() , then please try to use "/n" after the writing the context in printf() function.
    printf("hello world") -> Nothing will print on SWV ITM Data Console
    printf("hello world/n") -> Proper Output on serial console...

  • @tomioyamaguchi9996
    @tomioyamaguchi9996 2 ปีที่แล้ว +1

    why STM do not support printf() in STM32CubeIDE ?
    Seems me, this function is very useful and commonly provided almost IDE's. Is there any reason avoiding implement ?

  • @alexmayer8877
    @alexmayer8877 2 ปีที่แล้ว

    Thanks!
    Really helpful :)

  • @gunterotte
    @gunterotte 3 ปีที่แล้ว +2

    Thanks. For the STM32F429i-DISCO, you need to solder SB9 (to connect SWO-PB3 to the ST-LINK) to make it work.

    • @TheZeroomg
      @TheZeroomg 3 ปีที่แล้ว

      Could you elaborate which pin should i solder SB9 to?
      The datasheet shows that when SB9 is ON, SWO signal of connector CN2 is connected to PB3.

    • @gunterotte
      @gunterotte 3 ปีที่แล้ว

      @@TheZeroomg SB9 is a Solder Bridge. Just connect the bridge with solder.

  • @paulg.3067
    @paulg.3067 4 ปีที่แล้ว +3

    Your intro destroyed my apartment!

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +1

      haha.. I am working on changing it.

  • @domagojtomic1469
    @domagojtomic1469 3 ปีที่แล้ว

    Great video! What IDE theme are you using?

  • @eduardoblotta7914
    @eduardoblotta7914 3 ปีที่แล้ว

    Hi Controllers Tech, thanks for the clear explanation. I could made a debug session but only show debug data in step by step execution. Any idea? Thanks again.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      I don't understand what are u trying to ask..

  • @Pendududesign
    @Pendududesign 4 ปีที่แล้ว

    Thank you very much. The live expression works but the graph and the console doesn’t work with an official nucleo stm32L432kc. Do you have an idea where this problem comes from ? :)

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      It doesn't work for some microcontrollers, specially the L series.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      It doesn't work with f103c8 by default with the cloned st link. Though you can solder the swv pin to the st link. Google this, there are some solutions available.
      Or join that telegram group, some people in the group made it work

  • @sertackaantokyay5344
    @sertackaantokyay5344 3 ปีที่แล้ว

    I really big thank you to you

  • @NithinVarghese-zk4vt
    @NithinVarghese-zk4vt ปีที่แล้ว +1

    I TRIED THE SAME WRITE FUNCTION, BUT IT'S SHOWING UNDEFINED REFERENCE TO ITM_SendChar,,,,,,how to solve that?
    😞

  • @ucannguyen4291
    @ucannguyen4291 4 ปีที่แล้ว

    Hi AD, let make a video about stm32 vs AS608 fingerprint sensor. I see everyone use it throw arduino but i don't know how to use it with stm32. Thanks a lot!!!

  • @theraja011
    @theraja011 4 ปีที่แล้ว

    Dear sir, pls share any example code regarding gsm communication with stm 32 microcontroller..

  • @ahmedsiddique863
    @ahmedsiddique863 3 ปีที่แล้ว

    worked more or less with stm32f3discovery. one small problem though, in live expression
    "Target not available"
    was displayed in place of value for count variable.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Load it again... It's a common problem..
      I mean put the value in the watch again, whenever you see that error

  • @colinwong3982
    @colinwong3982 ปีที่แล้ว

    Hi. Is it possible to save the port values to a text file?

  • @SUPERGOOSE-LLC
    @SUPERGOOSE-LLC 4 ปีที่แล้ว +2

    Alternatively, you could overwrite __io_putchar(). _write() calls __io_putchar.

  • @ozgurkayabasi588
    @ozgurkayabasi588 4 ปีที่แล้ว

    Good jop! Thank you.

  • @axelschmidt5716
    @axelschmidt5716 3 ปีที่แล้ว

    Hello, it's a great series with many information. One question: does it work with tasks? Meaning some printf in tasks don't show at my board. Does anyone have a solution?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      It does work with tasks. If you look into my free rtos videos ( the first few), i have usee it in one of them...

  • @azza8540
    @azza8540 4 ปีที่แล้ว

    why my nucleo f302r8 is not working, it does not showing any printf output

  • @user-od6vj7jb7h
    @user-od6vj7jb7h 10 หลายเดือนก่อน

    It doesn't show anything for me either (stm32f429I-DISC1). I connected the PB3 pin of the microcontroller to the SWO pin of the debugger with a wire. It started displaying characters, but not the string "Hello world". I changed in Serial Wire Viewer, Core Clock (MHz) to 16.0, and it displayed the string "Hello world" 😃.

  • @nangelo0
    @nangelo0 4 ปีที่แล้ว +1

    WOW dark theme!

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +1

      Yeah. Love for darkness

    • @alexsh1046
      @alexsh1046 4 ปีที่แล้ว +1

      @@ControllersTech Where can I find this theme? :)

    • @NNHGroup
      @NNHGroup 4 ปีที่แล้ว

      @@ControllersTech Please guide me to specialize in dark theme.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +5

      Goto help -> eclipse marketplace -> popular, and install darkest dark theme.

    • @NNHGroup
      @NNHGroup 4 ปีที่แล้ว

      @@ControllersTech Thank you 3000!

  • @glewiss6696
    @glewiss6696 3 ปีที่แล้ว

    Hello, I tried to set up the printf debuging with the bluepill board and the st_link v2 chinese dongle but can't make it work. The variable "count" in the live expression and the led toggle work but I got nothing on the console editor...Any idea? Thanks

    • @glewiss6696
      @glewiss6696 3 ปีที่แล้ว

      I found it! This was due to the chinese st-link-v2 dongle that does not include TRACESWO pin !

  • @ACc-dd5bf
    @ACc-dd5bf 4 ปีที่แล้ว +1

    Is it possible to have the swv console always active? I hate clicking the record button every time.

  • @Lokanadya
    @Lokanadya 2 ปีที่แล้ว

    I'm using a STM32L151CB and a legit ST-Link/V2 Isol. (Own custom PCB)
    Strangely, when i click "start trace", the square around the circle lights up, then, when i press resume, the circle is greyed and unselected.
    No data shows up in either of the SWV tabs, but i have the live expressions working fine.

    • @CaliBeta
      @CaliBeta 2 ปีที่แล้ว

      I'm using a f103c8 and the same thing happens to me, I can't print anything on the console and the record button turns gray when I start debugging

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว +1

      It won't work if you are using cloned ST link. Read other comments, someone have shared a solution where you might have to solder a wire in the stlink.

    • @CaliBeta
      @CaliBeta 2 ปีที่แล้ว

      @@ControllersTech thanks 👊🏼👌🏼

  • @nielspaulin2647
    @nielspaulin2647 4 หลายเดือนก่อน

    Very helpful.

  • @amrmusa7217
    @amrmusa7217 10 หลายเดือนก่อน

    i have done the same procedure but neither the itm data trace nor the time line graph showed any thing

  • @ESEben10
    @ESEben10 2 ปีที่แล้ว

    Nice video. Although it doesn't work for me. Nothing is printed. I use an ST board as a debuguer for another board.

  • @julianh.7130
    @julianh.7130 3 ปีที่แล้ว +1

    Not working on Nucleo F303RE before setting Debug Mode to Trace Asynchronous Sw. After that it just works fine!

    • @chepel5663
      @chepel5663 3 ปีที่แล้ว

      Hi. Do you know why? I have the same board (NUCLEO-F303RE), and it not work the setting SWV.

    • @michaczajka3854
      @michaczajka3854 ปีที่แล้ว

      Im using STM32F411CEU6 and i cant set this, Debug Mode to Trace Asynchronous Sw becouse it has pink color and there is warning that says "This periherial has no parameters to be configured" can you help me with that? Of course entire printf thing doesn't work for me :/

  • @MclarenF1rocket
    @MclarenF1rocket 4 ปีที่แล้ว

    It works even if you don't enable SWD in CubeMX ? How would it know what debug protocol you are using?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +1

      Even I wondered the same. Maybe that's the default case. Anyway, i didn't dug deep into it as it was working and that's all we need 😏

  • @bdouram
    @bdouram 4 ปีที่แล้ว

    Exists one way to save the data log from SWV trace into a txt file?

    • @asaf6391
      @asaf6391 2 ปีที่แล้ว

      Were you able to generate such a log file?

  • @lukaspetrikas6320
    @lukaspetrikas6320 2 ปีที่แล้ว

    Hello. What if ITM is not available? I am programming stm32wb55 Nucleo board and I am trying to setup printf for debugging. This method does not seem to work due to the microcontroller not supporting ITM

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      Use uart.. it's faster..

    • @lukaspetrikas6320
      @lukaspetrikas6320 2 ปีที่แล้ว

      @@ControllersTech For UART, I need to use external terminal program which is not convenient. I want to be able to debug printf in the same IDE I am working with

  • @rameshwarnagargoje9319
    @rameshwarnagargoje9319 2 ปีที่แล้ว

    I am using STM32F407VG board, shows error while debugging i.e. " Error in final launch sequence:
    Failed to execute MI command:
    load "G:\\udemy\\embedded c\\my_workspace\\target\\001HelloWorld\\Debug\\001HelloWorld.elf"
    Error message from debugger back end:
    Error finishing flash operation "

  • @vinothkannan1570
    @vinothkannan1570 2 ปีที่แล้ว

    In STM32 HAL and LL , which one is best for creating big and complex projects ??

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว +1

      LL is better if you can handle it. HAL is easier way out, but it's too much bloated

    • @vinothkannan1570
      @vinothkannan1570 2 ปีที่แล้ว

      @@ControllersTech Can you make one video on SPI using LL library . i have tried but not working

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      Nope. That's not going to happen. I have already covered registers..

  • @robertcanberkozturk7725
    @robertcanberkozturk7725 2 ปีที่แล้ว

    based thanks

  • @paulg.3067
    @paulg.3067 4 ปีที่แล้ว +5

    I just want to mention that after 4 hours searching for the error, re-wiring my hardware twice, changing cables, rewriting projects... printf("...") was not printing anything in the DATA CONSOLE because I FORGOT the LINEBREAK ("
    ")!!! So printf("Hello stupid") prints nothing, printf("Hello stupid
    ") prints it correctly...

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Haha can't do anything about that. Problem with the software itself..

    • @mauricio533
      @mauricio533 3 ปีที่แล้ว +1

      You saved me a lot of time!

  • @electricalcoder3025
    @electricalcoder3025 3 ปีที่แล้ว

    but when i use any Hal_delay function in my int main while loop along with printf it doesnt print ot any thing on the console

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Check your clock configuration.. hal delay shouldn't be an issue unless your clock setup is wrong

    • @electricalcoder3025
      @electricalcoder3025 3 ปีที่แล้ว

      @@ControllersTech ​ i was using HSI which is of 16mhz as the system clock so i configured 16 mhz (default) itself in the debug configurations too.
      Moreover i tried creating a new project and same is the result
      when i treid to debug and put the breakpoints its moving fine in the while loop without any stuck but iam not getting any out in the particular console
      but when i trield 100ms delay after flashing the program and wating for the ouput .it gave me the output but the print on the console is comming to laggy and sometimes wont print even if the printf functon is in the while loop

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Printf won't print in milliseconds.. i think it needs atleast 1 second delay...
      The swo clock is not as fast as mcu, so don't expect printf to work in 100s milliseconds..
      If you need something like that, use uart

  • @sandeepsiv
    @sandeepsiv 2 ปีที่แล้ว

    I am using STM32L475 ..will it work ?
    I am using micro usb only.

  • @think7677
    @think7677 3 ปีที่แล้ว

    I have try this but not give ouput in swt port.

  • @SimonYells
    @SimonYells 4 ปีที่แล้ว

    I think God punishes me because I made exactly the same thing as you and nothing happens. I use the original ST-Link V2 debugger and STM32F446RET MCU.
    Edit: After 7 month of trying this again on my Nucleo, now it works!

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Maybe u forgot tu press record button

    • @SimonYells
      @SimonYells 4 ปีที่แล้ว

      @@ControllersTech I wish that was the solution, but sadly not.

    • @SimonYells
      @SimonYells 4 ปีที่แล้ว

      @@ControllersTech Btw, I saw another tutorial about printf with MCUs from STM32F series and the guy set the SYS mode in CubeMX to "Trace Asynchronous SW". You left it disabled, so I'm confused about whether I should leave it as default (disabled) or change it to Asynchronous SW. Any idea?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      You should turn it on.. i left it coz it was working without turning it on too. But of it's not working for u, than u should turn it on

    • @Stimmenhotel
      @Stimmenhotel 3 ปีที่แล้ว

      @@SimonYells Same Problem here, using a STM32F303K8 (Cortex M4) board. Even enabled the "Trace Async SW" ... Clock Speed I use the value from HCLK i set in CubeMX.
      Did you make it work?

  • @mr.engineer3040
    @mr.engineer3040 3 ปีที่แล้ว

    ITM debugging is only for Cortex-M3 / Cortex-M4 / Cortex-M7 chips. Make sure your stm32 has one of the aforementioned controller.

    • @Stimmenhotel
      @Stimmenhotel 3 ปีที่แล้ว

      I am using a STM32F303K8, according to this: www.st.com/en/microcontrollers-microprocessors/stm32f303.html it is a M4...
      But I wasn't able to get any output, not even character by using ITM_SendChar( 65 ) for an A ...

    • @ksaisko
      @ksaisko 3 ปีที่แล้ว

      @@Stimmenhotel Same!! it's not working on my STM32F446RE

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      This video is shot on f446RE itself

    • @ksaisko
      @ksaisko 3 ปีที่แล้ว

      I know this video is shot on f446re, that’s why it’s really strange it’s not working on mine, i followed all the step and nothing’s working! I did not forget the
      and
      , i don’t understand.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      2 things.
      1. Make sure you enable the swv(trace asynchronous) in the cubemx.. it's in sys settings
      2. Make sure you turn on the recording button before running the code in the debugger

  • @malkin_laboratory4692
    @malkin_laboratory4692 2 ปีที่แล้ว

    Thanks! Now, I'm trying to make scanf input, but no results..

  • @jakubstejskal6806
    @jakubstejskal6806 4 ปีที่แล้ว +3

    Hi. Thank you for this video! But I've got a problem: SWW trace and SWV ITM console do not shows any data. Live expressions works fine. Any advice? Thank you

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Which controller are u using ?

    • @jakubstejskal6806
      @jakubstejskal6806 4 ปีที่แล้ว

      @@ControllersTech STM32F103C8 aka Bluepill

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      This works with nucleo and discovery boards because they have an inbuilt ST-Link. You can't use it with f103 and chinese stlink varient. You might have to use a j-link or original st link with f103.
      Although i am not sure about those also, as I have never used them.

    • @jakubstejskal6806
      @jakubstejskal6806 4 ปีที่แล้ว

      ​@@ControllersTech I am new here, all my experiences are with arduino IDE, so I do not understand your answer well but thanks anyway! Doesn't really matter right now, I am glad for succesfull upload code via ST-link (I was about to give up while trying properly install eclipse+OCD+..+..)

    • @rcinfla9017
      @rcinfla9017 4 ปีที่แล้ว +5

      @@jakubstejskal6806
      There are videos and info how to modify one of the cheap Chinese Clone STLINK V2 to provide SWO input by cutting the 5v supply connector runner from USB Vbus and connecting pin 31 on the STM32 in the STLINK.
      www.eevblog.com/forum/microcontrollers/quick-hack-to-get-swo-on-st-link-clones/
      It is a tight soldering job to connect to pin 31 without creating a solder bridge to adjacent pins so you need a fine point solder tip. The two 5v pins on the STLINK clone are given up to the SWO input. You may have to update the STLINK firmware if you did not previously done.
      You can also download STLINK code into a Blue Pill to create an STLINK V2 with SWO function.
      This SWO port is included on the Nucleo STLINK V2-1 board. The Nucleo boards also have UART2 from target uC fed over USB to a virtual COM port on PC using a terminal program of your choice to display the UART2 communications. You won't get the UART2 comm port on the STLINK V2 clone.

  • @cemulasatar
    @cemulasatar ปีที่แล้ว

    SWV is working with the frequency of 16 MHZ but it didnt work with 168 MH.. Why ? my board ( stm32f407g)

    • @cemulasatar
      @cemulasatar ปีที่แล้ว

      I changed my 16 Mhz to 168 Mhz in debug configurations and also i checked clock frequaency on STM32cube but i didnt see anything on SWV data console

  • @khaliltroudy9908
    @khaliltroudy9908 4 ปีที่แล้ว

    how can I get assisted while I'm writing the instructions ( I have to write the full instruction..) :/

  • @BastiBas94
    @BastiBas94 3 ปีที่แล้ว

    it looks like you got a reset button for the debugger. if so, how do i get the button ?

    • @BastiBas94
      @BastiBas94 3 ปีที่แล้ว

      i found it myself. for anyone else with the problem, go to windows->perspective -> open perspective -> debug

  • @furkanklc5220
    @furkanklc5220 4 ปีที่แล้ว

    How can I use this mmethod for STM32F103? Can you tell me the way?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      You have to buy the original stlink. It won't work for the chinese versions

    • @furkanklc5220
      @furkanklc5220 4 ปีที่แล้ว

      @@ControllersTech Thank you! For the Keil compiler Is the video valid?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      I don't know about that. If keil supports the ITM stimulus port, than it will work..

    • @rubens5563
      @rubens5563 4 ปีที่แล้ว

      This works great with STlink V2 (Chinese version): lujji.github.io/blog/stlink-clone-trace/

  • @khoatran3005
    @khoatran3005 2 ปีที่แล้ว

    can it work with stm32f303 ?

  • @omeranar8769
    @omeranar8769 3 ปีที่แล้ว

    how can i change/modify variable's values while code runinng ?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      You can't modify variable while the code is running.. after modifying them, you need to compile and then run again..

    • @omeranar8769
      @omeranar8769 3 ปีที่แล้ว

      @@ControllersTech but "keil ide" allows this, right ?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      I don't know about keil.. maybe it does..

  • @Androniy10
    @Androniy10 4 ปีที่แล้ว

    Discovery board as st-link, own board with stm32f103. It doesn't work. ((

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      In F103 controller, you have to connect the pin PB3 to the SWO of the debugger. It's not available on the Chinese ST-Link, but if someone have the original ST-Link, they can do that.
      You try to find the SWO of the ST-Link (your discovery board) and connect to PB3 of F103

    • @Androniy10
      @Androniy10 4 ปีที่แล้ว

      Now PB3 is busy. When I used IAR, I didn't connect TRACESWO(PB3) pin, but printf worked fine. May be you know how it work in IAR? Thank you for answer.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      No i don't know much about IAR. Maybe you shouldn't keep PB3 busy with any other task.

  • @noweare1
    @noweare1 4 ปีที่แล้ว

    STM32 F0 doesn't support the SWV (viewer) , too bad

  • @tuloca011
    @tuloca011 4 ปีที่แล้ว +1

    i love you

  • @arashhashemi7091
    @arashhashemi7091 3 ปีที่แล้ว

    Thanks so much 💞

  • @vahidrezashokouh1139
    @vahidrezashokouh1139 ปีที่แล้ว

    how abou iar ?

  • @slavaglow6933
    @slavaglow6933 4 ปีที่แล้ว

    Can I do it with my board STM32F4 Discovery?

  • @Seff2
    @Seff2 3 ปีที่แล้ว

    Wtf... why does a printf command has to be so needlessly complicated? In arduino or mbed you just write printf(...) and done. With stupid CubeIDE Shit you need a doctors degree to get a simple output... just ridiculous. Who can use that or create anything more complicated than a blink sketch? Speaking of which: A fucking blink sketch generated in cubeF(uck)X for my discovery board gives me a 700!!!! lines main.c file. WTF?!? 700 lines to to toggle an LED on and off???

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      2 things
      1. If you don't like cubemx generated code, why don't you use the registers ? This way you only write the things you need
      2. This printf shown in the video prints the message on debugger console. In case of arduino, that message prints on serial console. Even you can define a printf function, where you can easily send data to serial console using uart.

    • @Seff2
      @Seff2 3 ปีที่แล้ว

      @@ControllersTech The registers are even worse. Using the HAL is already way to complicated for me, using registers would be insanity. Then i could basically just start using Assembler right away...