Integrating Processor Expert for i.MX and ARM GCC with Eclipse

Document created by Yuri Muhin Employee on Feb 17, 2015Last modified by Yuri Muhin Employee on Jun 25, 2015
Version 8Show Document
  • View in full screen mode

   The purpose of this article is to describe how to join together the Processor
Expert and ARM GCC toolchain under Eclipse environment. 


  Freescale provides the Processor Expert, which contains the Pin Settings Tool
to support an easy way to configure pin signals, from multiplexing to the electrical
properties of pins. With such Tool all the pins can be configured with a graphical
user interface, and then generate C code, in order to use it as an example in applications.
Please refer to the following Web for more details.

 

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PROCESSOR-EXPERT-IMX

  The Processor Expert Software for i.MX Processors (Version 1.0) does not include

a compiler or linker. Customers should merge the generated code into a build system.
  However, it is possible to use common Eclipse-based IDE for the Processor Expert (V 1.0)

and GNU ARM “C” toolchains. In particular, the following sequence may be implemented for

both Linux and Windows hosts.


1.
Install Eclipse (Kepler release) IDE for C/C++ Developers.

https://eclipse.org/downloads/packages/eclipse-ide-cc-developers/keplersr2

2.
Add Eclipse Processor Expert plug-in, as recommended in the documentation.

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PROCESSOR-EXPERT-IMX

https://community.freescale.com/docs/DOC-101470

3. 
Add GNU ARM Eclipse, which contains configurations for different toolchains,

including Linux ones.

http://gnuarmeclipse.livius.net/blog/plugins-install/

 

4.

Install appropriate toolchain. For bare-metal applications Sourcery CodeBench Lite

for ARM is sutable one.

Sourcery CodeBench Lite Edition including ARM GCC IDE - Mentor Graphics

 

Please use Getting Started Guide document from the CodeBench Lite package,

that explains how to install and build applications with the CodeBench Lite.


   As an example, let’s consider minimal startup code for i.MX6Q (LED flickering

project on i.MX6Q SDB / SDP). Assuming Eclipse IDE with the Processor Expert

and GNU ARM tools is installed, we should create new “C” project under Eclipse :

 

New -> C Project. Select “Empty Project” and “Cross ARM GCC”, enter “Project
name”.




Then : select “Advanced settings” -> C/C++ Build -> Settings




 

Tab “Target Processor” :
ARM Family : cortex – a9
Architecture : armv7-a
Instruction set : ARM (-marm)
Endianness : Little endian (-mlittle-endian)
FloatABI : Library with FP (softfp)
FPU Type : neon
Unaligned access : Disabled (-mno-unaligned-access)

 

“Cross ARM GNU Create Flash Image” :
General : Raw binary.





TAB “Toolchains” :
Name : Sourcery CodeBench Lite for ARM EABI (arm-none-eabi-gcc)
(If needed customers can select appropriate toolchain)
Architecture : ARM (AArch32)
Prefix : arm-none-eabi

Check “Use global toolchain path” or select the required path directly. 

toolchain.jpg

 

 

Source codes may added via Eclipse : File -> Import -> File System -> From directory

import_file_system.jpg

Example source is enclosed.

After sources as included in the project, let’s configure linker options via

project properties,
C/C++ Build -> Settings -> Tool Settings -> Cross ARM C Linker -> General.

 

Add script file “mx6dq.ld”, uncheck “Remove unused section”, check

“Do not use standard start files”.

 

 

Note, the article of Miro Samek is very helpful in clarifying of startup code and linker
script. Please refer to “Building Bare-Metal ARM Systems with GNU”. Article Published

online at www.Embedded.com,  July/August 2007.

 

So, now we can build the project : Project -> Build Project.
Two executable file will be generated : test.elf (for JTAG debugger) and test.bin,
which may be used to create bootable SD card, using cfimager-imx.exe utility :

CMD> cfimager-imx -o 0 -f test.bin -d g:

 

Please use readme files in the enclosed for more details.














Attachments

Outcomes