Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save memory range as binary file #22

Open
coran21 opened this issue Oct 28, 2023 · 4 comments
Open

Save memory range as binary file #22

coran21 opened this issue Oct 28, 2023 · 4 comments

Comments

@coran21
Copy link

coran21 commented Oct 28, 2023

I switched to VS Code from Eclipse, and one of the great things there is that you can save a selected memory range as a binary file. Is something like that possible with memview? So far, I could save manually selected memory area as a text file together with additional information, which doesn't help for my use case.

Describe the solution you'd like
Add an interface where the user would enter the start and end memory address, select a file, and that memory range would be saved into selected file in binary form.

@haneefdm
Copy link
Contributor

Need more info:

So, what is a "binary form"? Hex (in text form), or bytes in literally binary that you cannot open in an editor. What is the exact file format?

What is your use case? What does Eclipse do, specifically? Screenshots?

I can consider it if I see a justification. You can have a python/perl/whatever script you could contribute it to this repo as well.

@coran21
Copy link
Author

coran21 commented Oct 28, 2023

I think it's called raw binary form, and yes, when you open it in the editor it shows garbage.

My main user case is troubleshooting protocol buffer messages received by MCU and stored in MCU memory. I need to save them as binary files so that I can open them with the protocol buffer parser and find the problem.

The second case is that I work with the camera connected to the MCU. When the image is stored in the MCU memory in jpeg format, it's very convenient just to export memory with that jpeg image and save it directly to the jpeg file, which I can open on the computer and check the captured image immediately (I understand that this is very rare user case)

I want to say that you are doing a great job and you made VS Code much better for embedded development, thanks for that!

mem1
mem2
mem3

@haneefdm
Copy link
Contributor

I want to say that you are doing a great job and you made VS Code much better for embedded development, thanks for that!

Thank you for the kind words. And thanks for providing some context. I can see saving a packet (network, other, etc.)

How about an interface where you can specify any start address (defaulting to the start address of the memory window or cursor-cell position) and a length (not sure what default to use). You can change both and they can even be outside the range of the current memory view. We will TRY to fetch and save.

Both the address and the length can be expressions - that we try to remember for next time. No promises here on the remembering part.

@coran21
Copy link
Author

coran21 commented Oct 28, 2023

All of that sounds good. Remembering the last used length would also be nice.

The default start address could be the start address of the selected memory view, and the default length could be 0 (that's in the Eclipse too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants