Skip to content

Export semihosting::hio::open() #387

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nviennot
Copy link

@nviennot nviennot commented Jan 8, 2022

It's useful for opening various files on the host.

For example:

let mt file = open("file.bin\0", nr::open::RW_TRUNC_BINARY).unwrap();
file.write_all(b"Some binary content").unwrap();

OpenOCD will write the content in file.bin on the host, provided monitor arm semihosting_fileio enable is in the gdb config

@nviennot nviennot requested a review from a team as a code owner January 8, 2022 03:49
It's useful for opening various files on the host.

For example:

    let mut file = open("file.bin\0", nr::open::RW_TRUNC_BINARY).unwrap();
    file.write_all(b"Some binary content").unwrap();
@nviennot nviennot changed the title Export semihistory::hio::open() Export semihosting::hio::open() Jan 8, 2022
@jonathanpallant
Copy link
Contributor

Sorry we dropped this one.

Is it still relevant? If so, consider taking a &CStr as the handle, which is the string-slice type for null terminated strings.

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

Successfully merging this pull request may close these issues.

2 participants