Using printf-debug with importet HAL-linbrary (STM32)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Using printf-debug with importet HAL-linbrary (STM32)

    Hi

    I've a project which is generated by ST's CubeMX. CubeMX generate the Project as KEIL-Project, and Embedded Studio imports this, its working nice.

    But I miss the Debug-printf-function. I tried to copy and include all libraries from an ES-created project, but it does not work.

    Any idea how I can use this debugtool in a project like this? I couldnt find some helpful infos for this problem.

    thanks for help :)
  • Realy no idea? :(

    Edit:
    There is an other...I wanna put some functions in a seperate File. But the functions are not showed in auto code completition, no matter how I include it. How can I familiarize my files with code ES editor?

    The post was edited 1 time, last by White_Fox ().

  • Hello Oliver,

    Sorry for the delay in response.


    But I miss the Debug-printf-function. I tried to copy and include all libraries from an ES-created project, but it does not work.


    I assume you want to use a printf function to output debug information on your terminal. What hardware interface are you using/ planning to use for that on your target interface?
    Via Semihosting, SWO, RTT?

    We recommend using RTT as you are hardware independend and faster than other printf style techniques. More information can be found here.

    There is an other...I wanna put some functions in a seperate File. But the functions are not showed in auto code completition, no matter how I include it. How can I familiarize my files with code ES editor?


    The moment you define a function you should see it in auto completion. Make sure the file where the function is declared is also included in the file you want to call it.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi

    Its courios...now it works (auto code completition), but I don't no what I've changed...

    Yes, I mean RTT. Is there an easy way do add it to an project (like "Add existing file..."), I dont find a folder in ES-installation where it is, I dislike also to rummage in such template directories (to easy to damage it...). And create an empty project to copy this files is a way, but I it seems also not beeing what it should be...

    There are also any questions for using ES (Help -> F1 does not work?)

    Is there any possibillity to jump to the codeline which generates a compile error? Don't find something under Help -> content... :(
  • Hello Oliver,


    Yes, I mean RTT. Is there an easy way do add it to an project (like "Add existing file..."), I dont find a folder in ES-installation where it is, I dislike also to rummage in such template directories (to easy to damage it...). And create an empty project to copy this files is a way, but I it seems also not beeing what it should be...


    You can simply add them with "Add existing file..." from the ES install folder.
    To quickly navigate to the folder path use File>Open Studio Folder>Studio Folder

    There under /samples you will find all files necessary files for RTT.
    We recommend though copying the needed files from that folder to your project folder locally to make sure the project stays portable.

    There are also any questions for using ES (Help -> F1 does not work?)


    F1 or Help should open a window called "Content" which is essentially the ES user manual.
    Alternatively you can use the online version with the same exact content: studio.segger.com/

    Is there any possibillity to jump to the codeline which generates a compile error? Don't find something under Help -> content... :(


    You can jump by either using shortcuts F4 and Shift + F4.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Nino

    Thanks...I found the RTT files. :).

    SEGGER - Nino wrote:

    Is there any possibillity to jump to the codeline which generates a compile error? Don't find something under Help -> content... :(


    You can jump by either using shortcuts F4 and Shift + F4.

    Best regards,
    Nino
    I meant something like the compile error in the attachment. In most IDEs I used, the normal way is a coubleclick at the warning, and the cursor jumps to the codeline which causes the error or/and marks it. F4/Shift+F4 jumps between the red-button-messages.
    Images
    • es.PNG

      140.48 kB, 1,600×861, viewed 1,132 times

    The post was edited 1 time, last by White_Fox ().

  • Hi Oliver,

    I meant something like the compile error in the attachment. In most IDEs I used, the normal way is a coubleclick at the warning, and the cursor jumps to the codeline which causes the error or/and marks it. F4/Shift+F4 jumps between the red-button-messages.


    This is exactly how ES works too usually. But in this particular case the compiler can't relate a particular code line to the error which is why the double clicking does not work here.
    Same goes for linking errors.
    This is unfortunately gcc compiler specific so we have no influence of the behaviour in that cases.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.