CW10.5 and FNet

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

CW10.5 and FNet

1,200 Views
sandrobilardi
Contributor I


I have developed a project with Fnet library; with CW10.3 is running correctly.

If I compile the same project with CW10.5 and I run the application as soon as

I connect the TCP/IP socke I get an HardFault.

Has anyone noticed something similar? What's new in CW10.5 that can generate

this hard fault?

The project is written for K60.

 

Thanks in advance,

Sandro

Labels (1)
0 Kudos
Reply
3 Replies

1,053 Views
BlackNight
NXP Employee
NXP Employee

Hi Sandro,

what is causing the hard fault?

Keep in mind that the compiler has changed/updated between these releases. Which compiler are you using? GCC or the FSL ARM compiler? And I have seen cases where code generated by a new compiler has uncovered a programming error: so it could be that your FNet sources have a bug (e.g. not properly initializing variabls), but only with the new compiler the bug will cause a crash.

I recommend that you use the ARM gcc compiler, as it is very good to flag such programming errors with warnings during compilation.

I hope this helps,

Erich

FYI on hard faults:

http://mcuoneclipse.com/2012/11/24/debugging-hard-faults-on-arm-cortex-m/

A Processor Expert Component to Help with Hard Faults | MCU on Eclipse

0 Kudos
Reply

1,053 Views
sandrobilardi
Contributor I

Thanks a lot for suggestion! I'm using Gcc compiler

in CW10.5. I Will check warning in building project

but I haven't seen strange Message regarding Fnet files

I'll update with my progress if one!

Regards,

Sandro

0 Kudos
Reply

1,053 Views
sandrobilardi
Contributor I

Hi Erich,

no steps more!

I get the hard fault when the my application calls the "recv" function.

It seems to be an memory access fault, probabily due to a different way of compile the alloc and malloc

function of FNET stack. Same code doesn't generate the problem with CW10.3!

I will go step by step, but during step mode the crash isn't generated, so is difficult to understand

which is the not correct instruction.

Regards,

Sandro

0 Kudos
Reply