On 2002-03-16 12:22:00 Gareth Bransby wrote:
the lartware's compile-tool is arm-linux ,the executable >>can run without linux? i think it should be arm-elf if i wanna build standalone mad,that is right?
The arm-linux compiler should be fine as far as i know. As >long as your code has no system calls it should run without >linux. For example minimad.c has things like that mmap >call, which i think requires an os.
i dont know how to initiate arm and set the start address using arm-linux.whether in ctr0.s ?
minimad can be compiled and ran no complaint,but it look like doing nothing.
Use minimad like this : ./minimad < file.mp3 > file.wav It reads and writes from stdin and stdout.
what do the stdin and stdout refer to ? keyboard and screen? in minimad.c : int main(int argc, char *argv[]) { struct stat stat; void *fdm;
if (argc != 1) return 1; .. if you run minimad with any parameters it will return doing nothing.
acen10 acen10@263.net
i dont know how to initiate arm and set the start address using arm-linux.whether in ctr0.s ?
I think the function 'decode' will just take a pointer to where the mp3 is. In minimad.c : decode(fdm, stat.st_size);
where fdm is the pointer to the mp3 data
what do the stdin and stdout refer to ? keyboard and screen? in minimad.c : int main(int argc, char *argv[]) { struct stat stat; void *fdm;
if (argc != 1) return 1; .. if you run minimad with any parameters it will return doing nothing.
Yes it will normally print the data to the screen so you redirect it to a file using "> audio.pcm."
"if (argc != 1)" means return if the arguments are not 1. So if there are no arguments it will do nothing.
Have you managed to compile minimad.c for arm yet?