Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to update to v7.3.4 #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

peterpolidoro
Copy link

Hi. I am attempting to update this library to v7.3.4. I am attempting to migrate away from Arduino, but in the mean time I would love to be able to use the latest version of qpcpp on Arduino projects.

I first wrote a file list of all of the files in v6.9.4 and a little bash script to copy those files from the qpcpp directories to the qp-arduino directory and included those files in qp-arduino to help with future updates. (I do not know if you use scripts to manage copying files between all of your repositories or if you do it by hand, but that must be a lot of work to keep all those consistent!)

I then updated qpcpp to v7.3.4 and ran the bash script to copy the newer versions of the files into the qp-arduino directory. First thing I noticed is that 10 files are missing in the new version of qpcpp. I deleted those 10 files from the qp-arduino directory. I do not know which new files in qpcpp are now necessary in qp-arduino. I also have not yet updated the example files.

I removed qpn_avr since it is obsolete, but I did not update the README or other documentation.

I read that you have a new more complicated kernel that helps when mixing blocking and non-blocking code. This could be very useful for Arduino projects since some libraries use blocking code unfortunately. I would like to be able to add this kernel to the qp-arduino library too if possible.

@quantum-leaps
Copy link
Contributor

Hi Peter,
Thank you for your interest in QP/C++.

As you know, Arduino requires a very specific organization of the "library" code. Consequently, the QP/C++ distribution for Arduino had to be re-packaged and modified to fit the Arduino conventions. Also, the inherent configurability of the QP framework was drastically reduced in the process. For example, only the ARM Cortex-M port was used and only with the simplest, cooperative QV kernel. Also, the QP/Spy software tracing capability of the QP/C++ framework was simply skipped.

Now, the existing qp-arduino repo hasn't been updated for quite a while, so it is falling behind the latest developments in both QP/C++ and Arduino. However, as I recall, the adaptation process for Arduino was non-trivial and I'm not sure if the process can be meaningfully automated.

--MMS

@peterpolidoro
Copy link
Author

I assumed the adaptation process was simply a matter of copying the correct files into a single directory with perhaps some trival modifications to some of the files. If that is not true, then I may be stuck using version 6 of your framework until I migrate away from Arduino.

The only part I tried to automate was the copying of the files to the library directory. When I tried to recreate what you did for version 6 it did not look like there were too many significant changes to the library directory files. I think you added "#include Arduino.h" to one of the files. Perhaps the code in the examples directories needed the non-trivial changes.

@quantum-leaps
Copy link
Contributor

I assumed the adaptation process was simply a matter of copying the correct files...

No, it was more than that. Arduino conventions don't (didn't) support configurability, so the QP/C++ generic code has been combined with the specific code for the CPU (ARM Cortex-M), the kernel (QV) and the compiler (GNU-ARM).

This is not to criticize Arduino. The whole idea is to make it simple for beginners.

--MMS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants