User Tools

Site Tools


doc:dev_setupfirmware

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
doc:dev_setupfirmware [2014/02/25 06:51] – created admindoc:dev_setupfirmware [2014/03/01 09:24] admin
Line 1: Line 1:
-====== Build the Firmware ======+====== OOBD-Firmware Development Environment ======
  
 +===== Kubuntu for VirtualBox with IDE Eclipse and Sourcery ARM Toolchain =====
  
-===== System Setup =====+==== Download software ====
  
-==== Installing the development environment on a Virtual maschine ====+  * Get latest version of Kubuntu (here: 13.04) http://www.kubuntu.org/getkubuntu 
 +  * Get latest version of Virtualbox (here: 4.2.12 for Windows hosts, tested on Windows 7, 64bit) https://www.virtualbox.org/wiki/Downloads 
 +  * Get latest Oracle VM VirtualBox Extension Pack (here: 4.2.12) http://dlc.sun.com.edgesuite.net/virtualbox/4.2.12/Oracle_VM_VirtualBox_Extension_Pack-4.2.12.vbox-extpack
  
-In case it is wanted to have the development environment in a virtual machine (which is optional), here are the steps: 
-  - install Virtualbox (4.1.8) (tested on Host-OS Windows 7, 64bit) 
-  - install Fedora 16 netinst (32 or 64bit, depending on your Host-OS) 
-  - install Virtualbox Guest Additions 
  
