How place big size array in flash memory?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
VlKh_2251656
Level 5
Level 5
10 likes given 5 likes given First like received

Hello.

I use FX3 super speed exploere kit for control display

I want output text

But size of array for fonts is very big

Please, say me, how placr array in flash memory&

Key words PROGMEM and __flash is not using for this chip?

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Are you trying to write to the Flash?

What is the interface of the Flash device?

We do have an example which writes to the Flash over SPI. You can refer to the following example for the same:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamode

In this vendor commands are sent to make the Flash writes.

Please mention if this is not your requirement.

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
5 Replies
VlKh_2251656
Level 5
Level 5
10 likes given 5 likes given First like received

I know that the keyword PROGMEM is used for the AVR GCC compiler, in example.

For FX3 I did not find this keyword

Tell me how to do it right?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Are you trying to write to the Flash?

What is the interface of the Flash device?

We do have an example which writes to the Flash over SPI. You can refer to the following example for the same:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamode

In this vendor commands are sent to make the Flash writes.

Please mention if this is not your requirement.

Regards,

Hemanth

Hemanth
0 Likes
VlKh_2251656
Level 5
Level 5
10 likes given 5 likes given First like received

Yes.

I understand, that FX3 use a ram vevory.

I want asked:

How I can replace array definition to code space from data space?

Or change linker settings (for more data space memory and less code space memory) ?

0 Likes

When you just want to define an array in flash use a definition as

const char YourArray[5] = {0,1,2,3,4};

Bob

0 Likes

As I think, it still leads to overwriting the array from program memory to data memory.

And it turns out double copying.

Is this not so?

0 Likes