I had written a blog on how to integrate a custom driver into Linux kernel tree previously here. Integrating a custom driver in nuttx kernel is pretty similar. But writing this down would probably be a good idea for any future reference. So below are the steps to follow to integrate a custom driver in nuttx.
I do not have administrative rights on a linux server (openSuse Linux) I am working on right now. So installing anything is not an option or at least an easy option. But I wanted to run cppcheck on my new C++11 source code. Here is what I found to achieve that:
In the earlier post I have explained how to add a kernel module as a new buildroot package. You can check that post here: https://vivekbhadra.wordpress.com/2017/06/15/how-to-addcompile-a-kernel-module-as-a-new-buildroot-package/ In this module I will explain the steps to add a program which is not a kernel module but a user space c program for testing the earlier kernel module.
This blog will try to demonstrate how a python script can be used to automate the running of an external program with data input file located at a particular location.
Lets say we have the below c++ program which reads from a data file called myData.txt located for this example at user home i.e. ~/. The user home is usually /home/<username> for example /home/vbhadra in my case. Use your linux user name instead while trying it yourself. To find out what is your home directory you can use echo $HOME in linux command prompt. Our objective in this blog is to demonstrate the pythoin script which will run any external program binary with data input. So we will have a less focus on the c++ program.