Hello World program for the i.MX6 Solox on Sabresd board running Linux.

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

Hello World program for the i.MX6 Solox on Sabresd board running Linux.

2,324 Views
sublime
Contributor III

Hello,

I received an evaluation board a week ago and I am trying to get it up and running. I am a beginner with no software development experience.

I am using a Windows machine as host. I installed PuTTY and I am able to see the board boot from the SD card that comes with the board.

The board is booting fine:

Booting Linux on physical CPU 0x0

Linux version 3.10.53-1.1.0_ga+g496fbe0 (jenkins@scmbl1) (gcc version 4.8.2 (GCC) ) #1 SMP PREEMPT Mon Jan 5 15:55:14 CST 2015

CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d

CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: Freescale i.MX6 SoloX (Device Tree), model: Freescale i.MX6 SoloX SDB Board

My toolchain is Eclipse IDE with CDT and GNU ARM Eclipse Plug-ins.


The code I am trying to run is below:

/*

============================================================================

Name        : main.c

Author      :

Version     :

Copyright   : Your copyright notice

Description : Hello World in C

============================================================================

*/

#include <stdio.h>

/*

*

* Print a greeting message on standard output and exit.

  * On embedded platforms this might require semi-hosting or similar.

  * For example, for toolchains derived from GNU Tools for Embedded,

* to enable semi-hosting, the following was added to the linker:

* * --specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group

*

* Adjust it for other toolchains.

*

*/

int

main(void)

{

  printf("Hello ARM World!" "\n");

  return 0;

}

The code builds with no problem as seen in the build console:

10:57:41 **** Incremental Build of configuration Release for project helloworldtest ****

make all

Invoking: Cross ARM GNU Print Size

arm-none-eabi-size --format=berkeley "helloworldtest.elf"

   text   data    bss    dec    hex filename

   8252   2396    260  10908   2a9c helloworldtest.elf

Finished building: helloworldtest.siz

10:57:43 Build Finished (took 2s.387ms)

How do I download to the board?

Thanks,

Labels (3)
Tags (1)
0 Kudos
Reply
2 Replies

838 Views
Yuri
NXP Employee
NXP Employee

  First, the “Hello Word” application should be built, using Linux
cross toolchain. Than, You can just copy the Linux executable
image
to SD card (with Linux filesystem) and run it under i.MX6 SoloX Linux
environment ; please do not forget to set executable attribute of the file
(chmod 777).
The following app note may be useful in debugging :

"AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors."

  http://cache.freescale.com/files/32bit/doc/app_note/AN4553.pdf

Regards,

Yuri.

0 Kudos
Reply

838 Views
igorpadykov
NXP Employee
NXP Employee

Hi JAVIER

I would suggest to check L3.10.53_1.1.0_LINUX_DOCS

sect.4.7.6 Running the M4 Image i.MX_Linux_User's_Guide.pdf

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply