Skip to content

Instantly share code, notes, and snippets.

@krish-iyer
Created September 29, 2019 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krish-iyer/e38423551abc204bfe7cf45d98f207a7 to your computer and use it in GitHub Desktop.
Save krish-iyer/e38423551abc204bfe7cf45d98f207a7 to your computer and use it in GitHub Desktop.

Before programming any microcontroller we require few tools(both hardware and software) to get our programme into the programme memory of the microcontroller. In the end every code or data is readable by the microcontroller or any processor in binary format but it's very much time consuming and difficult at the same time to write instructions in binary. So we use high-level language and then convert into binary lastly burn into the microcontroller. You can write the second stage programme that's assembly and even that requires an assembler.

So things we need

  1. Editor -> where you write your programme
  2. Compiler and build tools -> To convert high-level or assembly code to binary(it's very architecture specific)
  3. Debugging tools -> (only if your dev board supports) to look into the memory and control flow of programme etc.

Hence managing all these things differently is going to be messy so we have something called IDE(integrated development enviornment) which integrates all the above mentioned things in a single software enviornment, it just make programmer's life easy. For TI microcontrollers and processors there's IDE called Code Composer Studio.

Installing Code Compose Studio

Follow the link : CCSTUDIO

You can download any version of CCS which supports C2000 processor tools and perferably select offline installer unless you have a very good internet connection.

Control SUITE

Control SUITE provides us whole set firmware APIs, example codes etc which we can directly include in our programme without hitch on the way.

Follow the link: CONTROLSUITE

Initial setup

Once you are done with downloading CCStudio and ControlSUITE, you can just install CCStudio like any other software you install on windows or linux and exact ControlSUITE.

Once you are done with that go ahead and start application!

Creating Project and linking files

Click on File->New-> Project -> Code Composer Studio -> CCS project and finally click on Next.

Select Target as 2802x Piccolo and Experiment's kit - Piccolo F28027.

You can leave connection as it is, it will later be detected, if you are not sure about your connection.

Select Empty Project (with main.c) and click on Finish

Writing a programme for F28027 is not in the scope of the post so you have to copy paste an already written code from here. This a LED blinking programme on each press of a push button.

Now right click on the project in the project explorer and click on the properties

Navigate to include options and add include search path as C:\ti\controlSUITE\device_support\f2802x\v220.

Note: I have installed ControlSUITE in C:\ti.

Delete existing 28027_RAM_Ink.cmd

Now again right click on project files and add following files and either click on Link Files and Copy Files according to user preferance.

C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_headers\cmd\F2802x_Headers_nonBIOS C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_headers\source\F2802x_GlobalVariableDefs C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_common\cmd\28027_RAM_Ink.cmd C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_common\source\f2802x_asmfuncs.asm C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_common\source\f2802x_codestartbranch.asm C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_common\source\f2802x_dbgier.asm C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_common\source\f2802x_piecntrl.c C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_common\source\f2802x_pievect.c C:\ti\controlSUITE\device_support\f2802x\v220\f2802x_common\source\f2802x_sysctrl.c

Build and Debugging

After adding all the files, click on hammer like icon on topbar if everything goes well it will printout a message "Build Finished"

Now click on spide like icon on the top bar to upload the code, it will also naviagte you to debug mode automatically.

Now as soon as you will navigate into debug mode, a new task bar will appear for play, pause and control the programme flow.

To run the programme click on play icon and you programme will start.

Test

Click on the USER button on the board which is connected to GPIO12. if you press it, the state of the right most LED will change.

That's all for this post :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment