psoc6 flash Addr

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

cross mob
JeHa_3912621
Level 3
Level 3
25 replies posted 10 replies posted 10 questions asked

微信图片_20191119195009.png

why  debug  the  Flash Array  address  start  Sram address 0x08001400.    not  flash address 0x10000000?

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I think what Bob-san was saying is that if you write something like

const uint8_t aFlashBufA[256] = { 0, 1, 2, ... , 255 } ;

the address will be in the flash.

But as you wrote the definition without initial values like

const uint8_t aFlashBufA[256] ;

the variable was moved to writable SRAM area so that initial(?) values can be written.

moto

View solution in original post

2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The variable will only reside in flash when it is initialized together with the const declaration as:

const uint8_t  myFlashVar = 255;

or similarly with an array.

Bob

MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I think what Bob-san was saying is that if you write something like

const uint8_t aFlashBufA[256] = { 0, 1, 2, ... , 255 } ;

the address will be in the flash.

But as you wrote the definition without initial values like

const uint8_t aFlashBufA[256] ;

the variable was moved to writable SRAM area so that initial(?) values can be written.

moto