Writing support packages for TLA Application (for example I2CSPI listing decoders)¶
To set up the minimal MinGW compiler from scratch: 1. Google mingw 2. Go to the obvious site listed - click on downloads which will take you to the sourceforge project page. 3. Navigate into the mingw-get folder and download the latest (as of now it is the only one labeled "beta") 4. Find a tool that can decompress .XZ files. (Never heard of this format until now - but there are utils out there, just google .XZ extension) 5. Uncompress the XZ and De-Tar(Un-tar?) the archive which will be a folder named mingw-get 6. Rename the folder simply MinGW and place at the root directory (C:\MinGW) 7. Add C:\MinGW to the system path as outlined on the MinGW site instructions (Control panels - System Control Panel - Advanced Tab - Environment Variables button - Edit Path) 8. Open a MS-DOS command line window. Simply type: mingw-get install gcc 9. You need an internet connection for the above, of course. The installer will fetch all needed files for C compilation and put them in the right place. Takes about 20 min(I did this on a VirtualBox W2K machine on my MacBook Pro). 10. Now you have all you need to compile these DLLs. To compile one of the example DLLs (I chose I2C from one of the links above) 1. Download all of the files from the I2C branch linked earlier. 2. Put them in a folder named I2C just because 3. Optionally remove or rename the existing DLL supplied (Use it to test against the one you build) 4. Simply type this at the MS-Dos command file(This was extracted from the mingw alternate shell Makefile which is not really needed): gcc -Wextra -Wall -Os -Wno-unused -shared -o I2C.dll I2C.c 5. For me it compiled in less than a second with not a single message to the command shell. 6. My DLL was a bit larger than the supplied one, but that could just be a linking deal or the fact that I used the latest mingw and GCC4 which may add other library stuff to the object file. To use the bus support in the TLA application 1. Create a folder inside C:\Program Files\TLA700\Supports\I2C 2. Inside the folder place either the supplied DLL or your newly built one if you did that. 3. Also put the smaller of the two .tla files in there(The one with "I2C Support Package Instrument Setup" in a string near the top of the file) Fixing possible issues before using: 1. The .tla file assumes a 136 channel module. If yours is less find and replace the two references to 136 and change to, say 102 in my case) 2. If you have less than 102 channels and do not have an A3A2 pod, you may have to do more work in the TLA file, or a change to the code may be necessary - I haven't dug that deep into how this code+DLL/.tla file interaction works yet. 3. Also if you don't have 136 channels - you MUST delete the sections that refer to pod channels you don't have or the application WILL crash when loading! In my case, with 102 channels(TLA5203), I have to delete the sections with CjmProbe "E3E2" and CjmProbe "E1E0". Just like in C, delete the entire statement including the bracketed block of (text?script?code?whatever-it-is?). 4. I also was using application version 4.4 and I believe this .tla was made for/from version 5.1. To get rid of three complaints while loading, I removed bracketed sections referring to "cmToolbarParamSet" as well as "jmTrigOwnerID".