home:mios:core_toolchain:codeblocks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
home:mios:core_toolchain:codeblocks [2008/12/02 05:03] – Durisian | home:mios:core_toolchain:codeblocks [2008/12/19 22:41] (current) – removed stryd_one | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | **Toolchain Code:: | ||
- | ======Windows====== | ||
- | \\ | ||
- | \\ | ||
- | **The technical jargon:**\\ | ||
- | This is the // | ||
- | on [[http:// | ||
- | primarily in C, utilising the [[http:// | ||
- | [[: | ||
- | The IDE platform used will be [[http:// | ||
- | or [[http:// | ||
- | and the applications will be built | ||
- | for the [[: | ||
- | stuffed with a [[http:// | ||
- | C code will be compiled with [[http:// | ||
- | and assembled with [[http:// | ||
- | using [[http:// | ||
- | and [[http:// | ||
- | For PC emulation for debugging purposes, you may also use [[mios_c_simulator_-_debugger|AC-Sim (AudioCommander' | ||
- | compiled with [[http:// | ||
- | |||
- | **Enough of that.**\\ | ||
- | You should have come here after the [[: | ||
- | |||
- | * Code:: | ||
- | * GDB - The GNU De-Bugger - If you want to make use of AC-Sim (you will have decided this previously in this tutorial) you should install the GDB to assist you in the debugging process. If you are not going to use Code:: | ||
- | If you are not sure, and you have a few meg of diskspace to spare, I would recommend that you install this now, as Code:: | ||
- | |||
- | \\ | ||
- | \\ | ||
- | |||
- | ===== GDB (GNU DeBugger) ===== | ||
- | GDB is used to debug apps and is a must-have for MIOS development. | ||
- | |||
- | * [[http:// | ||
- | * Install, taking the same default install path as MinGW (see [[windows_toolchain_asm_acsim# | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | |||
- | ===== Code:: | ||
- | Code:: | ||
- | |||
- | ==== Install ==== | ||
- | |||
- | The full Code:: | ||
- | |||
- | |||
- | |||
- | ==== Code:: | ||
- | For our purposes, CodeBlocks latest nightly build version should be installed. | ||
- | |||
- | //If there is an existing version installed, then delete the share\ dir, for example C:\Program Files\CodeBlocks\share\*.* before upgrading// | ||
- | \\ | ||
- | * Get link for Nightly Build from the [[http:// | ||
- | * Unzip downloaded file to Program Directory, for example C:\Program Files\CodeBlocks\, | ||
- | :!: Note that these links sometimes change! They are usually (always!) in the first post of the thread for the Nightly Build. Get them from there!! | ||
- | * Download a [[http:// | ||
- | * Start Code: | ||
- | |||
- | * Code:Blocks will detect and configure installed compilers. It should find 'GNU GCC Compiler' | ||
- | |||
- | |||
- | |||
- | ==== Configure ==== | ||
- | In order to use the [[http:// | ||
- | |||
- | * Select the menu ' | ||
- | * Select ' | ||
- | * In the box labelled ' | ||
- | * Select the tab labelled ' | ||
- | * From the dropdown box labelled ' | ||
- | * Tick the box labelled ' | ||
- | * Click OK. | ||
- | |||
- | * Again, select the menu ' | ||
- | * Select ' | ||
- | * Select the ' | ||
- | * Make sure that ' | ||
- | * Click OK. | ||
- | |||
- | This should be all that is needed to have the application itself ready to go! | ||
- | \\ | ||
- | \\ | ||
- | |||
- | |||
- | |||
- | |||
- | ==== Project Setup ==== | ||
- | |||
- | Full instructions are below, but you may jump to the required section based on your requirements: | ||
- | \\ | ||
- | |||
- | |||
- | === Project Setup - New Application === | ||
- | |||
- | If you are creating a new application, | ||
- | |||
- | * {{cb_sdcc_skeleton.zip|Download the MIOS SDCC Skeleton Application Template}} | ||
- | * Extract the contents of the zip to your user template directory. It will be C: | ||
- | * In Code:: | ||
- | * Select the tab labelled 'User Templates', | ||
- | * Writing your code is up to you but once you're done, jump to the section on Compiling and Debugging for either [[# | ||
- | |||
- | //You may want to visit the AC-Sim page to update your Simulator files!// | ||
- | \\ | ||
- | |||
- | === Project Setup - Existing Application or Skeleton Creation === | ||
- | |||
- | A C::B Project can be setup from either an existing MIOS C Application or the SDCC_Skeleton App as follows. You should have your application/ | ||
- | \\ | ||
- | |||
- | === Create Empty Project === | ||
- | * Copy all files from either the [[http:// | ||
- | * Start Code:: | ||
- | * Open a new project (' | ||
- | * Click ' | ||
- | * In the box labelled ' | ||
- | * Ensure 'GNU GCC Compiler' | ||
- | * If you are prompted to select a language to use, select ' | ||
- | \\ | ||
- | |||
- | |||
- | |||
- | === Add Application files to project === | ||
- | |||
- | * When you first create the project, C::B will automatically create a 'Hello World' application. This main.c needs to be deleted. Right-Click it, and choose ' | ||
- | * Now open up Widows Explorer (aka 'My Computer' | ||
- | * Move all of your skeleton files into the C::B Project directory* (Where you see a *.CBP file you specified earlier). | ||
- | * Create an empty text file in that directory, named " | ||
- | * Select ' | ||
- | * If you are prompted to select which build target should be used, click ' | ||
- | * Double-click the tree branch in the far left pane labelled " | ||
- | * Immediately after the copyright notice, insert this code: | ||
- | \\ | ||
- | <code C> | ||
- | #include " | ||
- | </ | ||
- | * Right Click the file's name in the tab bar, and select ' | ||
- | |||
- | \\ | ||
- | |||
- | === Configure Build Targets === | ||
- | |||
- | == AC-SIM Build Target == | ||
- | //You may skip this section if you do not need to use the simulator// | ||
- | |||
- | * Ensure AC-SIM files are added to the project. Follow the instructions at [[mios_c_simulator_-_debugger# | ||
- | * Select ' | ||
- | * Select the target ' | ||
- | * In the box labelled ' | ||
- | * In the box labelled ' | ||
- | |||
- | == MBHP Build Target == | ||
- | //You should always perform the following sections to build the application for MBHP(your MIDIbox!)// | ||
- | |||
- | * Returning to ' | ||
- | * In the box labelled ' | ||
- | * In the box labelled ' | ||
- | * Click ' | ||
- | |||
- | * Select ' | ||
- | * Select target ' | ||
- | * In the box labelled ' | ||
- | * In the box labelled ' | ||
- | * Select the ' | ||
- | * Tick 'Use Custom Command to build this file' | ||
- | * Type into the textbox " | ||
- | * Click OK | ||
- | * Click OK | ||
- | \\ | ||
- | |||
- | |||
- | |||
- | \\ | ||
- | \\ | ||
- | |||
- | At this point, I highly recommend selecting ' | ||
- | |||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | |||
- | ==== AC-Sim Simulator ==== | ||
- | |||
- | === Setup === | ||
- | |||
- | Follow the instructions at [[mios_c_simulator_-_debugger|the AC-Sim WIKI page]] | ||
- | |||
- | === Compile === | ||
- | |||
- | Select the ' | ||
- | |||
- | === Debug === | ||
- | |||
- | Follow the instructions at [[mios_c_simulator_-_debugger|the AC-Sim WIKI page]] | ||
- | |||
- | |||
- | ==== MBHP ==== | ||
- | |||
- | === Compile === | ||
- | |||
- | Select the ' | ||
- | |||
- | === Debug === | ||
- | |||
- | Well, that's up to you! | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | |||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | |||
- | |||
- | |||
- | ===== IDE Setup Complete ===== | ||
- | |||
- | If you made it this far, you have done all you need to edit C based apps, including using AC-Sim. | ||
- | If you’re going to code in ASM, or you’re unsure, you may like to install another IDE like [[notepad|NotePad++]]. You won’t break anything. :) | ||
- | \\ | ||
- | \\ | ||
- | ======Linux====== |
home/mios/core_toolchain/codeblocks.1228194232.txt.gz · Last modified: 2008/12/02 05:03 by Durisian