Hi All.
I have BeyondStudio for NXP with JN-SW-4168 SDK and JN5168. I'm using a JN-AN-1223-ZigBee-IoT-Gateway-Control-Bridge-v1014 application note as a base for my application.
How can i dynamic memory allocation,if i use func(malloc),Build is fail.
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
make: *** [ZigbeeNodeControlBridge_JN5168.elf] Error 1
I have a similar problem, could you tell me how solve this question?
Hi,
The JN stack doesn't support dynamic memory. You could implement memory pools.
Regards,
Mario
Hi Asd,
Remember the JN-AN-1223 has a very limited RAM memory because the AN needs to support the Zigbee Profiles.
What are the version and the SDK that you are working on?
Mario