QuantumLeaps / qpc

QP/C Real-Time Embedded Framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
https://www.state-machine.com/products/qp
961 stars 251 forks source link

remove esp-idf port's use of QF_PTR_RANGE() in qf_port.c #25

Closed gh4emb closed 1 year ago

gh4emb commented 1 year ago

Hi Miro,

In version 7.1.3, to match the updates to the FreeRTOS port and enable successful esp-idf build, it seems:

https://github.com/QuantumLeaps/qpc/blob/b05a831d0ac96404496257a471f3e6b689f14e83/ports/esp-idf/qf_port.c#L671

should change to:

Q_ASSERT_ID(930, (me->start <= fb_next)
                             && (fb_next <= me->end));

and https://github.com/QuantumLeaps/qpc/blob/master/ports/esp-idf/qf_port.c#L618-L619

should change to:

Q_REQUIRE_ID(900, (me->nFree < me->nTot) && (me->start <= b) && (b <= me->end));

quantum-leaps commented 1 year ago

Thanks for reporting. The macro QF_PTRRANGE() has been removed in QP 7.1.3 (because the newer MISRA-C:2012 no longer frowns on pointer comparisons). But the esp-idf port has not been updated accordingly. The problem has been fixed and pushed to the qpc repo. Please check. --MMS

gh4emb commented 1 year ago

Thanks, Miro--this works. My apologies for the delayed response.

-Hal

quantum-leaps commented 1 year ago

Good to hear. This issue is then closed as fixed. --MMS