How do I change the SFLASH size in PSoC Creator 3.3

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

cross mob
shrac_2642471
Level 4
Level 4
5 likes given First like received First like given

Hi All,

I see that the PSoC Creator has as SFLASH size as 4k Bytes as is defined by the following -->

#define CYDEV_SFLASH_BASE 0x0ffff000u

#define CYDEV_SFLASH_SIZE 0x00001000u

Now I want to use only say 1000 bytes here. How do I do this ? Is it possible or not ? If possible how do I achieve it. Because every time I recompile it becomes 4k Again.

0 Likes
1 Solution
6 Replies
Anonymous
Not applicable

The size of the SFlash is set based on the device you are using; If you only want to use part of the SFlash, why not just use only part of it? I'm confused why you are wanting the compiler to lie to you and say that the SFlash is smaller than it is. (SFlash is separate from code/program space)

0 Likes

Hi E.Pratt

Basically my code is already using 92% of 256kb flash. I was under the impression that SFlash is also a part of this 256kb flash. If it is not a part of this, then I don't think I can get anything out of this memory.

I am not using the entire 4K flash. I am just using like maximum 100 bytes or something in this SFlash.

If you tell me that SFlash is different, then I will update my strategy.

Regards,
Shrey

0 Likes

The Sflash is different from flash.

First approach when running short of flash is to set the build option from "Debug" to "Release" which will use some optimization.

Bob

Hi Bob,

Thanks for answering. Yes, sure.

So my flash size is 256kBytes. How much would be the SFlash size ?


Regards,
Shrey

0 Likes

And the PSoC generated code says this -->

#define CYDEV_SFLASH_BASE 0x0ffff000u

#define CYDEV_SFLASH_SIZE 0x00001000u

So What is the size of the SFLASH

0 Likes