my code works once !

hi all

I've worked with tcp library with 4.2 version without any problem

now i switched to 4.7 version

when i program my code it works properly (answer my ping)

but when i turn it off and on (reset) it doesn't answer my ping !

thank

Parents
  • I very seldom use a debugger.

    Most times, I settle for asserts and suitable printouts.

    When something doesn't work, it is almost always possible to just read the code, predict the behaviour and then add specific instrumentation to prove the assumption before the problem is fixed and fix tested.

    So it helps to have a processor with some extra code space to allow extra instrumentation in special debug builds for some extra printouts.

    But it really is preferable if the live hardware have capacity enough to also contain defensive code, looking for unexpected states and then performing some recover actions or maybe full resets.

    After all, code should be written for staying up and running for years - basically until next time there is a power loss or someone decides to upgrade the firmware with some new functionality.

Reply
  • I very seldom use a debugger.

    Most times, I settle for asserts and suitable printouts.

    When something doesn't work, it is almost always possible to just read the code, predict the behaviour and then add specific instrumentation to prove the assumption before the problem is fixed and fix tested.

    So it helps to have a processor with some extra code space to allow extra instrumentation in special debug builds for some extra printouts.

    But it really is preferable if the live hardware have capacity enough to also contain defensive code, looking for unexpected states and then performing some recover actions or maybe full resets.

    After all, code should be written for staying up and running for years - basically until next time there is a power loss or someone decides to upgrade the firmware with some new functionality.

Children
More questions in this forum