Diferencia entre revisiones de «CodeBlock IDE and PIC microcontrollers»

De WikiRobotics
Saltar a: navegación, buscar
(Links)
(Compiling the "hello world" program)
 
(No se muestran 16 ediciones intermedias del mismo usuario)
Línea 1: Línea 1:
 +
[[Archivo:Code-blocks-pic-logo.png|right|200px|]]
 +
 
== Introduction ==
 
== Introduction ==
 +
'''Code::Blocks''' is a multiplatform open source C/C++ IDE. It can be used with different compilers and cross-compilers. The Code::Block IDE can be used to program the PIC microcontrollers.
  
 
== Installation on linux platforms ==
 
== Installation on linux platforms ==
  
 
=== Ubuntu 10.04/10.10 ===
 
=== Ubuntu 10.04/10.10 ===
 +
[[Archivo:Pantallazo-compiler-and-debugger-codeblocks-r2.png|thumb|300px|CodeBlocks configuration in Linux (''Click to enlarge'')]]
 +
 +
==== Installation ====
 +
 +
The Code::Blocks IDE is in the '''ubuntu's repositories'''. It can be easily installed by means of the ubuntu's '''software center''' or '''Synaptic'''.
 +
 +
{| {{tablabonita}}
 +
|[apt://codeblocks Code::Blocks quick installation]. Just click on the link to automatically install Code::Blocks
 +
|}
 +
 +
Optionally it can be installed by means of '''apt-get''':
 +
 +
  sudo apt-get install codeblocks
 +
 +
==== Configuration ====
 +
 +
(See the picture on the right)
 +
* Start the CodeBlocks (Applications/programming Ubuntu menu)
 +
* Click on '''''Settings/Compiler and debugger'''''
 +
* In the top drop-down menu chose "'''SDCC Compiler'''"
 +
* Click on the tab "'''Toolchain executables'''"
 +
* In the dialog "Compiler's installation directory" write '''/usr/bin'''
 +
* Click on '''Accept''' button
 +
* The codeBlocks is ready!!!!
  
 
== Installation on Windows 7 / windows XP ==
 
== Installation on Windows 7 / windows XP ==
 +
 +
The installation is straightforward. Just download and execute the following .exe file:
 +
 +
{| {{tablabonita}}
 +
| '''CodeBlock for Windows''': [http://www.iearobotics.com/downloads/skypic-software/Windows/codeblocks-10.05-setup.exe codeblocks-10.05-setup.exe]
 +
|}
  
 
== Compiling the "hello world" program ==
 
== Compiling the "hello world" program ==
  
 +
[[Archivo:Screenshot-codeblock-10.05-ubuntu-10.10.png|thumb|300px|The Codeblocks IDE compiling the ledon example on Ubuntu/Linux 10.10 (''click to enlarge'')]]
 +
 +
To verify that the CodeBlock + SDCC compiler are working properly, a "'''hello world'''" program will be compiled. This program is called "'''ledon.c'''". It just turns on the green led on the Skycube board. In this section we will just test that it compiles correctly (It still will not be downloaded into the board)
 +
 +
* Download the example file: [http://www.iearobotics.com/downloads/2010-08-19-codeblocks-pic/ledon-en-codeblocks.zip ledon-en-codeblocks.zip]
 +
* Uncompress it. The folder ledon will be created
 +
* Start the codeblock IDE
 +
* Open the ledon project
 +
* Compile it ''Build/build''
 +
* In the folder '''ledon/bin/Release''' will be located the '''ledon.hex''' which is the binary file that will be downloaded into the Skycube board
  
 
== Links ==
 
== Links ==

Revisión actual del 03:52 20 feb 2011

Code-blocks-pic-logo.png

Introduction

Code::Blocks is a multiplatform open source C/C++ IDE. It can be used with different compilers and cross-compilers. The Code::Block IDE can be used to program the PIC microcontrollers.

Installation on linux platforms

Ubuntu 10.04/10.10

CodeBlocks configuration in Linux (Click to enlarge)

Installation

The Code::Blocks IDE is in the ubuntu's repositories. It can be easily installed by means of the ubuntu's software center or Synaptic.

Code::Blocks quick installation. Just click on the link to automatically install Code::Blocks

Optionally it can be installed by means of apt-get:

 sudo apt-get install codeblocks

Configuration

(See the picture on the right)

  • Start the CodeBlocks (Applications/programming Ubuntu menu)
  • Click on Settings/Compiler and debugger
  • In the top drop-down menu chose "SDCC Compiler"
  • Click on the tab "Toolchain executables"
  • In the dialog "Compiler's installation directory" write /usr/bin
  • Click on Accept button
  • The codeBlocks is ready!!!!

Installation on Windows 7 / windows XP

The installation is straightforward. Just download and execute the following .exe file:

CodeBlock for Windows: codeblocks-10.05-setup.exe

Compiling the "hello world" program

The Codeblocks IDE compiling the ledon example on Ubuntu/Linux 10.10 (click to enlarge)

To verify that the CodeBlock + SDCC compiler are working properly, a "hello world" program will be compiled. This program is called "ledon.c". It just turns on the green led on the Skycube board. In this section we will just test that it compiles correctly (It still will not be downloaded into the board)

  • Download the example file: ledon-en-codeblocks.zip
  • Uncompress it. The folder ledon will be created
  • Start the codeblock IDE
  • Open the ledon project
  • Compile it Build/build
  • In the folder ledon/bin/Release will be located the ledon.hex which is the binary file that will be downloaded into the Skycube board

Links

News

  • Feb/20th/2011: This page is started!