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

extern const uint8_t Sample16kHz_raw_start[] asm("_binary_Sample16kHz_raw_start"); #1

Open
NOA-Vernon opened this issue Apr 9, 2018 · 1 comment

Comments

@NOA-Vernon
Copy link

Hello,

could you tell me what these codes means exactly?
I just know "extern const uint8_t Sample16kHz_raw_start[]", but what "asm("_binary_Sample16kHz_raw_start")" means?

extern const uint8_t Sample16kHz_raw_start[] asm("_binary_Sample16kHz_raw_start");
extern const uint8_t Sample16kHz_raw_end[] asm("_binary_Sample16kHz_raw_end");

Thank you

@commarmi76
Copy link
Owner

Hello,

it's a way to include binary files inside the program.
Using objcopy you can convert any binary file into .o object, and link with your program using ld.
https://balau82.wordpress.com/2012/02/19/linking-a-binary-blob-with-gcc/

Br.

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