how to use a separate flash as a read-only data storage? So both cores can be read.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to use a separate flash as a read-only data storage? So both cores can be read.

671 Views
superliyou
Contributor I

In addition to the core 1 imag, how to use a separate flash as a read-only data storage? So both cores can be read. And burn it to flash with two core imags. Is there such an example?

0 Kudos
2 Replies

670 Views
superliyou
Contributor I

I tried to do it, but it didn't work.  Use Keil MDK , Here are my specific steps

1,in the scat file,define a section

#define m_core1_image_start 0x00072000
#define m_core1_image_size 0x00024000

#define m_read_data_start 0x00096000
#define m_read_data_size 0x00002000

LR_CORE1_IMAGE m_core1_image_start m_core1_image_size + m_read_data_size {
CORE1_REGION m_core1_image_start m_core1_image_size {
* (.core1_code)
}
READ_DATA m_read_data_start m_read_data_size {
* (.read_data)
}
}

2,in fsl_incbin.s  

#if defined(__CC_ARM)

AREA core1_code, DATA, READONLY, PREINIT_ARRAY, ALIGN=3
EXPORT core1_image_start
EXPORT core1_image_end
core1_image_start
INCBIN core1_image.bin
core1_image_end

AREA read_data, DATA, READONLY, PREINIT_ARRAY, ALIGN=3
EXPORT read_data_start
EXPORT read_data_end
read_data_start
INCBIN read_data.bin
read_data_end
END

3, read_data.bin file is placed in the same path as core1 imag

0 Kudos

665 Views
superliyou
Contributor I

I got it. The data bin file that I want to put into flash must be a separate assembly file.

0 Kudos