This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Newlib, syscall.c and printf


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/09/2011 12:47 PM, Hard Maker wrote:
> If they don't have the right value, that's the problem.
> This work fine. But I suspect  about the stack setup or linker script.
> When I build the aplication if stack space grows, the applicacion grows
> too. Using 64 bytes of stack, the application is 49652 bytes long. When
> the stack is 8192 bytes, the application size is 82164 byte. This is ok?
> I'm not sure, as I see the only diference is the size used in ram, there
> are not diference in application code. But I don't have experience using
> arm or newlib.

I'm assuming you're reporting the output of arm-eabi-size called on your
binary file.
This should not happen. Application size should grow only when
- - more code is added, either by writing new functions or calling
  functions in libraries like newlib. This increases .text
- - more initialized static/global variables are added.
  This increases the copy of .data

Maybe you'd want to have a look at my linker script for stm32:
http://gitorious.org/miosix-kernel/miosix-kernel/blobs/master/miosix/arch/cortexM3_stm32/stm32f103ze_stm3210e-eval/stm32_512k+64k_rom.ld

I't a bit complex because it has to support C++ as well as C, and is
designed for an OS kernel, but you might find it useful.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNUqRwAAoJECkLFtN5Xr9fy9oH+gMbrfGJBbLPQkQ8dk1JEj8Z
1RV7yIDWq3cZCho+UH+MY8oburEFpMx4E+8VSnWcokQNCG8YMa0dHncLwjELkgSP
0h/21wbmRyXPlAiZX7N0497gcWd1wDa+MmlZfv8aotYALP9q7QlD7mntZIlD2ped
795k1f61UUAy+y1O83xlzcpO1ZXeRGikMNNic5i6g7mJHHTXWNjkBZXy2N30WXZo
dYxgw5wTuMcuNkjdu/jdwlvgL3UQyeHnpli9/G7zVZP0EDyIzmIGlAL6LkdVuPO7
ZF1gSoWakH4xjVLdtBFMOBx8fasGYKsAOHX3GxnmokQGJMaIgF77HclD82ixXJw=
=jIFo
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]