code limit? (IAR + Kinetis + MQX + FNET)

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

code limit? (IAR + Kinetis + MQX + FNET)

Jump to solution
770 Views
master_szumi
Contributor III

Hello.

 

I'm using IAR and developing my project.

 

I've noticed very strange thing - when my code is over 240 000 bytes (code memory), program does not start. When I've just remove any fuction to achieve code limit under 240 000 bytes it works fine. What is wrong?

 

 

IDE = IAR (time limited)

Board = Kintetis K60N512 (tower kit)

Debugger = JLINK

 

Firmware:

FNET bootloader (first 48kb of code)

Application (up to 240 000 bytes works fine)

 

 

 

 

 

 

0 Kudos
1 Solution
416 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

 

Try to add these lines at the beginning of your project code:

 

  FMC_PFB0CR&=~(FMC_PFB0CR_B0DCE_MASK | FMC_PFB0CR_B0ICE_MASK | FMC_PFB0CR_B0DPE_MASK | FMC_PFB0CR_B0IPE_MASK);

  FMC_PFB1CR&=~(FMC_PFB1CR_B1DCE_MASK | FMC_PFB1CR_B1ICE_MASK | FMC_PFB1CR_B1DPE_MASK | FMC_PFB1CR_B1IPE_MASK);

 

It is possible that you have an early silicon in your TWR-K60. There was a bug when crossing flash blocks boundaries.

 

Best Regards,

 

Luis

View solution in original post

0 Kudos
2 Replies
417 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

 

Try to add these lines at the beginning of your project code:

 

  FMC_PFB0CR&=~(FMC_PFB0CR_B0DCE_MASK | FMC_PFB0CR_B0ICE_MASK | FMC_PFB0CR_B0DPE_MASK | FMC_PFB0CR_B0IPE_MASK);

  FMC_PFB1CR&=~(FMC_PFB1CR_B1DCE_MASK | FMC_PFB1CR_B1ICE_MASK | FMC_PFB1CR_B1DPE_MASK | FMC_PFB1CR_B1IPE_MASK);

 

It is possible that you have an early silicon in your TWR-K60. There was a bug when crossing flash blocks boundaries.

 

Best Regards,

 

Luis

0 Kudos
416 Views
master_szumi
Contributor III

Thanks Luis, it works.

 

Solved.

 

Regards

Jakub

 

0 Kudos