You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting the XC8 optimisation level above level 1 seems to prevent the stack from operating correctly. I've seen this in my custom MCC project and in this demo project, I've tried various XC8 compilers from 2.20 in various modes. What's causing this? I would like to use optimised code as my ISRs take much longer to service without.
This problem probably also affects the other two demo's though I've not had the chance to test this.
The text was updated successfully, but these errors were encountered:
edpgcooper
changed the title
TCP Server Demo will not work with compiler optimisation enabled.
TCP Server Demo does not work with compiler optimisations enabled
Feb 22, 2022
The issue is with the byteReverse32(a) macro in TCPIPLibrary/network.h
For whatever reason it doesn’t produce the correct result with the compiler optimistion, it would byte reverse 192.168.11.246 into 246.11.0.192 this would then cause the ARP packets to be corrupted so the system was unable to resolve IP addresses – and therefore communicate over Ethernet.
I decided to get rid of the macros and just use standard functions instead, I inserted the following functions into Network.c,
Setting the XC8 optimisation level above level 1 seems to prevent the stack from operating correctly. I've seen this in my custom MCC project and in this demo project, I've tried various XC8 compilers from 2.20 in various modes. What's causing this? I would like to use optimised code as my ISRs take much longer to service without.
This problem probably also affects the other two demo's though I've not had the chance to test this.
The text was updated successfully, but these errors were encountered: