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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

No ratings

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

   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”.

pastedImage_3.png


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

pastedImage_4.png

pastedImage_5.png

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)

pastedImage_6.png

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


pastedImage_7.png


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”.

  pastedImage_9.png

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.














Labels (4)
Attachments
Comments

Hi,

I have built the above program using GCC ARM GCC ARM Embedded in Launchpad . However given sample is compiled using Sourcery CodeBench Lite (which is available for evaluation period of 30 days only).

I get errors when compiled with GCC ARM. Check .jpg attachedlcs3arm_errror.jpg

Building target: Prog_from_Integrating.elf

Invoking: Cross ARM C Linker

arm-none-eabi-gcc --specs=rdimon.specs  -lrdimon -mcpu=cortex-a9 -march=armv7-a -marm -mlittle-endian -mfloat-abi=softfp -mfpu=neon -mno-unaligned-access -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "E:\Kepler_Programs\Prog_from_Integrating\mx6dq.ld" -nostartfiles -Wl,-Map,"Prog_from_Integrating.map" -o "Prog_from_Integrating.elf"  ./main.o 

c:/program files (x86)/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lcs3arm

c:/program files (x86)/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lcs3

collect2.exe: error: ld returned 1 exit status

makefile:41: recipe for target 'Prog_from_Integrating.elf' failed

make: *** [Prog_from_Integrating.elf] Error 1

It shows cs3arm & cs3 cannot find. These are written in mx6dq.ld (linker Script)  at GROUP(-lgcc -lc -lcs3arm -lcs3).

If I remove them from GROUP I get this 'Reset Handler' error.Check .jpg attachedResetHandler_error.jpg

Building target: Prog_from_Integrating.elf

Invoking: Cross ARM C Linker

arm-none-eabi-gcc --specs=rdimon.specs  -lrdimon -mcpu=cortex-a9 -march=armv7-a -marm -mlittle-endian -mfloat-abi=softfp -mfpu=neon -mno-unaligned-access -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "E:\Kepler_Programs\Prog_from_Integrating\mx6dq.ld" -nostartfiles -Wl,-Map,"Prog_from_Integrating.map" -o "Prog_from_Integrating.elf"  ./main.o 

c:/program files (x86)/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol Reset_Handler; defaulting to 00900000

./main.o: In function `start_secondary_cpu':

E:\Kepler_Programs\Prog_from_Integrating\Debug/../main.c:124: undefined reference to `Reset_Handler'

E:\Kepler_Programs\Prog_from_Integrating\Debug/../main.c:124: undefined reference to `Reset_Handler'

collect2.exe: error: ld returned 1 exit status

makefile:41: recipe for target 'Prog_from_Integrating.elf' failed

make: *** [Prog_from_Integrating.elf] Error 1

Any help to solve this error would be appreciated? I want to build it using GCC ARM. (not Sourcery CodeBench)

Thanks and regards,

Sarang

The web links in the article beginning with www.freescale.com are not up to date. Where are they currently mapped to, please?

Hello,

  It may be recommended to use the Pins Tool now

Pins Tool for i.MX Application Processors|NXP 

   

Regards,

Yuri.

Hi Yuri,

thank you for your recommendation. I was able to generate the iomux_config files for my EVA board.

Could you please give me an additional advice where to get a simple bare-metal “HelloWorld”/ “Blinky” template project for MCIMX6UL-EVKB under ARM GCC with Eclipse?

I need just a quick start help. Maybe https://community.nxp.com/docs/DOC-94139 would be helpfull for me, but, the link to the “i.MX 6Series Platform SDK” files doesn’t work…

Thank you!

Best regards

Waldemar Rempel

Engineering Automation Systems Basis Firmware DC-IA/EAH2

Bosch Rexroth. The Drive & Control Company

Tel. +49 6062 78-1834

Fax +49 6062 78-771

Waldemar.Rempel@boschrexroth.de<mailto:Waldemar.Rempel@boschrexroth.de>

www.boschrexroth.com<http://www.boschrexroth.com>;

Bosch Rexroth AG

Berliner Straße 25

64711 Erbach

GERMANY

Firmensitz: Stuttgart, Registrierung: Amtsgericht Stuttgart HRB 23192

Vorstand: Rolf Najork (Vorsitzender) , Dr. Markus Forschner; Dr. Bertram Hoffmann; Dr. Marc Wucherer

Vorsitzender des Aufsichtsrats: Dr. Stefan Hartung

Von: Yuri

Gesendet: Dienstag, 23. Mai 2017 11:01

An: Rempel Waldemar (DC-IA/EAH2) <Waldemar.Rempel@boschrexroth.de>

Betreff: Re: - Integrating Processor Expert for i.MX and ARM GCC with Eclipse

NXP Community <https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

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

new comment by Yuri Muhin<https://community.nxp.com/people/Yuri?et=watches.email.document_comment> View all comments on this document<https://community.nxp.com/docs/DOC-103736?commentID=43458&et=watches.email.document_comment#comment-43458>

Hello,

  You may use the following regarding the Platform SDK :

swp-report/iMX6_Platform_SDK at master · backenklee/swp-report · GitHub 


 Also, You may  look at the following :

i.MX6 Bare Metal 

Perhaps the following helps regarding i.MX6UL, since it may be considered as i.MX6SL derivative.

https://community.nxp.com/docs/DOC-331921 

Regards,

Yuri.

I am compiling example given here but it giving following error.error.png

Hello,

  values of heap_start, top_of_stacks  and __mmu_page_table_base__ are defined in linker file 

mx6dq.ld. Verify if it is involved in Your case. 

Regards,

Yuri.

Hi Yuri Muhin,

I am getting error for -lcs3 and -lcs3arm,

are they library?

error2.png

Hello,

  the mentioned  lcs3 concerns with Sourcery CodeBench toolchain specifics.

Perhaps for Your toolchain linker file should be modified. 

 

Regards,

Yuri.

solve library issue:

-lcs3, -lcs3arm library issue.

from here:

-lcs3 and -lcs3arm library

Version history
Last update:
‎02-17-2015 04:21 AM
Updated by: