Menu

#123 Eclipse-friendly source directory structure for QP/C/C++

QP-C
closed
None
1
2017-08-21
2017-05-25
No

Ecliplse CDT (C Development Tooling) has this very unusual behavior that it automatically takes all files in a given "linked folder". So, if the folder has some files that you don't wish to build, you have to explicitly exclude them from the build. The problem is that if some files are added later on, they will be automatically included next time the Eclipse project is built. As I said, this is highly unusual and annoying, but this is how Eclipse CDT works.

So, I agree with Chinmay that a better QP source code structure would be to have the source code divided into sub-directories with functionality that don't necessarily goes together. For example, the QK kernel functionality should be separate from the QV kernel, which should be separate from the QXK. This is because if you use one kernel, you specifically don't want to use any other kenels.

The main problem with re-organizing the QP source code is backwards compatibility with existing QP applications. Re-organization of QP source code would break any existing project files.

So, as a compromise the next release of QP/C/C++ will contain a second source directory called src, which will contian the following sub-directories:

qpc\
  +-source\  - exitsting source directory with "flat" structure
  |            (for backwards-compatilitiy)
  +-src\     - new source directory grouped by functionality
     +-qf\    - core framework (QEP + QF)
     +-qk\    - QK kernel
     +-qv\    - QV kernel (only one file qv.c)
     +-qxk\   - QXK kernel
     +-qs\    - QS software tracing
     +-qf_pkg.h
     +-qs_pkg.h
     +-qxk_pkg.h

Discussion

  • Quantum Leaps

    Quantum Leaps - 2017-05-25
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,7 @@
    
     The main problem with re-organizing the QP source code is backwards compatibility with existing QP applications. Re-organization of QP source code would break any existing project files.
    
    -So, as a compromize the next release of QP/C/C++ will contain a second source directory called `src`, which will contian the following sub-directories:
    +So, as a compromise the next release of QP/C/C++ will contain a second source directory called `src`, which will contian the following sub-directories:
    
     ~~~
     qpc\
    
     
  • Quantum Leaps

    Quantum Leaps - 2017-08-21
    • status: open --> closed
     
  • Quantum Leaps

    Quantum Leaps - 2017-08-21

    This feature has been implemented in QP/C/C+/nano 5.9.1. The previous source directory has been still preserved for backwards compatiblity, but it will be phased out in the future releases.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB