Angelo Dureghello
2014-01-23 09:15:55 UTC
Dear all,
i have a small board with a coldfire mcf5307, 4 MB flash and 16MB sdram.
I have loaded on it this ucLinux:
~ # cat /proc/version
uClinux version 2.6.36.2 (angelo at angel3) (gcc version 4.6.1 (Sourcery
CodeBench Lite 2011.09-23) ) #122 Fri Dec 14 23:52:01 CET 2012
I am now trying to upload and run a simple c++ program, with just 3
simple classes,
and a main().
Fist issue,
I tried to use the most recent uclinux.org supplied toolchanin
(m68k-uclinux-20101118),
i get :
make
/usr/local/bin/m68k-uclinux-g++ -O2 --pipe -m5307 -Iinclude -Wall -c -o
obj/base64.o src/base64.cc
/usr/local/bin/m68k-uclinux-g++ -O2 --pipe -m5307 -Iinclude -Wall -c -o
obj/main.o src/main.cc
/usr/local/bin/m68k-uclinux-g++ -O2 --pipe -m5307 -Iinclude -Wall -c -o
obj/sha256.o src/sha256.cc
/usr/local/bin/m68k-uclinux-g++ obj/base64.o obj/main.o obj/sha256.o
-m5307 -o bin/cfbm -Wl,-Map,bin/cfbm.map
ERROR: text=0x1c100 overlaps data=0x0 ?
collect2: ld returned 1 exit status
make: *** [bin/cfbm] Error 1
Surfing the net, i don't find any good explaination to this, and the
common workaround
suggested is to use the CodeSourcery toolchain.
So as a first thing i was wondering if the uclinux "user" folder does
contain some cpp
projects, how do they compile ?
Then i moved to the CodeSourcery toolchain, that i copied from an old
hard disk, since
seems is not free to download anymore, is it ? Are there any alternative ?
With this toolchain strange things happen, until a certain point, adding
code, everything
works fine, program is correctly compiled on my host and executed on the
board. Then,
strangely, as the code increase, the program execution crash (without
errors on console)
and paralize the system. As i remove (comment out) some lines, ini
random places, program
start to work correctly again.
So for now, also the CodeSourcery toolchain solution is not helping me.
I have now the suspect that uClinux itself has not been correctly
configured, or that i am
suffering for my 16MB of ram, even if i see 6,8MB still free before
executing.
~ # cat /proc/meminfo
MemTotal: 13684 kB
MemFree: 6984 kB
Buffers: 16 kB
Cached: 144 kB
SwapCached: 0 kB
Active: 64 kB
Inactive: 48 kB
Active(anon): 0 kB
Inactive(anon): 0 kB
Active(file): 64 kB
Inactive(file): 48 kB
Unevictable: 0 kB
Mlocked: 0 kB
MmapCopy: 412 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 40 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Shmem: 0 kB
Slab: 1292 kB
SReclaimable: 64 kB
SUnreclaim: 1228 kB
KernelStack: 108 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 6840 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
I don't know actually how to move, every help is accepted.
Many thanks,
angelo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20140123/ec296d67/attachment.html>
i have a small board with a coldfire mcf5307, 4 MB flash and 16MB sdram.
I have loaded on it this ucLinux:
~ # cat /proc/version
uClinux version 2.6.36.2 (angelo at angel3) (gcc version 4.6.1 (Sourcery
CodeBench Lite 2011.09-23) ) #122 Fri Dec 14 23:52:01 CET 2012
I am now trying to upload and run a simple c++ program, with just 3
simple classes,
and a main().
Fist issue,
I tried to use the most recent uclinux.org supplied toolchanin
(m68k-uclinux-20101118),
i get :
make
/usr/local/bin/m68k-uclinux-g++ -O2 --pipe -m5307 -Iinclude -Wall -c -o
obj/base64.o src/base64.cc
/usr/local/bin/m68k-uclinux-g++ -O2 --pipe -m5307 -Iinclude -Wall -c -o
obj/main.o src/main.cc
/usr/local/bin/m68k-uclinux-g++ -O2 --pipe -m5307 -Iinclude -Wall -c -o
obj/sha256.o src/sha256.cc
/usr/local/bin/m68k-uclinux-g++ obj/base64.o obj/main.o obj/sha256.o
-m5307 -o bin/cfbm -Wl,-Map,bin/cfbm.map
ERROR: text=0x1c100 overlaps data=0x0 ?
collect2: ld returned 1 exit status
make: *** [bin/cfbm] Error 1
Surfing the net, i don't find any good explaination to this, and the
common workaround
suggested is to use the CodeSourcery toolchain.
So as a first thing i was wondering if the uclinux "user" folder does
contain some cpp
projects, how do they compile ?
Then i moved to the CodeSourcery toolchain, that i copied from an old
hard disk, since
seems is not free to download anymore, is it ? Are there any alternative ?
With this toolchain strange things happen, until a certain point, adding
code, everything
works fine, program is correctly compiled on my host and executed on the
board. Then,
strangely, as the code increase, the program execution crash (without
errors on console)
and paralize the system. As i remove (comment out) some lines, ini
random places, program
start to work correctly again.
So for now, also the CodeSourcery toolchain solution is not helping me.
I have now the suspect that uClinux itself has not been correctly
configured, or that i am
suffering for my 16MB of ram, even if i see 6,8MB still free before
executing.
~ # cat /proc/meminfo
MemTotal: 13684 kB
MemFree: 6984 kB
Buffers: 16 kB
Cached: 144 kB
SwapCached: 0 kB
Active: 64 kB
Inactive: 48 kB
Active(anon): 0 kB
Inactive(anon): 0 kB
Active(file): 64 kB
Inactive(file): 48 kB
Unevictable: 0 kB
Mlocked: 0 kB
MmapCopy: 412 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 40 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Shmem: 0 kB
Slab: 1292 kB
SReclaimable: 64 kB
SUnreclaim: 1228 kB
KernelStack: 108 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 6840 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
I don't know actually how to move, every help is accepted.
Many thanks,
angelo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20140123/ec296d67/attachment.html>