When I try to compile my program I get this error:
/course/cs148/bin/h8300-hitachi-hms/h8300-hitachi-hms-gcc -O2 -fno-builtin -
fomit-frame-pointer -Wall -I. -I/course/cs148/include -c sound.c
/course/cs148/bin/h8300-hitachi-hms/h8300-hitachi-hms-ld -T
/course/cs148/lib/brickOS.lds -relax -L/course/cs148/lib
sound.o -lc -lmint -lfloat -lc++ -o sound.ds1 -Ttext 0xb000
/course/cs148/bin/h8300-hitachi-hms/h8300-hitachi-hms-ld: address 0xb028 of
sound.ds1 section .text is not within region ram
/course/cs148/bin/h8300-hitachi-hms/h8300-hitachi-hms-ld: address 0xb028 of
sound.ds1 section .tors is not within region ram
/course/cs148/bin/h8300-hitachi-hms/h8300-hitachi-hms-ld: address 0xb028 of
sound.ds1 section .text is not within region ram
/course/cs148/bin/h8300-hitachi-hms/h8300-hitachi-hms-ld: address 0xb028 of
sound.ds1 section .tors is not within region ram
make: *** [sound.ds1] Error 1
rm sound.o
sound.c looks like this
--------------------------------------
#include <unistd.h>
#include <dsound.h>
note_t notes[] = { {PITCH_C5, 3}, {PITCH_C5, 3}, {PITCH_C5, 2},
{PITCH_D5, 1}, {PITCH_E5, 3}, {PITCH_E5, 2},
{PITCH_D5, 1}, {PITCH_E5, 2}, {PITCH_F5, 1},
{PITCH_G5, 6}, {PITCH_C6, 1}, {PITCH_C6, 1},
{PITCH_C6, 1}, {PITCH_G5, 1}, {PITCH_G5, 1},
{PITCH_G5, 1}, {PITCH_E5, 1}, {PITCH_E5, 1},
{PITCH_E5, 1}, {PITCH_C5, 1}, {PITCH_C5, 1},
{PITCH_C5, 1}, {PITCH_G5, 2}, {PITCH_F5, 1},
{PITCH_E5, 2}, {PITCH_D5, 1}, {PITCH_C5, 6},
{ PITCH_END, 0 }
};
int
main(int argc, char *argv[])
{
while(1)
{
dsound_play(notes);
wait_event(&dsound_finished, 0);
}
return 0;
};
-----------------------------------------------------------------------
I'm using linux with legOS v0.2.5.
The compiling error goes away if I put a 'msleep(100)' before the while loop.
Does anyone know what the complier error means?
thanks.
-Bryant
|