Re: [Hampshire] C development
On 26 June 2014 08:22, Damian L Brasher wrote: > Roger, James, do either of you use Doxygen, or similar? Can you > recommend an efficient way to use such a tool? > > I want to maintain some documentation; graphical visualisation to > present the C code base structure and runtime flow. > > Thank you > Damian > Damian, I have not used such a tool. Doxygen is useful to document each function, but relies on the developer to add it. I don't think doxygen can present pretty graphs of C code base and runtime flow. I am sure there must be some tools that work with CLANG/LLVM to do what you want. The runtime flow is probably called the "control flow graph" or CFG. Also, tools that manipulate, graph the "Abstract Syntax Tree" or AST might also help. So, google for those terms and you should find something. Kind Regards James -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] C development
On Sun, 2014-06-22 at 16:04 +0100, Roger Munford wrote: > On 13/06/14 08:34, James Courtier-Dutton wrote: > >> Then, if you wish to re-implement your program natively, then some > >> things I would do: > >> 1) You won't need assembler any more. > >> 2) Separate out data collection and data visualization into two > >> separate programs. Maybe use a database in between, or it the data > >> rates are too high, use CSV files. > >> 3) There are many data visualization programs already out there, you > >> might not have to do any work in this area. > >> > > If you choose to use DOSBOX, http://www.dosbox.com > > I have some patches that make it work better with data logging applications. > > My patches make the timestamps use the linux system clock, instead of > > DOS "ticks" which can be out by about 10 minutes each day. > > > > If you instead choose to re-write the application, you might wish to > > consider displaying the output in a web browser, ie. write a web app, > > or provide the output via the REST web services protocol. > > You could then display the output on a smart phone, tablet or any > > other web based device. > > > > Kind Regards > > > > James > > > Thank you very much for the suggestions. Sadly I threw away the floppies > with the compiled version of the programme but kept the source so I > can't try it with DOSBOX. I very much like the idea of splitting the > data acquisition and displaying via a web browser for the reasons > outlined. I can imagine that something like sqlite would do for storing > the data because my sampling period will be a few seconds and it would > be easier to manipulate the data. > I am also thinking of using Arduinos for remote data acquisition so that > would fit in nicely. > Roger, James, do either of you use Doxygen, or similar? Can you recommend an efficient way to use such a tool? I want to maintain some documentation; graphical visualisation to present the C code base structure and runtime flow. Thank you Damian -- Area25-5, free Android arcade game port: http://goo.gl/qMziKk -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] C development
On 13/06/14 08:34, James Courtier-Dutton wrote: On 13 June 2014 06:55, James Courtier-Dutton wrote: On 12 June 2014 18:56, Roger Munford wrote: 100 years ago I wrote a data logging programme for DOS which ran on a Sharp pocket PC. It was written in C and assembler. I now have a need for this programme and would like to revive it for use with the Raspberry Pi. I haven't done anything like this for some time and would like some advice on current techniques to get the job done as soon as possible. The first thing is a suitable IDE. I have had some experience with Eclipse but it may be a bit heavyweight for quick results. However if extra effort pays off in the end it might be worth it. I will also need a lightweight graphics library. The original plotted data on the display which was done with functions like drawline(x1,y1,x2,y2) and writechar(x,y,char) etc. That sort of level. Having said that, the Pi has a lot more capability and I could use an existing display package. The data came from various sources, some serial and some small devices which were connected to the parallel port. The smallest timing period was 1 second and I used the timer interrupt to initiate the read commands because there was a lot of processing going on, updating the display and also the logger had a modem attached so that data could be collected remotely. Is this the way to go with linux or is there a better/easier technique. Originally I just recorded the data sequentially in a file but I was wondering if there was any advantage in using something like sqllite. I would be grateful to hear for any advice. Hi, A quick solution would be to use DOSBOX. It can be run on the raspberry pi and runs old DOS x86 programs directly. It has good support for serial ports, not used the parallel support, but it should be ok. Then, if you wish to re-implement your program natively, then some things I would do: 1) You won't need assembler any more. 2) Separate out data collection and data visualization into two separate programs. Maybe use a database in between, or it the data rates are too high, use CSV files. 3) There are many data visualization programs already out there, you might not have to do any work in this area. If you choose to use DOSBOX, http://www.dosbox.com I have some patches that make it work better with data logging applications. My patches make the timestamps use the linux system clock, instead of DOS "ticks" which can be out by about 10 minutes each day. If you instead choose to re-write the application, you might wish to consider displaying the output in a web browser, ie. write a web app, or provide the output via the REST web services protocol. You could then display the output on a smart phone, tablet or any other web based device. Kind Regards James Thank you very much for the suggestions. Sadly I threw away the floppies with the compiled version of the programme but kept the source so I can't try it with DOSBOX. I very much like the idea of splitting the data acquisition and displaying via a web browser for the reasons outlined. I can imagine that something like sqlite would do for storing the data because my sampling period will be a few seconds and it would be easier to manipulate the data. I am also thinking of using Arduinos for remote data acquisition so that would fit in nicely. Thanks again Roger -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] C development
On 13 June 2014 06:55, James Courtier-Dutton wrote: > On 12 June 2014 18:56, Roger Munford wrote: >> 100 years ago I wrote a data logging programme for DOS which ran on a Sharp >> pocket PC. It was written in C and assembler. I now have a need for this >> programme and would like to revive it for use with the Raspberry Pi. >> >> I haven't done anything like this for some time and would like some advice >> on current techniques to get the job done as soon as possible. >> >> The first thing is a suitable IDE. I have had some experience with Eclipse >> but it may be a bit heavyweight for quick results. However if extra effort >> pays off in the end it might be worth it. >> >> I will also need a lightweight graphics library. The original plotted data >> on the display which was done with functions like drawline(x1,y1,x2,y2) and >> writechar(x,y,char) etc. That sort of level. Having said that, the Pi has a >> lot more capability and I could use an existing display package. >> >> The data came from various sources, some serial and some small devices which >> were connected to the parallel port. The smallest timing period was 1 second >> and I used the timer interrupt to initiate the read commands because there >> was a lot of processing going on, updating the display and also the logger >> had a modem attached so that data could be collected remotely. Is this the >> way to go with linux or is there a better/easier technique. >> >> Originally I just recorded the data sequentially in a file but I was >> wondering if there was any advantage in using something like sqllite. >> >> I would be grateful to hear for any advice. >> > > Hi, > > A quick solution would be to use DOSBOX. > It can be run on the raspberry pi and runs old DOS x86 programs > directly. It has good support for serial ports, not used the parallel > support, but it should be ok. > > Then, if you wish to re-implement your program natively, then some > things I would do: > 1) You won't need assembler any more. > 2) Separate out data collection and data visualization into two > separate programs. Maybe use a database in between, or it the data > rates are too high, use CSV files. > 3) There are many data visualization programs already out there, you > might not have to do any work in this area. > If you choose to use DOSBOX, http://www.dosbox.com I have some patches that make it work better with data logging applications. My patches make the timestamps use the linux system clock, instead of DOS "ticks" which can be out by about 10 minutes each day. If you instead choose to re-write the application, you might wish to consider displaying the output in a web browser, ie. write a web app, or provide the output via the REST web services protocol. You could then display the output on a smart phone, tablet or any other web based device. Kind Regards James -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] C development
On 12 June 2014 18:56, Roger Munford wrote: > 100 years ago I wrote a data logging programme for DOS which ran on a Sharp > pocket PC. It was written in C and assembler. I now have a need for this > programme and would like to revive it for use with the Raspberry Pi. > > I haven't done anything like this for some time and would like some advice > on current techniques to get the job done as soon as possible. > > The first thing is a suitable IDE. I have had some experience with Eclipse > but it may be a bit heavyweight for quick results. However if extra effort > pays off in the end it might be worth it. > > I will also need a lightweight graphics library. The original plotted data > on the display which was done with functions like drawline(x1,y1,x2,y2) and > writechar(x,y,char) etc. That sort of level. Having said that, the Pi has a > lot more capability and I could use an existing display package. > > The data came from various sources, some serial and some small devices which > were connected to the parallel port. The smallest timing period was 1 second > and I used the timer interrupt to initiate the read commands because there > was a lot of processing going on, updating the display and also the logger > had a modem attached so that data could be collected remotely. Is this the > way to go with linux or is there a better/easier technique. > > Originally I just recorded the data sequentially in a file but I was > wondering if there was any advantage in using something like sqllite. > > I would be grateful to hear for any advice. > Hi, A quick solution would be to use DOSBOX. It can be run on the raspberry pi and runs old DOS x86 programs directly. It has good support for serial ports, not used the parallel support, but it should be ok. Then, if you wish to re-implement your program natively, then some things I would do: 1) You won't need assembler any more. 2) Separate out data collection and data visualization into two separate programs. Maybe use a database in between, or it the data rates are too high, use CSV files. 3) There are many data visualization programs already out there, you might not have to do any work in this area. Kind Regards James -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] C development
I have used C++ and QT4 to good effect for this sort of task. Tim B. Sent from Samsung Mobile Original message From: Roger Munford Date:12/06/2014 18:56 (GMT+00:00) To: Hampshire@mailman.lug.org.uk Subject: [Hampshire] C development 100 years ago I wrote a data logging programme for DOS which ran on a Sharp pocket PC. It was written in C and assembler. I now have a need for this programme and would like to revive it for use with the Raspberry Pi. I haven't done anything like this for some time and would like some advice on current techniques to get the job done as soon as possible. The first thing is a suitable IDE. I have had some experience with Eclipse but it may be a bit heavyweight for quick results. However if extra effort pays off in the end it might be worth it. I will also need a lightweight graphics library. The original plotted data on the display which was done with functions like drawline(x1,y1,x2,y2) and writechar(x,y,char) etc. That sort of level. Having said that, the Pi has a lot more capability and I could use an existing display package. The data came from various sources, some serial and some small devices which were connected to the parallel port. The smallest timing period was 1 second and I used the timer interrupt to initiate the read commands because there was a lot of processing going on, updating the display and also the logger had a modem attached so that data could be collected remotely. Is this the way to go with linux or is there a better/easier technique. Originally I just recorded the data sequentially in a file but I was wondering if there was any advantage in using something like sqllite. I would be grateful to hear for any advice. Thanks Roger -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk -- -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
[Hampshire] C development
100 years ago I wrote a data logging programme for DOS which ran on a Sharp pocket PC. It was written in C and assembler. I now have a need for this programme and would like to revive it for use with the Raspberry Pi. I haven't done anything like this for some time and would like some advice on current techniques to get the job done as soon as possible. The first thing is a suitable IDE. I have had some experience with Eclipse but it may be a bit heavyweight for quick results. However if extra effort pays off in the end it might be worth it. I will also need a lightweight graphics library. The original plotted data on the display which was done with functions like drawline(x1,y1,x2,y2) and writechar(x,y,char) etc. That sort of level. Having said that, the Pi has a lot more capability and I could use an existing display package. The data came from various sources, some serial and some small devices which were connected to the parallel port. The smallest timing period was 1 second and I used the timer interrupt to initiate the read commands because there was a lot of processing going on, updating the display and also the logger had a modem attached so that data could be collected remotely. Is this the way to go with linux or is there a better/easier technique. Originally I just recorded the data sequentially in a file but I was wondering if there was any advantage in using something like sqllite. I would be grateful to hear for any advice. Thanks Roger -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --