Diferencia entre revisiones de «CodeBlock IDE and PIC microcontrollers»

De WikiRobotics
Saltar a: navegación, buscar
(Ubuntu 10.04/10.10)
(Compiling the "hello world" program)
 
(No se muestran 9 ediciones intermedias del mismo usuario)
Línea 7: Línea 7:
  
 
=== 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 ====
 
==== Installation ====
Línea 21: Línea 22:
  
 
==== Configuration ====
 
==== Configuration ====
[[Archivo:Pantallazo-compiler-and-debugger-codeblocks-r2.png|thumb|300px|Configuración del codeblocks en Linux (''click para ampliar'')]]
 
  
* Arrancar el code::blocks (Menú Aplicaciones/programación de Ubuntu)
+
(See the picture on the right)
* Pinchar en la opción '''''Settings/Compiler and debugger'''''
+
* Start the CodeBlocks (Applications/programming Ubuntu menu)
* Seleccionar en el desplegable superior (en ''Selected compiler'') la opción "'''SDCC Compiler'''"
+
* Click on '''''Settings/Compiler and debugger'''''
* Seleccionar la pestaña "'''Toolchain executables'''"
+
* In the top drop-down menu chose "'''SDCC Compiler'''"
* En el diálogo "Compiler's installation directory" escribir: '''/usr/bin'''
+
* Click on the tab "'''Toolchain executables'''"
* Pinchar en '''Aceptar''' en la parte inferior
+
* In the dialog "Compiler's installation directory" write '''/usr/bin'''
* ¡¡Listo!!
+
* 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 04: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!