AnsweredAssumed Answered

How can i use sprintf in JN5168

Question asked by xu bovey on Nov 12, 2017
Latest reply on Mar 23, 2018 by asd asd

when i use sprintf and sscanf function. i get some errors as following:

and i have tried: JN5168, eclipse and atof 

Added an entry in .bss before the close } as

_end = (.)

 

Then in .stack, added a line before the close } as

_stack = (.)

 

but it not work. what should i do to make it work well. thanks~

 

 

Linking Coordinator_JN5168.elf ...
/c/NXP/bstudio_nxp/sdk/JN-SW-4163/../Tools/ba-elf-ba2-r36379/bin/ba-elf-gcc -Wl,--gc-sections -Wl,-u_AppColdStart -Wl,-u_AppWarmStart -TApp_Stack_Size.ld -march=ba2 -mcpu=jn51xx -mredzone-size=4 -mbranch-cost=3 -fomit-frame-pointer -Os -fshort-enums -flto -nostartfiles -L/c/NXP/bstudio_nxp/sdk/JN-SW-4163/Chip/JN5168/Build -L/c/NXP/bstudio_nxp/sdk/JN-SW-4163/Chip/JN5168/Library -L/c/NXP/bstudio_nxp/sdk/JN-SW-4163/Platform/DK4/Library -L/c/NXP/bstudio_nxp/sdk/JN-SW-4163/Components/Library -L/c/NXP/bstudio_nxp/sdk/JN-SW-4163/Stack/MAC/Build -TAppBuildMac.ld -o Coordinator_JN5168.elf ...... .o -Wl,--start-group -lAppApi_JN516x -lMAC_JN516x -lTimerServer_JN516x -lTOF_JN516x -lXcv_JN516x -lAes_JN516x -lHardwareApi_JN516x -lMicroSpecific_JN516x -lBoot_JN516x -lPDM_EEPROM_JN516x_NO_RTOS -lBoardLib_JN516x -Wl,--end-group -Wl,-Map,Coordinator_JN5168.map
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:77: multiple definition of `_sbrk'
C:\Users\xubov\AppData\Local\Temp\ccJW4fKI.ltrans4.ltrans.o:ccJW4fKI.ltrans4.o:(.text+0xafb): first defined here
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':
glue.c:(.text+0x179): undefined reference to `end'
glue.c:(.text+0x18e): undefined reference to `_stack'
glue.c:(.text+0x197): undefined reference to `_stack'
glue.c:(.text+0x197): relocation truncated to fit: R_BA_8 against undefined symbol `_stack'

Outcomes