JN-SW-4141 and JN-AN-4168 SDK do not support function "sprintf"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JN-SW-4141 and JN-AN-4168 SDK do not support function "sprintf"

861 Views
ls_ubuntu
Contributor I

c:/nxp/bstudio_nxp/sdk/tools/ba-elf-ba2-r36379/bin/../lib/gcc/ba-elf/4.7.4/../../../../ba-elf/lib/mcpu_jn51xx_sizeopt\libc.a(lib_a-glue.o): In function `_sbrk':
/ba_toolchain/r36379/source/gcc-4.7.4-ba-r36379-build/ba-elf/mcpu_jn51xx_sizeopt/newlib/libc/sys/basim/../../../../../../../gcc-4.7.4-ba-r36379/newlib/libc/sys/basim/glue.c:75: undefined reference to `end'
/ba_toolchain/r36379/source/gcc-4.7.4-ba-r36379-build/ba-elf/mcpu_jn51xx_sizeopt/newlib/libc/sys/basim/../../../../../../../gcc-4.7.4-ba-r36379/newlib/libc/sys/basim/glue.c:75: undefined reference to `_stack'
/ba_toolchain/r36379/source/gcc-4.7.4-ba-r36379-build/ba-elf/mcpu_jn51xx_sizeopt/newlib/libc/sys/basim/../../../../../../../gcc-4.7.4-ba-r36379/newlib/libc/sys/basim/glue.c:75: undefined reference to `_stack'
/ba_toolchain/r36379/source/gcc-4.7.4-ba-r36379-build/ba-elf/mcpu_jn51xx_sizeopt/newlib/libc/sys/basim/../../../../../../../gcc-4.7.4-ba-r36379/newlib/libc/sys/basim/glue.c:75:(.text+0x197): relocation truncated to fit: R_BA_8 against undefined symbol `_stack'
collect2.exe: error: ld returned 1 exit status

0 Kudos
4 Replies

598 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi

You can use DBG_vPrintf(TRUE, "Initialising ...");

Include the "dbg.h" file

Regards,

Mario

0 Kudos

598 Views
ls_ubuntu
Contributor I

hi 

thank you for answer, but I have use the UART0 for DBG, I want  use sprintf to combine string and transmit using UART1

0 Kudos

598 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Liushuai,

You can set the DBG for the UART1 as well and transmit data.

You can not use the DBG for both UARTs.

Regards,

Mario

0 Kudos

598 Views
ls_ubuntu
Contributor I

thanks your help, but I have use the UART0 for DBG to print Dubeg infomation ,I need to use UART0 and UART1 simultaneously

0 Kudos