SWO Trace for mikroSDK / NECTO Studio

Fully featured ARM compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
NIVAG
Posts: 5
Joined: 25 Jun 2021 01:41

SWO Trace for mikroSDK / NECTO Studio

#1 Post by NIVAG » 02 Jul 2021 04:57

Hello

I am using a Fusion for ARM v8 board with NECTO Studio and the integrated Codegrip programmer. I would like to be able to send debug messages using the SWO Trace to an output window in NECTO Studio, but I can not find any Library or drivers for this in mikroSDK. I did find a .mpkg in LibStock for mikroC Pro for ARM. I downloaded the package manager but since I don't have to correct compiler it would not open the .mpkg file.

Here is the example code I am referring to - https://libstock.mikroe.com/projects/vi ... /swo-trace

I have verified that the Codegrip hardware supports SWO, I am just looking for an API or Library that will support this. Will I have to implement my own interface using low level function calls? I found the Logger Library in the mikroeSDK but this isn't exactly what I was looking for, because I would rather not have to connect a second USB cable from my laptop to the Dev board.

Thanks in advance.

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: SWO Trace for mikroSDK / NECTO Studio

#2 Post by filip.grujcic » 02 Jul 2021 14:23

Hello,

There is no SWO driver for mikroSDK2.0, nor there probably will be I'm afraid.

For now what you can do is copy the appropriate compiled binary file (.emcl) to your project folder (where the memake.txt is).
I have attached all .emcl files, since I don't know which MCU you are using.
After you've copied the file, open the memake.txt file and add the following:
binaries: {
__Lib_SWO_ST_M4.emcl (this has to match the name of the file you copied)
}

After this you should be able to use the functions from this library in your project.

Regards,
Attachments
Uses.zip
(19.43 KiB) Downloaded 58 times
Filip Grujcic

NIVAG
Posts: 5
Joined: 25 Jun 2021 01:41

Re: SWO Trace for mikroSDK / NECTO Studio

#3 Post by NIVAG » 02 Jul 2021 15:02

Thank you Filip.

I have included the binary in my project and updated the memake.txt file, however I think I will still need the header file for the library? I know what the library does but I do not know any of the function prototypes, definitions, ect.

I did try to use the .mpkg from LibStock but the package manager would not unzip the project because I did not have the correct compiler installed, and that example project was the only reference on SWO I could find.

Finally, if I might ask, what is the reason for not including SWO driver in mikroSDK2.0? It seems like a useful feature to me but I am sure there are reasons.

Thanks again

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: SWO Trace for mikroSDK / NECTO Studio

#4 Post by filip.grujcic » 05 Jul 2021 10:09

Hello,

There is no header file for this library, therefore I have attached the help file which contains function descriptions.

SWO is available only on ARM MCUs, while mikroSDK2.0 supports other architectures too. I will forward your suggestion to our developers regardless.

Kind regards,
Attachments
Help.zip
(9.92 KiB) Downloaded 57 times
Filip Grujcic

NIVAG
Posts: 5
Joined: 25 Jun 2021 01:41

Re: SWO Trace for mikroSDK / NECTO Studio

#5 Post by NIVAG » 05 Jul 2021 18:54

Thanks again for your help Filip

Post Reply

Return to “ARM AI Compilers”