FANDOM


How to compile your C file into an executable for TS-7260 embedded linux processor on KDE-Ubuntu:

  1. Copy any Makefile and change the name in all places to what your file is named. Typical convention is lower case is source file and all caps is the compiled executable file. The ***.c must have the same name as the ***.o file (ie superprogram.c and superprogram.o, but can use SUPERPROGRAM as the executable, or TREESARECOOL. Unless you're making multiple executables to compare, the convention we will follow is the executable file's name is the code file's name in caps)
  2. Open Konsole (type Konsole in search) and navigate to folder containing both source file and makefile. Type make. (Navigate using cd [foldername] tp change directory. Use ls to list folder contents to see what folders are available. Use cd .. to move up a folder). Hopefully there won't be any warnings, but there might be... read what is says and try to fix it. You can't go any farther until it compiles
  3. Once it compiles properly, plug in the serial cable to the computer and attach a null modem adapter at the free end. Plug this end into the microcontroller. Also plug in the power cable to the microcontroller. Lights will flash.
  4. Ensure file permissions are "read, write, execute" on the code file you're about to upload (can change this in Dolphin, or $ chmod og+rwx filename
  5. (Suggestion) open a new Konsole for new processes and keep this one for compiling.
  6. Type minicom . Make sure the baud rate is set to 115200. To change it press and hold control + a and tap p within minicom.
  7. Type root . Now you are connected to the microcontroller via minicom.
  8. Type lrz .This sets the microcontroller up to receive a file.
  9. Now comes some fancy keyboard skills: Press and hold control + a, then tap s.
  10. Choose zmodem
  11. Navigate to the folder containing your compiled file. Use the spacebar to select a folder or file (may not work all the time?). Use the arrow keys to select Okay at the bottom, then press Enter. If it says Transfer Incomplete, the file probably already exists on the microcontroller. To view the files on the microcontroller type ls. If it is there use rm [filename] to remove the file. Then try again (don't forget to type lrz again!).
  12. If you have problems, unplug and replug the power to the microcontroller and lots of words will appear like magic as the microcontroller boots! Then start again from step 6.
  13. To run the file, type ./[filename] If there is a permission denied error, type chmod og+rwx [filename] . This changes the file permissions to hopefully work. Google it if you're curious about details.
  14. Tadaaaah :) Good work. We wish you luck in the program actually working and not giving you segfaults...


Sidenote, the code from 2010 has Servo select: DIO1 to pin8, DIO2, pin2 to ground, pin to PWM. Most files are in ~/Documents, PWM control code is in ~/Documents/MAST_Software/XDIO/xdio

Serial PortsEdit

http://tldp.org/HOWTO/Serial-Programming-HOWTO/index.html is an excellent reference on Linux serial port programming

http://gpsd.berlios.de/ GPS NMEA serial service handler for linux

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.