JN5168 dynamic memory allocation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

JN5168 dynamic memory allocation

1,256件の閲覧回数
小鹏陈
Contributor II

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.

pastedImage_1.png

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

タグ(2)
0 件の賞賛
返信
3 返答(返信)

963件の閲覧回数
qidongli
Contributor II

I have a similar problem, could you tell me how solve this question?

0 件の賞賛
返信

963件の閲覧回数
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

The JN stack doesn't support dynamic memory. You could implement memory pools.

Regards,

Mario

0 件の賞賛
返信

963件の閲覧回数
mario_castaneda
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信