bin file as an array

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

bin file as an array

869件の閲覧回数
jjr_net
Contributor I

hello,

There is a bin file, which is treated as normal data.Now, to build a project in the IDE of S32DS, how can this project directly take out the data in bin file and use the bin file as an array?

thank you!

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

722件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

the simplest way is add the binary file on specific address by linker script. Something like: 

MEMORY

{

 m_bindata              (RX)  : ORIGIN = 0x00007FF0, LENGTH = 0x000002FF

.

.

.bindata :
{
KEEP(*(.bindata))

} > m_bindata

and include the binary data in some .S file - for example - startup.S :

.section .bindata, "a"
.incbin "data.bin"

Hope it helps. 

Jiri 

0 件の賞賛
返信