Sunday, February 18th 2018, 5:50am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

MatthewKyeo

Beginner

Date of registration: Jul 19th 2017

Posts: 49

1

Friday, December 29th 2017, 10:03am

[ABANDONED] How to dump float/int values from the memory?

Hi, I'm Matthew. I tried to search this memory dumping feature on the web, but I couldn't find it.

I use 64-bit SES 3.30 on a 64-bit Windows 10 machine.

C/C++ Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#define NUMBER_OF_SAMPLES	1024

typedef struct my_struct
{
    float roll;
    float pitch;
    float yaw;

    float ax;
    float ay;
    float az;

}my_struct_t;

typedef union my_union
{
	float raw_buffer[NUMBER_OF_SAMPLES][6];

	my_struct_t samples[NUMBER_OF_SAMPLES];

}my_union_t;

my_union_t m_buffer; // global variable




I have a big array. I tried to drag all the HEX values from the memory view. However, calculating these back to 32-bit float values was quite a pain.

Is there a convenient feature from SES that can dump the memory (from address to end address) as a specific data type (float, double, int, etc)?

-Regards, Matthew

This post has been edited 3 times, last edit by "MatthewKyeo" (Dec 29th 2017, 10:05am)


SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 377

2

Tuesday, January 2nd 2018, 10:38am

Hi,

The memory content can only be exported as text or binary data.
You can add the floats that you want to export to the Watches and then copy that to the clipboard/a file with the rightmost buttons on the watch window.
For plain export of just the float values you will need to convert the watches content or the memory dump externally.

Regards
Johannes

MatthewKyeo

Beginner

Date of registration: Jul 19th 2017

Posts: 49

3

Thursday, January 4th 2018, 2:54am

The memory content can only be exported as text or binary data.


Thanks, Johannes. Can you help me with the text exporting feature, please? I cannot find that from the manual. How can I export memory contents as text with ES?

In the meantime, I will try the Watch-clipboard feature.

-Warm Regards, Matthew

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 377

4

Thursday, January 4th 2018, 11:11am

Hi,

Simply select the memory area you want to copy with your cursor and press Ctrl-C.
(Like with standard text)

Regards
Johannes

MatthewKyeo

Beginner

Date of registration: Jul 19th 2017

Posts: 49

5

Friday, January 5th 2018, 6:19am

Oh, I see what you mean. Is it possible to set a memory range to copy the memory area?

Since I have a big array (32-bit float x 1024), selecting that region with a mouse is quite painful.

I was hoping something similar to Keil's Save command (save filename address1 address2).

This similar feature is not currently supported in ES, isn't it? Hope a similar feature to be added someday.

Or should I use other tools like J-Mem or Ozone?

-Regards, Matthew