Hi David,
I increased the stack size all the way to 690000 using the below command
but still got the same error.
*m68k-uclinux-flthdr -s 690000 hello*
On increasing the to 699359 the below output was obtained:
*Allocation of length 1051602 from process 44 failed
DMA per-cpu: empty
DMA32 per-cpu: empty
Normal per-cpu:
cpu 0 hot: high 0, batch 1 used:0
cpu 0 cold: high 0, batch 1 used:0
HighMem per-cpu: empty
Free pages: 2392kB (0kB HighMem)
Active: 124 inactive:212 dirty:0 writeback:0 unstable:0 free:598
slab:455 mapped:0 pagetables:0
DMA free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB
present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 8 8
DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB
present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 8 8
Normal free:2392kB min:360kB low:448kB high:540kB active:496kB
inactive:848kB present:8192kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
HighMemfree:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB
present:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: empty
DMA32: empty
Normal: 0*4kB 1*8kB 1*16kB 0*32kB 1*64kB 0*128kB 1*256kB 0*512kB
0*1024kB 1*2048kB 0*4096kB = 2392kB
HighMem: empty
Unable to allocate RAM for process text/data, error 12*
The current settings are:
*hello
Magic: bFLT
Rev: 4
Build Date: Fri Apr 20 10:51:39 2007
Entry: 0x48
Data Start: 0x4e200
Data End: 0x54ab0
BSS End: 0x55f90
Stack Size: 0xaabdf
Reloc Start: 0x54ab0
Reloc Count: 0xf4
Flags: 0x6 ( Has-PIC-GOT Gzip-Compressed )*
I am still unable to execute the simple program.
Thanks,
Praveen C
David Wu wrote:
On Fri, 20 Apr 2007 14:51:47 -0400, Praveen Chandrasekharaiah
<[EMAIL PROTECTED]> wrote:
Hi,
I am trying to run a simple C++ application on uClinux 2.6.16 on a
M5272C3 board. The program is:
*#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
cout << "Hello this is my First uClinux C++ Application\n" << endl;
return 0;
}
*
The following command was used to cross compile the above program:
*m68k-elf-g++ -Wl,-elf2flt=-z -m5307 -msep-data -o hello hello.cpp
-lstdc++ -lc -lgcc*
On executing the program i got the following error:
*Support for ZFLAT executable is not enabled
Shell invoked to run file: ./hello
Command:bFLT
bFLT: Bad command or file name*
So i enabled the ZFLAT flag in */linux-2.6.x/.config:
CONFIG_BINFMT_ZFLAT=y*
Now on executing i get the following error:
*BINFMT_FLAT: reloc outside program 0xe70b2385 (0 - 0x55f54/0x4e1c0),
killing hello!*
you need to increase stack size (default is 4k I believe)using FLTFLAG
= -s NNNN to build your binary
or using flthdr -s NNNN to change the stack size,. where NNNN is the
new stack size
ex. flthdr -s 40000 hello (40000 bytes for the stack)
--David Wu
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev