Constant Table in FLASH

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

Constant Table in FLASH

ソリューションへジャンプ
569件の閲覧回数
LI_Dave
Contributor III

I've done a fair bit of poking around but haven't found a clear explanation of how to do this.  Has anyone done this and can share their findings?

 

Thanks,

Dave

ラベル(1)
0 件の賞賛
1 解決策
466件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Dave,

we can allocate constant table in flash with code

const int my_const_array[5] __attribute__((section(".myData"))) = {0x11,0x22,0x33,0x44};

here section .myData is in Flash and  is defined in ld file.

see attached for sample code and video.


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
1 返信
467件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Dave,

we can allocate constant table in flash with code

const int my_const_array[5] __attribute__((section(".myData"))) = {0x11,0x22,0x33,0x44};

here section .myData is in Flash and  is defined in ld file.

see attached for sample code and video.


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