Access ETM of Nucleo F401RE without using a debug kit

MrChips

Joined Oct 2, 2009
34,954
I have looked into IAR Terminal I/O utility.

In your code, you can have:

printf("Hello World\n");

This will display the message in the Terminal I/O Output window. Of course, you have to have IAR running in Debug mode.
Using the CP2102 would be a stand-alone method of monitoring program progress.
 

Thread Starter

Lorenzo Ruscitti 1

Joined Nov 30, 2018
24
I have looked into IAR Terminal I/O utility.

In your code, you can have:

printf("Hello World\n");

This will display the message in the Terminal I/O Output window. Of course, you have to have IAR running in Debug mode.
Using the CP2102 would be a stand-alone method of monitoring program progress.
I wasn't talking about the display in the last message. I was saying if changing the value of the pointer, as I did in my code, it really changes my code, this I was wondering. Thanks
 

MrChips

Joined Oct 2, 2009
34,954
Sorry, I was not discussing whether your code changes. I am discussing the whole purpose of this thread with regards to debugging and monitoring the progress of your code. You wanted a way to monitor the behaviour of the code without using IAR debug. I have given you one method of doing so.

As for changes to your code, changing the contents of a string does not change the code.
Why are you concerned about this?
 
Sorry, I was not discussing whether your code changes. I am discussing the whole purpose of this thread with regards to debugging and monitoring the progress of your code. You wanted a way to monitor the behaviour of the code without using IAR debug. I have given you one method of doing so.

As for changes to your code, changing the contents of a string does not change the code.
Why are you concerned about this?
Hi and thank you for your availability

Because to activate the ETM I need to write the value 0xc5acce55 in a register of ETM.
 
We are going around in circles.
I am suggesting that you stop using the ETM.

Why are we turning in circles? What is not clear to you?
I can not choose not to use it is a task that I was assigned?

If I asked you: Write me a code that accesses the register of ETM called Etmlar, with address 0xe0041fb0, and in this address write the value 0xc5acce55. How would you do that?

Thank you
 

MrChips

Joined Oct 2, 2009
34,954
Why are we turning in circles? What is not clear to you?
I can not choose not to use it is a task that I was assigned?

If I asked you: Write me a code that accesses the register of ETM called Etmlar, with address 0xe0041fb0, and in this address write the value 0xc5acce55. How would you do that?

Thank you
I would not do it because I see no reason to do it.
 
I would write:

ETM->LAR = 0xC5ACCE55;
What is the difference between what you wrote to me and what I wrote?

Me:

#define UNLOCK 0xC5ACCE55 // Value to write in ETMLAR useful to unlock the ETM
#define ETM_LAR 0xE0041FB0 // Address of ETM_LAR

unsigned int *p_2 = (unsigned int*) ETM_LAR;

*p_2 = UNLOCK;

You:

ETM->LAR = 0xC5ACCE55;

Thanks
 

MrChips

Joined Oct 2, 2009
34,954
What is the difference between what you wrote to me and what I wrote?

Me:

#define UNLOCK 0xC5ACCE55 // Value to write in ETMLAR useful to unlock the ETM
#define ETM_LAR 0xE0041FB0 // Address of ETM_LAR

unsigned int *p_2 = (unsigned int*) ETM_LAR;

*p_2 = UNLOCK;

You:

ETM->LAR = 0xC5ACCE55;

Thanks
My method is called "direct addressing".
Your method is called "indirect addressing".
 
Top