Goodmorning,
I'm using imxrt1064-evk demo board and SDK version 2.9.1. I'm using optimize most (-O3) and linktime optimization flag enabled since we need the maximum performance.
Our main objective consists of sending raw ethernet frames. In order to do that, at first I tested the LWIP tcp raw echo example from the SDK and it worked perfectly. Then, reading lwip code, I didn't find any ready to use functions to send raw packets, hence I wrote some code on my own for this purpose.
When I try my custom functions, I get the error:
Thread #1 1 (Suspended : Signal : SIGHUP:Hangup)
HardFault_Handler() at 0x7000af40
<signal handler called>() at 0xffffffe9
But, if I untick the linktime optimization flag, the error doesn't happens and the code that I wrote, works.
I've got two questions:
- Why does the error happen only with optimization flag enabled?
- Is it correct to state that lwip doens't provide the possibility to send raw frames?
Thank you in advance.
Regards,
Davidino