Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Debug.Print equivalent for SWIM/ST-Link


  • Please log in to reply
5 replies to this topic

#1 ByteMaster

ByteMaster

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 29 May 2012 - 03:45 PM

Sorry if this isn't the right forum, but I've looked and I can't find any mechanism to write any data from my STM8 app into the debug log in either IAR Workbench or ST Visual Develop. Is this even possible? Kevin...
Kevin D. Wolf
Windows Phone Development MVP
President Software Logistics, LLC
Tampa, FL

#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 29 May 2012 - 04:16 PM

I don't think this is possible, it seems there is no way to output data from STM8 through SWIM during a debug session. Theoretically, it could be possible to redirect a serial output there, but you can already use a separate terminal for that (you can overwrite putchar function to send the output to serial; printf calls it internally).

#3 ByteMaster

ByteMaster

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 30 May 2012 - 11:33 AM

I don't think this is possible


Thanks CW2 - that's what I sort-of figured.
Kevin D. Wolf
Windows Phone Development MVP
President Software Logistics, LLC
Tampa, FL

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 May 2012 - 07:50 PM

Hi ByteMaster,

NETMF debugging spoils us all! :)

A few ideas for STM8S:
  • Change the state of LED(s) (on/off/dim/# of blinks) to indicate current state
  • Use a serial port on the STM8S to output text to a terminal program on a PC (using a USB-TTL serial cable)
  • Write debug data into an in-memory location and use SWIM to look at the in-memory data

I'd recommend morse code--there's even a morse code to text interpreter on the Projects page--but that might be a big slow.

Chris

#5 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 30 May 2012 - 08:44 PM

Hi ByteMaster,

NETMF debugging spoils us all! :)

A few ideas for STM8S:

  • Change the state of LED(s) (on/off/dim/# of blinks) to indicate current state
  • Use a serial port on the STM8S to output text to a terminal program on a PC (using a USB-TTL serial cable)
  • Write debug data into an in-memory location and use SWIM to look at the in-memory data

I'd recommend morse code--there's even a morse code to text interpreter on the Projects page--but that might be a big slow.

Chris


Just need a netduino to interpret it, should be able to up the speed a bit. Although I suspect that a UART might just be easier and more reliable.

When you talk EE use small words, I'm just a Software Developer :)
My Blog/Site and Everything Else

If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.

 

Oh my. So many things, so little money!!

 


#6 ByteMaster

ByteMaster

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 30 May 2012 - 09:08 PM

Hi Chris -

I'd recommend morse code--there's even a morse code to text interpreter on the Projects page--but that might be a big slow.


Hmmm...sounds like a very interesting project! Must...resist...too many tangents already coming out of my primary effort :unsure:

Something I might tinker with...I created some common libraries for handling the GO!/Module communication w/ IRQ & SPI. I have a range of messages for system type calls. I think I'll add one with the following exchange:

MODULE->GO : I got something for you!
GO->MODULE : Ok, what is it now?
MODULE->GO : It's a message type XX, and a bunch of characters, will you please send them to your Debug Console?

Obviously this isn't performance happy, but should get the job done and shouldn't be too bad in small doses.

Kevin...
Kevin D. Wolf
Windows Phone Development MVP
President Software Logistics, LLC
Tampa, FL




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.