Instructions to setup C compilers¶
Here we describe several options how to install and/or use C compilers in this course.
These instructions apply to virtual machines (VM) installed into department computer classrooms (TS 137, TS135, etc.).
For C- and assembly exercises, you have VM called TKJ_harjoitukset. You can find the VMs from the Windows Start-menu under "VM Images".
- C compiler gcc and text editor kate has been setup in the VM
- On the left hand side, you can start Web browser (firefox), text editor (Kate) and a terminal window
Installing C compiler¶
These instructions explain how to install a C compiler in your own computer.
- Download from mingw-w64.
- During installation select architecture: x86_64
- Otherwise just click Next
- After mingw jas installed, navigate to the installation directory and run
mingw-w64.bat. This will setup the needed environment variables
- Finally check tne installation by opening command prompt and typing
gcc --version. Now you should see gcc version information.
mingw-w64 is just the compiler. You may also to install a development environment. There are several options.
- Eclipse CDT
Install gcc through your Linux distribution.
- Debian / Ubuntu:
sudo apt-get install gcc
- RHEL: Fedora, CentOS, etc. use
- Gentoo: use command
- Arch linux: use command
- Open a terminal program (such as konsole, gnome-terminal, urvxt, xterm, ...)
gcc --versionto check that gcc is installed.
- Install XCode. You may need an Apple user account.
- Install Homebrew by following the site intructions
- Open a terminal window
- Type command
brew install gcc.
- Type command
gcc --versionto check that installation is ok.
Online C Compilers¶
Try google search with keywords c online compiler.
For example Codepad seems to work.
Moving files between computers¶
Use USB memory stick.
Your home directory on the university servers can be seen as drive K:
If you use VM machines in the classrooms, make sure you copy your C program files into somewhere else before shutting down the machine!!
scpto move files from the VM to your home directory, with command
scp filename1 filename2 filename3 firstname.lastname@example.org:.
For moving files between your home computer and classroom computers. Check the instructions here.
Programming the embedded device¶
In the course, we are using TI Cloud platform with a Web browser to program the SensorTag device. This environment has been set up already into classroom workstations and can be used with Chrome browser. The setup does not work with other browsers.
At home or with your laptop, you can also use the Code Composer Studio-development environment. This program requires license, which is provided through the course device SensorTag.
Don't worry about this setup yet, you will learn how to program the device in the obligatory laboratory exercise!