Specific migration from OS-ii to OS-iii (for QP/C)

Specific migration from OS-ii to OS-iii (for QP/C)

Home Forums Real-Time Kernels Specific migration from OS-ii to OS-iii (for QP/C)

This topic contains 1 reply, has 2 voices, and was last updated by  Michael Dean 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26160

    Hans-Jörg Wagner
    Participant

    In our company, we got excellent experience and an increase of design quality by using Quantum Leaps QP/C Framework. But now, we will shift to a new OS (from QPnano).
    Quantum Leaps provides a port for uCOS-ii and I tried to migrate it to uCOS-iii (more precisely MicriumOS for a Giant Gecko platform).

    As expected, I’ve got plenty of compiler errors. Thus, I used the checklist found here:
    https://doc.micrium.com/display/osiiidoc/Migrating+from+uC-OS-II+to+uC-OS-III

    However, to follow/fix the API changes, you have to dig quite deep into implementation details. I would like to discuss one example, probably posting other ones in the future. Depending on the feedback from this discussion.

    The example:
    <migration guide>
    <OS-ii>
    OS_MEM * OSMemCreate(void *addr, INT32U nblks, INT32U blksize, INT8U *perr);
    </OS-ii>
    <OS-iii>
    void OSMemCreate(OS_MEM *p_mem, CPU_CHAR *p_name, void *p_addr, OS_MEM_QTY n_blks, OS_MEM_SIZE blk_size,
    OS_ERR *p_err);
    </OS-iii>
    </migration guide>

    The question: How should I rewrite following code ?

    // Macro definition using OSMemCreate
    #define QF_EPOOL_INIT_(pool_, poolSto_, poolSize_, evtSize_) do { \
    INT8U err; \
    (pool_) = OSMemCreate((poolSto_), (INT32U)((poolSize_)/(evtSize_)), \
    (INT32U)(evtSize_), &err); \
    Q_ASSERT(err == OS_ERR_NONE); \
    } while (0)

    // Macro call in QP/C framework
    QF_EPOOL_TYPE_ QF_pool_[QF_MAX_EPOOL];

    void QF_poolInit(void * const poolSto, uint_fast32_t const poolSize, uint_fast16_t const evtSize)
    {
    QF_EPOOL_INIT(QF_pool_[QF_maxPool_], poolSto, poolSize, evtSize);
    }

    Regards
    Hans-Jörg

    #26179

    Michael Dean
    Keymaster

    Hi Hans-Jorg,

    You mentioned that

    Quantum Leaps provides a port for uCOS-ii and I tried to migrate it to uCOS-iii (more precisely MicriumOS for a Giant Gecko platform).

    Are you migrating from uC/OS-II to uC/OS-III? Or are you trying to use the MicriumOS software that is part of the Gecko Simplicity Studio platform? If you are try to follow the latter you are actually upgrading from uC/OS-II to OS-V so it’s not going to be as simple a migration as compared to going from II to III.

    Looking through os_mem.c from OS-II I do not see any of the macro’s you listed above so I’m not sure of their content.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

View the complete site map

x
Loading...