Author Topic: Info on arm cortex-m debug techniques  (Read 5028 times)

0 Members and 1 Guest are viewing this topic.

Offline mubesTopic starter

  • Regular Contributor
  • *
  • Posts: 238
  • Country: gb
  • Do Not Boil
Info on arm cortex-m debug techniques
« on: July 28, 2017, 08:11:31 pm »
Folks,

A bit of shameless self-promotion.  I started writing up some material on SemiHosting, SWO and associated subjects, specifically focussed on CORTEX-M. There's no commercial angle to this, it's just done the hope that it's useful and in the spirit of giving something back. You can find it http://shadetail.com/.

Comments gratefully accepted.

Dave
 
The following users thanked this post: trevwhite, thm_w, legacy, Gabri74, laneboysrc, ogden, 2N3055, wrynczuk, knapik, SiliconWizard, grbk

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Info on arm cortex-m debug techniques
« Reply #1 on: August 09, 2017, 06:40:43 am »
Pretty good overview.  What I would have added is a performance comparison between UART/Semihosting/SWO to show how much faster/slower they are compared to each other. (In my experience, Semihosting is way too slow to be useful)

If you want some material for another series, I would recommend writing a bit about how to write gdb "scripts" to help you debug (there's precious little information/examples out there) various hardware blocks.

For example, a simple gdb "macro" that will output (and make human-readable) the state of the STMs RCC registers.
 
The following users thanked this post: amymcneil

Offline r0d3z1

  • Regular Contributor
  • *
  • Posts: 116
  • Country: it
Re: Info on arm cortex-m debug techniques
« Reply #2 on: April 10, 2019, 02:25:01 pm »
the ARM debug features available on common MCU are commonly misunderstood and understimated. Thank you for your blog articles.
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Info on arm cortex-m debug techniques
« Reply #3 on: April 10, 2019, 03:42:05 pm »
Just read the first post as you suggested to do.
Nice write up, though that method was known to me in general.

What I'm missing: Add a link on the bottom of each post to the next (and maybe previous) in the series. Otherwise the typical blog structure (just a wild guess: Wordpress) makes it rather difficult for me to follow the series of posts.
Safety devices hinder evolution
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #4 on: April 10, 2019, 11:54:33 pm »
the hope that it's useful and in the spirit of giving something back

Usually, this assumption is weak with open source.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #5 on: April 11, 2019, 12:06:07 am »
Quote
BTW, we run Google Analytics on this site just to know who’s visited. Feel free to block our cookies if that sort of thing bothers you, but rest assured the information isn’t used by us for any other purpose than to see if anyone loves us.

This is a good trick to fool the GDPR, which is not applicable to UK, anyway.
Very smart!
 

Offline gmb42

  • Frequent Contributor
  • **
  • Posts: 294
  • Country: gb
Re: Info on arm cortex-m debug techniques
« Reply #6 on: April 11, 2019, 11:07:32 am »
Quote
BTW, we run Google Analytics on this site just to know who’s visited. Feel free to block our cookies if that sort of thing bothers you, but rest assured the information isn’t used by us for any other purpose than to see if anyone loves us.

This is a good trick to fool the GDPR, which is not applicable to UK, anyway.
Very smart!

Oh really?  The Data Protection Act 2018 is the UK transcription of the EU GDPR into UK law (with other stuff added as well).
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #7 on: April 11, 2019, 11:23:58 am »
Oh really?  The Data Protection Act 2018 is the UK transcription of the EU GDPR into UK law (with other stuff added as well).

so that trick is no good.
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6662
  • Country: hr
Re: Info on arm cortex-m debug techniques
« Reply #8 on: April 11, 2019, 11:59:29 am »
Quote
BTW, we run Google Analytics on this site just to know who’s visited. Feel free to block our cookies if that sort of thing bothers you, but rest assured the information isn’t used by us for any other purpose than to see if anyone loves us.

This is a good trick to fool the GDPR, which is not applicable to UK, anyway.
Very smart!
GDPR is applicable to whole world. If you have EU customers you have to conform to it.. 
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #9 on: April 11, 2019, 12:22:23 pm »
GDPR is applicable to whole world. If you have EU customers you have to conform to it..

I have opened a website recently, and comments on the MessageWall (sort of feedbacks from visitors) are telling me that the most guys who are not located in the European Area, do not think so, but rather they find "irritating" that they have to accept cookies and privacy-agree-on-something for accessing a website.

Recent statistics report that the 90% of disagreement (on about ~2K visitors) comes from outside the Europe area.
« Last Edit: April 11, 2019, 12:37:24 pm by legacy »
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6662
  • Country: hr
Re: Info on arm cortex-m debug techniques
« Reply #10 on: April 11, 2019, 12:41:23 pm »
GDPR is applicable to whole world. If you have EU customers you have to conform to it..

I have opened a website recently, and comments on the MessageWall (sort of feedbacks from visitors) are telling me that the most guys who are not located in the European Area, do not think so, but rather they find "irritating" that they have to accept cookies and privacy-agree-on-something for accessing a website.

(judging by recent, newer) statistics report that the 90% of disagreement (on about ~2K visitors) comes from outside the Europe area.

Well, from their point of view, they are right. It's the fourth time I rewrite the agreement, and I am not willing to use any "pop-up" or similar "cookie" technique.

Well in theory it goes like this: Anybody anywhere in the world must protect personal data of EU citizens. In theory, if you could know if somebody is not from EU you don't have to comply with GDPR for them. But you carry the burden to make sure you do it for EU citizens.
And despite all the complaining they should be happy that you care for their privacy and do not misuse their data.

People are funny.

 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Info on arm cortex-m debug techniques
« Reply #11 on: April 11, 2019, 02:22:51 pm »
I admit this point is funny. There is a lot of EU crap, but the GPDR is not one (even though it's probably still way too permissive when it comes to personal data).

Regarding cookies and such, all it does is warn people (and give them the opportunity to decline) instead of storing them behind their back. What's the problem? Are people annoyed we ask them for permission?

Reminds me of how many people reacted to Windows UAC, which was actually a gigantic progress for security. Lazyness.

Regarding locating users, it's never 100% foolproof depending on their network, so relying on that to decide whether they are or are not EU citizens is way slippery and a potential way to infringe on the GPDR. Many or most businesses will not even bother.
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6662
  • Country: hr
Re: Info on arm cortex-m debug techniques
« Reply #12 on: April 11, 2019, 03:07:39 pm »
I admit this point is funny. There is a lot of EU crap, but the GPDR is not one (even though it's probably still way too permissive when it comes to personal data).

Regarding cookies and such, all it does is warn people (and give them the opportunity to decline) instead of storing them behind their back. What's the problem? Are people annoyed we ask them for permission?

Reminds me of how many people reacted to Windows UAC, which was actually a gigantic progress for security. Lazyness.

Regarding locating users, it's never 100% foolproof depending on their network, so relying on that to decide whether they are or are not EU citizens is way slippery and a potential way to infringe on the GPDR. Many or most businesses will not even bother.

That is why said in theory. In practice, you just apply it to all.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #13 on: April 11, 2019, 03:17:27 pm »
Regarding cookies and such, all it does is warn people (and give them the opportunity to decline) instead of storing them behind their back.

but to be truly 100% compliant, you also have to tell them
- what exactly is stored
- where it is stored
- how long will it be stored
- a person to be called for more information and/or for asking personal data removed

DTB is a no-profit not commercial website, and a lawyer suggested us to write this page (don't worry, it's a php that only loads a text file).

so, I assume a true GDPR agreement should look this way, with points and a name/email/contact to someone who cares. In our case .. it's me (and I am not the web admin).

Someone commented "too much semi-legalese", which means "not clear, and it sounds too much lawyer's stuff", well ...  :palm:


Are people annoyed we ask them for permission?

precisely what we found in our comments on MessageWall :D
and I do find it a bit "funny"  ;D

Regarding locating users, it's never 100% foolproof depending on their network, so relying on that to decide whether they are or are not EU citizens is way slippery and a potential way to infringe on the GPDR. Many or most businesses will not even bother.

A lot of websites, including Amazon and eBay, use the "whois" service to geo-locate users because this makes sense for choosing the correct language.

e.g.
if the incoming IP is located in Italy, then the website chooses language=Italian
if the incoming IP is located in UK, then website chooses language=English
etc ...

(if the incoming IP is located  ... try to access those websites from a Proxy located somewhere else, and see how the website reacts about the default-language)

Amazon has an internal statistical engine that also tries to understand the psychology of users, e.g. which color is the best option regarding users of a specific area comparing the color of the button with the number of click on it and purchases ...

I have never read it, neither clicked on "I do understand and I agree with this", I know it because there is a friend who works for Amazon and she told me it.

In theory, a website should ask for the permission, even for checking the correct language :-//




(p.s. about permissions ... in theory, Giano (it's our defensive system) is violating the GDPR when someone doesn't agree with the site agreement because the firewall always logs and checks the IP's localization, banning the visitor if the IP comes from a VPN, Proxy, or public area ... which is exactly from where spamming-bots usually come)
« Last Edit: April 11, 2019, 03:24:20 pm by legacy »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #14 on: April 11, 2019, 03:27:43 pm »
Comments gratefully accepted.

I do like the "form" you are presenting your articles.
It's good and easy to read even on a smartphone!
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6662
  • Country: hr
Re: Info on arm cortex-m debug techniques
« Reply #15 on: April 11, 2019, 03:49:12 pm »
Thing is, it is NOT that restrictive but is also not that simple.

GDPR is about personal data. IP address on a transient server is P.D.. Even cookie is not a personal data per se.
You have to collect identifiable user data that will reveal to you who is user.

So simple site with cookies is not a problem. Having personal user accounts with a real name of the user is.

If you are not registering users, and only have cookies and IP logs AND you don't give that data for third parties for processing, pretty much a statement on site that explains what you do is good enough.

There is a lot of paranoia about the GDPR. There are many categories of web sites and businesses that are exempt because they don't do and significant data processing per GDPR.
 

Offline mubesTopic starter

  • Regular Contributor
  • *
  • Posts: 238
  • Country: gb
  • Do Not Boil
Re: Info on arm cortex-m debug techniques
« Reply #16 on: April 12, 2019, 06:48:37 pm »
Well, we seem to have diverted into a http://bikeshed.com/ discussion. There is nothing GDPR-affect{ing|ed} stored by that website. There's an EU directive (2002/58/EC IIRC) requiring your users to give 'Informed Consent' that you are storing information on their computer, but that's about it.  The site could be improved a bit to do the job with a pop-up (there are WordPress plugins for that nowadays) but the only reason for having tracking on there at all is to see if anyone is interested in the stuff....no one is being sold for medical research, or any other reason.

The site was specifically set up to be easy to read and not get in your way with banggood-style adverts. I like sites with good meaty content and I was just trying to contribute to the corpus of knowledge. I take on board the point about ease of navigation though, I'll lift the hood to see if there's anything that can be done on that.

Reading through it (with a bit of time-distance now) there is quite a lot of useful material in there, especially when you get up to the more sophisticated tools like kcachegrind to surf around the execution history of your code.  The material never really got good traction though...I don't know if that's because it was too specialised, to difficult to find or just simply because the audience is too small.  When I started writing I did consider taking it, and other material expanding on it, and forming it into a into a book incorporating, for example, more material showing how to understand and debug hard realtime systems. (Like http://shadetail.com/blog/vga-video-out-on-bluepill/ .... I don't know of any other practical examples showing you how to get realtime CPU loading output on your scope!)...  but given the limited resonance it's had so far I'm not sure there would be too much point - in this 30 second attention span world folks don't seem too interested in learning what's really going on, and would rather gawp at the shiny.

Anyway, pleased its tickled someone's cranium. Every now and again I throw something else up there. Next sizeable thing will probably be an open sourced MIMXRT1021 board, running NuttX in preparation for www.nuttx2019.org.

Regards

DAVE

 
The following users thanked this post: grbk

Offline wrynczuk

  • Newbie
  • Posts: 7
  • Country: pl
Re: Info on arm cortex-m debug techniques
« Reply #17 on: April 15, 2019, 07:42:29 am »
I like the site and already bookmarked it. I think I will give a try to the BluePill which seems just cool.

Anyway I encourage you also to visiting my place https://vcdmaker.org. It's open and free software facilitating text log analysis. No matter the format it is created in. The tool was created as a mean to simplify systems analysis and debugging. Another tool to your library.
 

Offline ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: ca
Re: Info on arm cortex-m debug techniques
« Reply #18 on: April 15, 2019, 11:09:44 am »
Thanks for sharing :-+ :-+ :-+
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Info on arm cortex-m debug techniques
« Reply #19 on: April 15, 2019, 02:47:59 pm »
Regarding cookies and such, all it does is warn people (and give them the opportunity to decline) instead of storing them behind their back. What's the problem? Are people annoyed we ask them for permission?

I am. I come to a Website and they cover the third of the screen with their "cookies" statements and refuse to remove the banner unless I agree to their policies (which I most likely don't have time to read). I can tolerate when DigiKey, or some other important site, do this.  But for most others I simply leave.

If I enabled cookies, this means that I'm Ok with cookies. No need to ask. If I don't like any cookies, I can delete them - they're not on the server, but on my own browser.
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: Info on arm cortex-m debug techniques
« Reply #20 on: April 15, 2019, 02:56:10 pm »
Regarding cookies and such, all it does is warn people (and give them the opportunity to decline) instead of storing them behind their back. What's the problem? Are people annoyed we ask them for permission?

I am. I come to a Website and they cover the third of the screen with their "cookies" statements and refuse to remove the banner unless I agree to their policies (which I most likely don't have time to read). I can tolerate when DigiKey, or some other important site, do this.  But for most others I simply leave.

If I enabled cookies, this means that I'm Ok with cookies. No need to ask. If I don't like any cookies, I can delete them - they're not on the server, but on my own browser.

I couldn't have put it better myself. All those cookie warnings are just insane and I find them very annoying. There are better ways to accomplish privacy protection that would not be intrusive to the consumer.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #21 on: April 15, 2019, 03:23:21 pm »
I couldn't have put it better myself. All those cookie warnings are just insane and I find them very annoying. There are better ways to accomplish privacy protection that would not be intrusive to the consumer.

like the solution used on DTB? We are not using any popup or similar, the first time the visitor sees the page there is a little box informing about the GDPR &C. Do you think it's nice? OK, lets' talk about results ... with this solution, on 2944 visitors only 16 have clicked on "yes, I understand and agree"

only 16/2944 :-DD

it means we cannot process any statistical information on them, neither which page they click on mostly, nor which is the resolution of their screen (which is useful to understand if we'd better change the template for something that better suits for smartphones and tablets) :palm:


Really guys, I am so depressed by this experience that I am tempted to shut down the server.
« Last Edit: April 15, 2019, 03:26:08 pm by legacy »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #22 on: April 15, 2019, 03:29:50 pm »
No need to ask. If I don't like any cookies, I can delete them - they're not on the server, but on my own browser.

That is what makes everything confused: someone calls them "cookies", and it's not what "cookies" means because data are NOT on the browser, but rather on the server.

It's a sneaky trick, I know, but a lot of websites do it, and it's even more depressing for those who respect the rules  :palm: :palm: :palm:
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: Info on arm cortex-m debug techniques
« Reply #23 on: April 15, 2019, 03:36:03 pm »
What? Exactly when are cookies not on your local computer? That is sort of the whole point of them - they stay with the browser and user.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Info on arm cortex-m debug techniques
« Reply #24 on: April 17, 2019, 06:30:19 am »
What? Exactly when are cookies not on your local computer? That is sort of the whole point of them - they stay with the browser and user.

when there is a javascript part that sends information remotely to a server, so the information is not really locally stored, and you cannot disable javascript because pages use a lot of java scripts to work.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf