[fpc-devel] MIPS big-endian program starts but does nothing
Reinier Olislagers
reinierolislagers at gmail.com
Sat Sep 6 11:26:58 CEST 2014
Hi,
Periodically I try to cross-compile a simple program [1] for my router
with fpc trunk.
It starts but does nothing (does not return to command prompt).
Noticed an earlier mail from Dennis Poon where he described the same
behaviour.
Any suggestions?
Thanks,
Reinier
cat /proc/cpuinfo
system type : Atheros AR9344 rev 2
machine : TP-LINK TL-WDR3600/4300/4310
processor : 0
cpu model : MIPS 74Kc V4.12
BogoMIPS : 278.93
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000,
0x0ff8, 0x0ff8, 0x0ff8]
ASEs implemented : mips16 dsp
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
]1]
program hellomips;
{$mode objfpc}
// let's use short strings {.$H+}
{not$DEFINE UseCThreads} //otherwise it seems we get pthreads which gdb
can't debug
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes
;
begin
writeln('hello mips');
end.
with options
-MObjFPC -Scghi -Tlinux -Pmips -CpMIPS32R2 -Xs -vewnhibq
-Filib\mips-linux -Fu. -FUlib\mips-linux -l
relevant fpc.cfg snippet
# begin fpcup do not remove mips-linux
#cross compile settings dependent on both target OS and target CPU
#IFDEF CPUMIPS
#IFDEF LINUX
# Inserted by fpcup 06/09/2014 11:05:24
-CpMIPS32R2
-CfSOFT
-FDC:\development\cross\bin\mips-linux\
-XPmips-linux-
-Tlinux
-FlC:\development\cross\lib\mips-linux\
-Xr/usr/lib
-FL/usr/lib/ld-linux.so.2
#ENDIF
#ENDIF
# end fpcup do not remove
More information about the fpc-devel
mailing list