WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] TC3.8_4 Real Time Upgrade  (Read 70972 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #195 on: June 04, 2021, 04:17:17 PM »
Hi MTCAT
Try adding a second  CFLAGS+=  line:
Code: [Select]
CFLAGS+= -L/home/tc/24dsi.linux.4.11.91.32.0/24dsi/lib
By the way, I almost copy/pasted this path from your post:
... like CFLAGS++= -I/home/24dsi.linux.4.11.91.32.0/24dsi/lib ?
You left out the  tc  from  /home/tc/24dsi......  That omission caused us problems once before :o.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #196 on: June 04, 2021, 05:29:07 PM »
Hi Rich,

Thanks, gee, I did that again, thanks for catching that. I added the second CFLAGS line but it didn't help, I've attached the Makefile here for you, it's the "LIBS= ../" line that's the problem I think, the Makefile as attached still gives me an error;

gcc: ../lib/24dsi_utils.a: No such file or directory
gcc: ../lib/24dsi_dsl.a: No such file or directory
gcc: ../lib/gsc_utils.a: No such file or directory
make: ***[mt_adc] Error 1

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #197 on: June 04, 2021, 07:57:34 PM »
Hi MTCAT
Try changing the  LIBS =  line to this:
Code: [Select]
LIBS = 24dsi_utils.a 24dsi_dsl.a gsc_utils.a

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #198 on: June 04, 2021, 08:09:19 PM »
Hi Rich,

Thanks for the help but darn-it that didn't work, I suppose it would be bad programming style, but could I just put the whole path in there, like

LIBS = /home/tc/24dsi.linux.4.11.92.32.0/24dsi/lib/24dsi_utils.a, and so on ?

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #199 on: June 04, 2021, 08:12:17 PM »
Hi MTCAT
Sure, give that a try.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #200 on: June 05, 2021, 02:53:30 PM »
Hi Rich,

I made a "lib" directory under /home/tc/mt_adc and pointed the Makefile there for the library files, so that worked (make can find the xxxx.a files now), but now there's a bunch of errors in three functions contained in "adc_control.c", one function called "open_adc", another function called "close_adc", and another called "read_adc", for each function, I get a bunch of errors like,

adc_control.c(.text+0xe): undefined reference to gsc_count_boards

And so on, I wonder if this is where using a different driver (4.11.91.32) is now the issue, perhaps the function names have changed with the new driver ? Need to "update" all the function calls in adc_control.c to the newer named versions ?

And then there's some errors too like the below,

/home/tc/mt_adc/lib/24dsi_utils.a: In function `dsi_close_util':
(.text+0x26): undefined reference to `dsi_close'

And so  on with a bunch of others for 24dsi_utils.a (dsi_init, dsi_ioctl, etc, et) and 24dsi_dsl.a (dsi_close, dsi_init, dsi_ioctl, dsi_open, dsi_read)

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #201 on: June 08, 2021, 09:45:32 AM »
Hi Rich,

Not totally sure yet, still talking with GSC about it, but looks like I will need to build an older version of the 24DSI driver (3.17.52) to get my data acquisition program to work "as-is", either that or modify the acquisition program for the new function calls in the 4.11.92.32.0 driver....

Thanks,

David


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #202 on: June 08, 2021, 04:40:18 PM »
Hi MTCAT
... adc_control.c(.text+0xe): undefined reference to gsc_count_boards ...
I don't see  gsc_count_boards  defined anywhere in the driver source files.

Quote
... and 24dsi_dsl.a (dsi_close, dsi_init, dsi_ioctl, dsi_open, dsi_read)
I see them defined in the  dsi/api  directory in  close.c, init.c, ioctl.c, open.c, and read.c.
According to the  makefile , it creates a  dsi/lib/lib24dsi_api.so  file.
« Last Edit: June 08, 2021, 04:47:07 PM by Rich »

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #203 on: June 08, 2021, 05:56:37 PM »
Hi Rich,

Thanks for the help, I heard back from GSC and the gsc_count_boards function is not present in the new driver, they also said something to the effect that even if I did get the acquisition code to compile, the API has changed such that the acquisition program probably wouldn't work properly. GSC recommends building and using the older 3.17.52 driver, which is what my (former) colleague used (I think anyway).

Unfortunately I don't have the tar file, but I do have the expanded directory structure on my two working receivers, so I think I just need to copy that over to the VortexDX3 and do a "sudo make_all clean" to remove all remnants of the old build, and then a "sudo make_all", make a new extension, and then hopefully the existing "start_24dsi" script will still work ?, or, if I can stop being lazy, just do the same mod's (comment out the if-fi section checking for module existence) and then load up this old driver.

Then hopefully the acquisition program will be happy, fingers crossed. I'm doing the GPS/PPS a bit differently though, with both the NMEA string and PPS over the serial port (ttyS0), whereas before, only the PPS was over the serial port, and NMEA over USB, bso hopefully I just need to change ttyACMO to ttySO for the NMEA string (to get co-ordinate info), so that should be easy hopefully (famous last words).

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #204 on: June 08, 2021, 08:27:14 PM »
Hi MTCAT
... Unfortunately I don't have the tar file, but I do have the expanded directory structure on my two working receivers, ...
So  tar  up the directory:
Code: [Select]
tar -czf 24dsi.linux.3.17.52.tar.gz DirectoryName
Quote
... and do a "sudo make_all clean" to remove all remnants of the old build, and then a "sudo make_all", ...
Shouldn't that be:
Code: [Select]
sudo make clean
sudo make all

Quote
... or, if I can stop being lazy, just do the same mod's (comment out the if-fi section checking for module existence) and then load up this old driver. ...
If you are talking about loading the old precompiled driver, the version string won't match the kernel, so it won't load.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #205 on: June 12, 2021, 12:14:05 PM »
Hi Rich,

I removed the loading of the 4.11.91.32.0 24dsi driver from onboot.lst and then commented out the call to start_24dsi in bootlocal.sh so that I can try to build and install the old 3.17.52.0 driver.

I took all the old driver files off one of my existing receivers and just did a "cp -r" command to copy everything onto the VortexDX3, in /home/tc/24dsi.linux.3.17.52.0

I then changed directory to /home/tc/24dsi.linux.3.17.52.0/24dsi and typed "sudo ./make_all clean" to remove the old build, followed by "sudo ./make_all" .

Unfortunately, I got an error as below

driver===========================================
make:*** /lib/modules/2.6.33.3-l1-rt19/build: No such file or directory. Stop.
make:*** [24dsi.ko] Error 2
Driver loading: 24dsi...
---> ERROR <--- module file does not exist: /home/tc/24dsi.linux.3.17.52.9/24dsi/driver/./24dsi.ko

Would it be enough to simply make a "build" directory, in /lib/modules/2.6.33.3-l1-rt19/build ? Sorry for all the problems with building the 24DSI driver, nothing seems to go "by the book" with the 24DSI.

I attached the "make_all" script for the old 3.17.52.0 drier here as well, it's quite a bit different, seems to dart in and out of the various sub-directories running make commands in each sub-directory, and fails in the driver directory.

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #206 on: June 12, 2021, 12:20:56 PM »
Hi Rich,

Sorry for the type in the "--->ERROR<---- " line, it should be "......3.17.52.0/24dsi/driver/./24dsi.ko"

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #207 on: June 12, 2021, 04:03:58 PM »
Hi Rich,

Sorry for all the chatter, I forgot that I had to make a symbolic link "sudo ln -s /home/tc/linux-2.6.33.3 /lib/modules/2.6.33.3-l1-rt19/build" first, for the driver to build against as Juanito would say, I did that and was able to build the 3.17.52.0 driver just fine !, and it also loaded (inserted) successfully !

Whew, that's a relief, now I can spend the rest of the weekend building the extension and seeing how this version of the "start" program behaves when trying to auto-load, I assume I will need to comment out the "if fi" structure that checks for module existence again, and swap out "insmod" with "modprobe" as well !

I attached the old version (for the 3.17.52.0 driver) of the "start" program here, it's a bit different I think ?

And then, can finally try compiling and running the acquisition code with the old driver !

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #208 on: June 13, 2021, 02:30:44 PM »
Hi Rich,

I got the old driver to auto-install ! !, doing the same mod's we did before to the "start" script ! ! Even better, I was able to get both mt_logger and mt_adc to properly compile too ! !, I had to copy a bunch more header files into place though, but, wow, this is awesome...

In Slackware, when I start the acquisition program, there's an icon on the desktop labeled "MT Logger", I right click on it and then hit execute, after doing that two terminal windows pop up, one for MT_Logger, and another for MT_adc, and then lastly a graphical time series viewer/acquisition setup window pops up over top of the two terminal windows.

I think I need to somehow find out if that icon on the desktop in Slackware is linked to a script file, and then see what's in the script file, in order to properly start the acquisition program ?

I think mt_logger starts first, and then mt_adc starts second.

So I tried to start mt_logger in TinyCore by typing "sudo ./mt_logger" but it (mt_logger) couldn't find a config file it needs, it was looking for "/home/pete/config/mt_logger.conf" and then got a segmentation fault cause of course that directory and file don't exist (I can get the config file off one of my working receivers though).

I looked in a program called "setup.c" in the mt_logger directory and a structure is defined in there, in which a character variable called "filename" exists, but that path above (to the config file) is never shown anywhere, anyway, I just have to figure out some of these types of things and hopefully can get the acquisition code going, this is very exciting, would not have been able to get anywhere this close w/o all your help, thanks a lot, you'll probably be relieved to be almost done with me ! !

Hopefully there aren't any "gotcha's" lurking ahead w.r.t graphical windows type of stuff, I guess we'll see.

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #209 on: June 13, 2021, 04:52:49 PM »
Hi MTCAT
... (mt_logger) couldn't find a config file it needs, it was looking for "/home/pete/config/mt_logger.conf" ...
Are you sure there wasn't a period in front of  config:
Code: [Select]
/home/pete/.config/mt_logger.confYou may get away with sloppy spelling, capitalization, and punctuation in school, but try that with Linux and you'll get schooled.

Quote
... I looked in a program called "setup.c" in the mt_logger directory and a structure is defined in there, in which a character variable called "filename" exists, but that path above (to the config file) is never shown anywhere, anyway, ...
That setup.c could be a stand alone program that creates the config file, or it could be part of  mt_logger  and/or  mt_adc.
Do  mt_logger  or  mt_adc  take any command line arguments:
Code: [Select]
./mt_adc  --helpor
Code: [Select]
./mt_adc  -h