Linking error in iMX6_Platform_SDK

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

Linking error in iMX6_Platform_SDK

Jump to solution
4,584 Views
muhammadfaisal
Contributor II

Hi All,

I am trying to run some test with my iMX6 board with the above stated sdk and i m getting following errors

Linking sdk_unit_test

/opt/arm-2012/bin/arm-none-eabi-ld: cannot find crtbegin.o

/opt/arm-2012/bin/arm-none-eabi-ld: cannot find crti.o

/opt/arm-2012/bin/arm-none-eabi-ld: cannot find crtend.o

/opt/arm-2012/bin/arm-none-eabi-ld: cannot find crtn.o

my toolchain is

arm-­‐none-­‐eabi  GCC toolchain 

Sourcery CodeBenchLite 2012.03-­‐56 4.6.3


does anybody have any idea.


with regards,

Muhammad Faisal.

1 Solution
3,139 Views
mdc
Contributor V

I had this problem as well.

The issue was I had edited the CROSS_COMPILE variable in mk/common.mk to add the entire path to the toolchain:

CROSS_COMPILE = /opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-

Not sure why that caused the issue, but what fixed it was instead of doing this, just add the toolchain path to your path variable.

In mk/common.mk, change the CROSS_COMPILE line back to:

CROSS_COMPILE = arm-none-eabi-

Then in your bash shell, do the following (adjust your path accordingly depending on where you installed the toolchain):

$ export PATH=$PATH:/opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin

If you have multiple ARM build environments on your system, you might want to verify the build will pick up the right one:

$ which arm-none-eabi-gcc

/opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-gcc

Then build via:

$ ./tools/build_sdk

View solution in original post

12 Replies
3,139 Views
muhammadfaisal
Contributor II

Thanks for the reply.

Even this did not work for me but I solved this problem by doing following.

I followed the guide in the readme file and then I gave fullpath for the crtbegin....etc files, four of them in the linker script file and then I had manually link some files like max730.o to the libsdk.o file

and in the end it produces the elf and bin file and now I am struggling to downloand the file on the board.

with regards,

Muhammad Faisal.

0 Kudos
Reply
3,140 Views
mdc
Contributor V

I had this problem as well.

The issue was I had edited the CROSS_COMPILE variable in mk/common.mk to add the entire path to the toolchain:

CROSS_COMPILE = /opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-

Not sure why that caused the issue, but what fixed it was instead of doing this, just add the toolchain path to your path variable.

In mk/common.mk, change the CROSS_COMPILE line back to:

CROSS_COMPILE = arm-none-eabi-

Then in your bash shell, do the following (adjust your path accordingly depending on where you installed the toolchain):

$ export PATH=$PATH:/opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin

If you have multiple ARM build environments on your system, you might want to verify the build will pick up the right one:

$ which arm-none-eabi-gcc

/opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-gcc

Then build via:

$ ./tools/build_sdk

3,139 Views
Aubineau_FAE
NXP Employee
NXP Employee

Hi,

The answer of Matthews solve the issue,this is the right answer in the most elegant way:

Matthew Clemens a écrit:

I had this problem as well.

The issue was I had edited the CROSS_COMPILE variable in mk/common.mk to add the entire path to the toolchain:

CROSS_COMPILE = /opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-

Not sure why that caused the issue, but what fixed it was instead of doing this, just add the toolchain path to your path variable.

In mk/common.mk, change the CROSS_COMPILE line back to:

CROSS_COMPILE = arm-none-eabi-

Then in your bash shell, do the following (adjust your path accordingly depending on where you installed the toolchain):

$ export PATH=$PATH:/opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin

If you have multiple ARM build environments on your system, you might want to verify the build will pick up the right one:

$ which arm-none-eabi-gcc

/opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-gcc

Then build via:

$ ./tools/build_sdk

Vincent

3,139 Views
muhammadfaisal
Contributor II

Hi,

I have .bin file as well as .elf file and .map file Which I generated through the

iMX6_Platform_SDK , I am not using any RTOS on my board.,,,,can you guide me

how can I dowload this .bin file on the board....the manufacturing tool dcoumentation

is too complicated for me ..believe me...can you guide some simple procedure for this task.

with regards,

Muhammad Faisal.


0 Kudos
Reply
3,139 Views
LeonardoSandova
Specialist I

The way I have executed SDK binaries is through an SD card. Under Linux, just flash it this way

dd if=binfile of=/dev/sdX seek=2 bs=512

where X is the device node letter (check the correct letter with dmesg | tail).

Let me know if it works.

Leo

0 Kudos
Reply
3,139 Views
mdc
Contributor V

If you're booting from an SD card, the easiest way will be to program your SD card via a linux host as documented in the SDK readme (replace /dev/sdx with the device node of whatever is the path of your SD card reader):

sudo dd if=<path>/sdk_unit_test.ALL.bin of=/dev/sdx seek=2 skip=2 bs=512 && sync

If you're trying to get the code into on-board NAND, eMMC, or SPI-NOR, you'll need to use the mfgtool. I always recommend people give themselves the option to boot via SD at least on an initial board spin so you don't have to try to figure out how to get code into your on-board boot media before the rest of your hardware is validated (the mfgtool needs at a minimum USB and DDR functional).

0 Kudos
Reply
3,139 Views
muhammadfaisal
Contributor II

Hi,

Can I use mfgtool to transfer .bin file to the chip using USB cable.....

with regards,

Muhammad Faisal.

0 Kudos
Reply
3,139 Views
LeonardoSandova
Specialist I

I am not sure. But there are easier ways:

- on windows, I have done it through sb_loader.exe, located MFGtool/Utils/sb_loader folder;

- on linux, I have done it with this tool: boundarydevices/imx_usb_loader · GitHub

0 Kudos
Reply
3,139 Views
EdSutter
Senior Contributor II

Leonardo,

I see you've used both sb_loader (freescale) and imx_usb (boundary devices).  I have been using imx_usb on Linux, but I need the ability to load from a windows host (but would prefer not to use a GUI).  I take the same image (as I used with imx_usb) and try to load it with sb_loader and I see differences on-target that I can't explain. 

I simply run sb_loader -f "binfile", where "binfile" is the same file that I load using imx_usb.  Is that the correct usage?  Is there any documentation on sb_loader?

Thanks,

Ed

0 Kudos
Reply
3,139 Views
EdSutter
Senior Contributor II

Leo,

Sorry, but I'm confused... I'm trying to use the sb_loader tool to push a boot image to my board.  I don't want to use the SD card because the board I'm eventually going to use will not have one.  Can you give me any other details on the sb_loader tool?   Is there documentation for it anywhere?

Ed

3,139 Views
muhammadfaisal
Contributor II

my host computer is based on linux, I Have downloaded this imx_usb_loader...can you guide me how

can I use it ,,,,I mean where will I mention my .bin file which is needed to be dowloaded.

with regards,

Muhammad Faisal.

0 Kudos
Reply
3,139 Views
LeonardoSandova
Specialist I

I have used it to load u-boot.bin through the USB. Check this page: http://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/

0 Kudos
Reply