C SDK Tips and Tricks

From Learn @ Cemetech
Revision as of 19:08, 27 August 2016 by Unicorn (talk | contribs) (Created page with "==Setting up the SDK on linux== This section will help you set up the C SDK on linux. It is best to do it in this same order, but that is your choice. ===Files=== ---- Downloa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Setting up the SDK on linux

This section will help you set up the C SDK on linux. It is best to do it in this same order, but that is your choice.

Files


Download the C toolchain here.

Extract it wherever you want, though putting it in the home directory is easiest.

Environment Variables


- Open your ~/.bashrc file. (It is a hidden file in your home directory, [Ctl + H] to make it visible)

- Add these lines to the end of the document:
export PATH=$PATH:~/CEdev/bin/
export CEDEV=~/CEdev/

- If you extracted CEdev to somewhere else other than your home, change the paths to that location. Keep in mind that CEDEV needs to point to the Cedev folder, and PATH needs to point to the CEdev/bin folder.

Setting up the Template makefile


Once you have the Environment Variables set up, create a New folder where you will put all of your projects. (I put mine in CEdev/Programs)

Once you have that folder, go into CEdev/examples and copy template.

Paste the template in your programs folder.

Open it up and edit the makefile.

It should look something like this: http://pastebin.com/N7K4ppBD

Edit TARGET ?= DEMOT and replace DEMOT with your program name.

Keep DEBUGMODE ?= as NDEBUG until you decide to use the Debug features in your program.

The others are pretty self explanatory, and the comments at the top of the file will help with explanation.

You will want to add graphx fileioc keypadc to L := to be able to use the libraries.

That is just about everything you need to know about the makefile