-==== Set up Eclipse ==== +==== Virtualbox installation on Windows Host ====
-  - install Eclipse Classic (3.7.1, Indigo) (Linux, 32bit) 64bit version of Eclipse didn't work) +
-  - add the CDT Plugin (C/C++ IDE) into Eclipse (http://download.eclipse.org/tools/cdt/releases/indigo) +
-  - add the CDT GNU ARM Toolchain into Eclipse (http://gnuarmeclipse.sourceforge.net/updates) +
-  - install CodeSourcery into Fedora (arm-2010.09-51-arm-none-eabi.bin => the latest version didn't work, this one does) (https://sourcery.mentor.com/sgpp/lite/arm/portal/package7815/public/arm-none-eabi/arm-2010.09-51-arm-none-eabi.bin) +
-  - import the OOBD-Repository (oobd/trunk/interfaces/D2/Firmware_FreeRTOS) into Eclipse (File => Import => General => Existing Projects into Workspace)+
  
 +Start “Virtual  - box” on Windows host: Start => Oracle VM VirtualBox => Oracle VM VirtualBox
 +  - Create new virtual machine: \\ New or Ctrl-N  \\  {{ :doc:dev_vm_p1.png?300 |}} \\ Press “Next”  
 +  - Memory size (here: 1024MB)\\ {{ :doc:dev_vm_p2.png?300 |}} \\ Press “Next”
 +  - Create a virtual hard drive now \\ {{ :doc:dev_vm_p3.png?300 |}} \\ Press “Create”
 +  - Hard drive file type (here: VDI – VirtualBox Disc Image)\\ {{ :doc:dev_vm_p4.png?300 |}} \\ Press “Next”
 +  - Storage on physical hard drive (here: Dynamically allocated)\\ {{ :doc:dev_vm_p5.png?300 |}} \\ Press “Next”
 +  - Select file location and size (here: 8GB Disc Image)\\ {{ :doc:dev_vm_p6.png?300 |}} \\ Press “Create”
 +  - New created virtual machine is ready for initial start now\\ {{ :doc:dev_vm_p7.png?300 |}} \\ Highlight “Kubuntu” and double mouse click now to start new virtual machine “Kubuntu”!
 +  - Insert Kubuntu 13.04 CD in CD-ROM of Laptop/PC\\ {{ :doc:dev_vm_p8.png?300 |}} \\ Press “Start”
 +  - Kubuntu Start-Screen after booting Virtualmachine from CD\\ {{ :doc:dev_vm_p9.png?300 |}} \\ Select language and Press “Install Kubuntu”
 +  - Start installation \\ Select “Install this third-party software” and “Download updates while installing” \\ {{ :doc:dev_vm_p10.png?300 |}} \\ Press “continue”
 +  - Choose installation type (here: use entire disk) \\ {{ :doc:dev_vm_p11.png?300 |}} \\ Press “Install now”
 +  - Confirm Timezone during installation process \\ {{ :doc:dev_vm_p12.png?300 |}} \\ Press “Continue”
 +  - Select you Keyboard layout (here: German) \\ {{ :doc:dev_vm_p13.png?300 |}} \\ Press “Continue”
 +  - Fill-In user data \\ {{ :doc:dev_vm_p14.png?300 |}} \\ Press “Continue”
 +  - After finishing installation restart Virtual machine by pressing “Restart Now” \\ {{ :doc:dev_vm_p15.png?300 |}} \\ **Hint:** \\  CD is ejected automatically after shutting down and restart!
 +  - After restart and login the KDE desktop is shown: \\ {{ :doc:dev_vm_p16.png?300 |}} 
  
  
-===== Compiling =====+==== Install Eclipse-CDT with Muon Package Manager ====
  
 +  - KDE => Applications => System => Muon Package Manager \\ {{ :doc:dev_vm_p17.png?300 |}} \\ Press “Installation” \\ **Hint: ** \\ “Mark Addition changes?” => Press “OK” \\ Press “Apply Changes” on the top and enter your user password \\ **Hint:** \\ A working Internet connection is necessary now otherwise the installation will fail.
 +  - Install Subversion with Muon Package Manager
 +     * KDE => Applications => System => Muon Package Manager \\ {{ :doc:dev_vm_p18.png?300 |}}
 +     * Type Subversion in search bar
 +     * Highlight subversion and right click on subversion => Mark for installation => Apply changes
  
-Use "Project/Build all" to compile and buildAfter that a new folder "debugor "release(depending on your build settingsshould contain the binaries.+ 
 +==== Installation procedure of Sourcery G++ Lite Edition for ARM EABI ==== 
 + 
 +  - Start Webbrowser (i.e. Firefox from KDE => All Applications => Internet) and get Sourcery CodeBench Lite Edition for ARM EABI – ARM crosscompiler \\ Please download the latest Sourcery G++ Lite version and NOT any “CodeBench” version, i.e.: \\ Release Date 2011-05-02 - Sourcery G++ Lite 2011.03-42 \\ https://sourcery.mentor.com/GNUToolchain/release1802 \\ Release Date 2010-11-10 - Sourcery G++ Lite 2010.09-51 \\ https://sourcery.mentor.com/GNUToolchain/release1592 \\ **Hint:** \\ Don’t use the newer CodeBench version as they won’t work out of the box, i.e.: \\ Release Date 2013-05-07 - Sourcery CodeBench Lite 2013.05-23 \\ https://sourcery.mentor.com/GNUToolchain/release2449 \\ Release Date 2011-12-19 - Sourcery CodeBench Lite 2011.09-69 \\ https://sourcery.mentor.com/GNUToolchain/release2032 \\ **Hint:** \\ Target OS... \\ EABI => IA32 GNU/Linux Installer \\ ... and NOT... \\ GNU/Linux 
 +  - Install Sourcery CodeBench Lite Edition for ARM EABI by start Terminal \\ KDE => All applications => System => Terminal \\ ''<hostname>:~$ cd Downloads/'' \\ ''<hostname>:~/Downloads$ chmod 755 arm-2011.03-42-arm-none-eabi.bin'' \\ ''<hostname>:~/Downloads$ sudo dpkg-reconfigure –plow dash'' \\ Configuring dash => Select “No” \\ ''<hostname>:~/Downloads$ sudo ./arm-2011.03-42-arm-none-eabi.bin'' \\ {{ :doc:dev_vm_p19.png?300 |}} \\ Installation procedure: \\ Select… \\ “Next” => \\ “I accecpt the terms of the Licencse Agreement” => “Next” => \\ “Next” => \\ “Minimal” => “Next” => \\ “Choose Install Folder” => change prefix folder to “/opt/CodeSourcery/Sourcery_G++_Lite“ => “Next” => \\ “Modify PATH for current user” => “Next” => \\ “Choose Link Folder” => change prefix folder to “/opt/CodeSourcery/Sourcery_G++_Lite“ => “Next” => \\ “Install” \\ Select “Next” => “Next” \\ {{ :doc:dev_vm_p20.png?300 |}} \\ Installer will be closed automatically now. 
 +  - Set PATH in home directory ~/.profile \\ ''sudo vi ~/.profile'' \\ ---add at the end of the file--- \\ ''# set PATH so it includes CodeSourcery bin if it exists'' \\ ''if [ -d "/opt/CodeSourcery/Sourcery_G++/bin] ; then'' \\ ''PATH="/opt/CodeSourcery/Sourcery_G++/bin:$PATH"'' \\ ''fi''  
 + 
 +==== Install GNU Arm Eclipse - Manged build extension for GNU ARM Toolchains ==== 
 + 
 + 
 +http://gnuarmeclipse.livius.net/blog/ 
 +  - Start Eclipse \\ KDE => All applications => Development => Eclipse 
 +  - Add source to Available Software \\ Eclipse menu: Help => Install software \\ Work with: http://gnuarmeclipse.sourceforge.net/updates \\ Press “Add” \\  {{ :doc:dev_vm_p21.png?300 |}} \\ Add Name and Press “OK” \\ Press “Select All” \\ Press “Next” \\ Press “Next” \\ Select “I accept the terms of the license agreement” \\ Press “Finish” \\ “Security Warning” => Press “OK” \\ After installation is finished => “Software Updates” => Press “Yes” => Eclipse will be restarted 
 + 
 + 
 +==== Installation “VBoxGuestAdditions.iso” ==== 
 + 
 +  - Right mouse click on CD symbol on tray right bottom corner 
 +  - Mark entry “VBoxGuestAdditions.iso” 
 +  - Press “Strg-Alt-F1” to leave KDE and start Terminal 
 +  - ''cd /media/<username>/VBOXADDITIONS_4.2.12_84980$'' 
 +  - ''sudo ./VBoxLinuxAdditions.run'' \\  {{ :doc:dev_vm_p22.png?300 |}} \\ Restart Virtual machine to use the Guest Additions 
 + 
 +==== Mount Shared Folder to Host OS (here: Windows) ==== 
 +  - ''sudo mount –t vboxsf V_DRIVE /mnt'' 
 + 
 +==== Start and Configuration of Eclipse ==== 
 + 
 +  - Start Eclipse from the KDE-Menu and use/confirm the default workspace directory in your home directory 
 +  - Import OOBD firmware project \\ File => Import \\  {{ :doc:dev_vm_p23.png?300 |}} \\ General => Existing Projects into Workspace => Next \\  {{ :doc:dev_vm_p24.png?300 |}} \\ Select Directory where the firmware is located (Hint: SVN checkout) => Finish  \\ After import of project is finished => Right click on project “DXM1_Firmware” => Build Configurations => Set Active => Release_STM32 \\ \\  {{ :doc:dev_vm_p25.png?300 |}} \\ Right click on project “DXM1_Firmware” => Clean Project (before first build process\\ Right click on project “DXM1_Firmware” => Build Project \\ If firmware is finished successfully you’ll get a result like: \\  {{ :doc:dev_vm_p26.png?300 |}} \\ The “OOBD_Firmware_CRC.bin” file is located here… \\ ''..\trunk\interface\Designs\CORTEX\STM32F103C8_Eclipse_GCC\D2\app\Release_STM32\'' \\ 
 +…after the build process is finished.
  
 ---- ----
 +
 +===== Off Topic: What Eclipse files to check in with a new project =====
 +
  
 A small note, copied from http://digitaldumptruck.jotabout.com/?p=767 A small note, copied from http://digitaldumptruck.jotabout.com/?p=767
Line 47: Line 96:
 When setting up the project on the new machine use File > Import … > General > Existing Project Into Workspace. When setting up the project on the new machine use File > Import … > General > Existing Project Into Workspace.
  
----- 
- 
-something about the STM32 Bootloader http://www.micromouseonline.com/blog/2009/05/07/stm32-arm-cortex-bootloader 
doc/dev_setupfirmware.txt · Last modified: 2014/03/01 09:27 by admin