I have a fairly small (~10kB), uncompressed audio file that I would like to include in ROM. The microcontroller is 8-bit 8051 compatible (AT89C55), and the audio file has 8-bit resolution so I can just transfer it byte-by-byte to a DAC at whatever playback speed I wish.
I am using Keil's uVision, in an A51 assembly language project. How might I conveniently include an uninterpreted stream of bytes such as this, and crawl through it?
You have basically two options:
1) use a tool to convert your raw data to assembly source and include that in your project.
2) use a tool to convert your raw data to a hex file, then merge that into the program's final hex file. The source only gets told the address of the data by an EQU (and a linker reservation).
Ahh, perfect idea. I bet it wouldn't even be too hard to just write a small script that breaks it into a bunch of "db" statements. Thank you.