cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

Hi

i am working with cyble 22001 ble which has 128 kb flash and 16kb SRAM.

but  due to my code flash size becomes morethan 128kb  and sram becomes morethan 16kb .

If i choose code optimization option then code reduces to less than 128kb but code is not working.

Please help me to resolve the issue

Thanks in advance

0 Likes
Reply
1 Solution
JoMe_264151
Expert II

When after code optimization a program doesn't run anymore check for the following:

Every global variable that is changed within an interrupt handler must be declared as volatile.

Btw: Code optimization can be set on a .c file basis.

Bob

View solution in original post

3 Replies
JoMe_264151
Expert II

When after code optimization a program doesn't run anymore check for the following:

Every global variable that is changed within an interrupt handler must be declared as volatile.

Btw: Code optimization can be set on a .c file basis.

Bob

View solution in original post

RodolfoGL
Employee

If you are using GCC, you can switch to MDK ARMCC. The later does a better job optimizing the code.

RyanZhao
Moderator
Moderator

An application notes about this topic is FYI.

AN89610 - PSoC® 4 and PSoC 5LP Arm® Cortex® Code Optimization

Thanks,

Ryan