How can I use __rt_lib_init(x,y) to make my sprintf() work well?
===

first I have problem with atoi on arm platform (my project use xmain() not __main.)

http://stackoverflow.com/questions/11518773/how-can-i-make-atoi-work-in-my-ads-project

I follow arm offical info.
so add "setlocale(LC_ALL,"C");" make atoi work well.
but another problem not correct,My sprintf function cause things wrong.
1.project works fine when axd debug,but download to nand,some code not work.some globle buffer was change.
2.when I mask sprintf in my code,problem gone.

my code linker meesage:
link type :simple ,RO base 0x30000000,
================================================================================

    Total RO  Size(Code + RO Data)               136557 ( 133.36kB)
    Total RW  Size(RW Data + ZI Data)            464067 ( 453.19kB)
    Total ROM Size(Code + RO Data + RW Data)     176243 ( 172.11kB)

================================================================================

menu_man_ctrl_cfg.c (code not work) obj info here

E:\project\dcs-os\app\src\menu\menu_man_ctrl_cfg.c 0x00000000   Number         0  menu_man_ctrl_cfg.o ABSOLUTE
    .text                                    0x30007dc0   ARM Code       0  menu_man_ctrl_cfg.o(.text)
    .data                                    0x3002aaf0   Data           0  menu_man_ctrl_cfg.o(.data)
    .data                                    0x3002ab21   Data           0  menu_man_ctrl_cfg.o(.data)
    .data                                    0x3002ab03   Data           0  menu_man_ctrl_cfg.o(.data)
    .data                                    0x3002ab12   Data           0  menu_man_ctrl_cfg.o(.data)
    .bss                                     0x300332ec   Data           0  menu_man_ctrl_cfg.o(.bss)
    .constdata                               0x30020854   Data           0  menu_man_ctrl_cfg.o(.constdata)
    .data                                    0x3002aaf4   Data           0  menu_man_ctrl_cfg.o(.data)

my stack info in init_2440.s here

_STACK_BASEADDRESS	EQU 0x33ff8000
;The location of stacks
UserStack   EQU (_STACK_BASEADDRESS-0x3800)  ;0x33ff4800
SVCStack    EQU (_STACK_BASEADDRESS-0x2800)  ;0x33ff5800
UndefStack  EQU (_STACK_BASEADDRESS-0x2400)  ;0x33ff5c00
AbortStack  EQU (_STACK_BASEADDRESS-0x2000)  ;0x33ff6000
IRQStack    EQU (_STACK_BASEADDRESS-0x1000)  ;0x33ff7000
FIQStack    EQU (_STACK_BASEADDRESS-0x0000)  ;0x33ff8000

so if I must use __rt_lib_init(x,y) to initialize c library,which x & y I should use?and where to add this code?