/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Library link to sprintf

Username:     
Password:     
             

Forum

# 1   2009-06-20 23:36:25 Library link to sprintf

semsem
New member
Registered: 2009-04-01
Posts: 6

Library link to sprintf

Hi,
i'm newbie to ST primer2. i'm building a multi file project. this project includes calls for sprintf. in the start i was building an exe so in the options i can link to sprintf. now i want to use add_to_circle.exe which reads only library files. so now i'm building my whole project as a librayr but i can't link to sprintf. the option is not there any more. when i try to add my library with add_to_circle i get linking errors. so what can i do? how to add a multi file project using add_to_circle?

Thanks in advance

Offline

 

# 2   2009-06-21 07:52:11 Library link to sprintf

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: Library link to sprintf

Hi,

If i remember correct you need to add this file to your project:

C:\Program Files\Raisonance\Ride\Lib\ARM\io_putchar\syscalls.c,

If it is nor working ,try to look back to one of my old posts.

Kasper

Offline

 

# 3   2009-06-22 00:45:26 Library link to sprintf

semsem
New member
Registered: 2009-04-01
Posts: 6

Re: Library link to sprintf

hi,
i have added the file but still got the same problem. if i build it as an application from the link options i can choose small printf and Uart0 putcahr but i can't do it when i'm building a library, how can i tell my library to use the small printf. here is what i get when i try to add my lib to Primer 2:


*** Launching : circle_mgr.exe ATest.lib L S

Circle_Mgr: software for managing CircleOS applications.
Copyright Raisonance 2007.


Connecting to RLink... OK
Connecting to target... OK
      Silicon Revision Id: 0x10016414.
      Option bytes: RDP=0xA5, USER=0xFF, WRP=0xFFFFFFFF
OK
Reading FAT table...
App0: Name=TScrTest,  Addr=0x08006000, Size=8KB.... OK

Linking file Test.lib...
Link Failed (file: 'Test.lib')c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/bin/ld.exe: .\_tmp_.ld.elf section .bss will not fit in region RAM
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed by 2232 bytes
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.csad.text+0xc): undefined reference to `_sbrk'
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-writer.o): In function `_write_r':
writer.csad.text+0x10): undefined reference to `_write'
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-closer.o): In function `_close_r':
closer.csad.text+0xc): undefined reference to `_close'
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.csad.text+0xe): undefined reference to `_fstat'
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.csad.text+0xc): undefined reference to `_isatty'
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.csad.text+0x10): undefined reference to `_lseek'
c:/program files/raisonance/ride/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-readr.o): In function `_read_r':
readr.csad.text+0x10): undefined reference to `_read'
collect2: ld returned 1 exit status

     !!! Error 103: Fatal error detected. Terminating program.
Press any key to continue . . .
===================================================
a lot of messages was talking about this and the answer is simple , use the small printf. HOW CAN I DO THAT FOR A LIBRARY?

can any body please help

Offline

 

Board footer