Hello,

How about converting the blob to a constant initialized byte array in a C
file? This something that e.g. http://srecord.sourceforge.net/ can do.

Maarten

> Hey there.
>
> I'm having a question. I'd need to include binary blobs (more precisely
> image data) into my program. These should export a symbol so that I can
> reference them in my program (for example based on their filename).
>
> Is there a tool or a way to accomplish that? For gcc there is ld which
> you can use to create an obj file which contains the symbols and the
> blob itself. Which can then be included into the C program.
>
> Is this possible to achieve with sdld? How would the commands look like?
>
> I think one way would be to write a small inline assembly which uses
> INCBIN. (Also something I found while googling "INCBIN sdcc"
> http://norecess.cpcscene.net/sdcc-part-4---tips--tricks.html which
> describes my situation pretty well)
>
> But isn't there a better option?
>
> Also INCBIN is not available with the assembler used by the gbz80 port,
> neither can I change it to rgbds (--asm option is not recognized).
>
> Thanks, in advantage.


------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to