[RESOLVED] fwrite() causes compile error in SimpleIDE
Wossname
Posts: 174
Started using SimpleIDE for the first time - I have a noobie question...
[PHP]
#include <stdio.h>
#include <propeller.h>
int main(void)
{
while(1)
{
waitcnt(CLKFREQ + CNT);
printf("Hello\n");
fwrite("World\n", 1, 6, stdout);
}
return 0;
}
[/PHP]
Hitting the Build button yields this result...
Is there some magical incantation or some config thing I've missed out somewhere?
EDIT:
Yes, apparently I should have used the "LMM" setting apparently.
SOLVED!
[PHP]
#include <stdio.h>
#include <propeller.h>
int main(void)
{
while(1)
{
waitcnt(CLKFREQ + CNT);
printf("Hello\n");
fwrite("World\n", 1, 6, stdout);
}
return 0;
}
[/PHP]
Hitting the Build button yields this result...
I want to be able to write arbitrary binary data down the serial port using fwrite() but for some reason it refuses allow this usage.Project Directory: C:/code/SimpleIDE/hello/
Ignoring "Simple printf" flag in COG mode program.
propeller-elf-gcc.exe -o a.out -Os -mcog -I . -fno-exceptions hello.c
C:\Users\ADAM~1.WAR\AppData\Local\Temp\cceK5yau.o: In function `.L2':
(.text+0x54): undefined reference to `_fwrite'
C:\Users\ADAM~1.WAR\AppData\Local\Temp\cceK5yau.o: In function `.LC5':
(.text+0x68): undefined reference to `_(float, int, long,...)(short)'
collect2: ld returned 1 exit status
Done. Build Failed!
Check source for bad function call or global variable name `_fwrite'
C:\Users\ADAM~1.WAR\AppData\Local\Temp\cceK5yau.o: In function `.LC5':
(.text+0x68):
Is there some magical incantation or some config thing I've missed out somewhere?
EDIT:
Yes, apparently I should have used the "LMM" setting apparently.
SOLVED!