hello word in u-boot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

hello word in u-boot

3,683 次查看
saida
Contributor II

hi i.mx6 community

i am trying to run hello_word example from u-boot on i.mxdl sabre board but it's not doing

can any one help me in this regard

like this i am doing

u-boot prompt=>loadb 0x12000000 (sending file hello_word.bin in kermit mode in hyperterminal)

u-boot prompt=>go 0x12000000

u-boot prompt=>application starting at 0x12000000 (its continuoulsy showing this message only)

in another way i am doing this

1. i have written small application like pointer to a address and than putting a value in that location

2.i have written my own linker

3. compiled using arm-none-eabi-gcc

after that same procedure as said above but this is also not working

and i am facing a problem with minicom to send files (Ctrl-a,S for sending files here i stuckked up)

thank you in advance

标签 (1)
0 项奖励
回复
4 回复数

2,164 次查看
强王
Contributor IV

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

--- arch/arm/config.mk    (版本 1422)

+++ arch/arm/config.mk    (工作副本)

@@ -9,7 +9,8 @@

ifneq ($(CONFIG_OMAP_COMMON),)

CONFIG_STANDALONE_LOAD_ADDR = 0x80300000

else

-CONFIG_STANDALONE_LOAD_ADDR = 0xc100000

+#CONFIG_STANDALONE_LOAD_ADDR = 0xc100000

+CONFIG_STANDALONE_LOAD_ADDR = 0x17800000

endif

endif

Index: examples/api/Makefile

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

--- examples/api/Makefile    (版本 1422)

+++ examples/api/Makefile    (工作副本)

@@ -8,7 +8,8 @@

LOAD_ADDR = 0x40000

endif

ifeq ($(ARCH),arm)

-LOAD_ADDR = 0x1000000

+#LOAD_ADDR = 0x1000000

+LOAD_ADDR = 0x17800000

endif

# Resulting ELF and binary exectuables will be named demo and demo.bin

Index: include/configs/mx6sabresd.h

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

--- include/configs/mx6sabresd.h    (版本 1422)

+++ include/configs/mx6sabresd.h    (工作副本)

@@ -59,7 +59,7 @@

#define CONFIG_PCIE_IMX_PERST_GPIO    IMX_GPIO_NR(7, 12)

#define CONFIG_PCIE_IMX_POWER_GPIO    IMX_GPIO_NR(3, 19)

#endif

-

+#define CONFIG_STANDALONE_LOAD_ADDR  0x17800000

/*#define CONFIG_SPLASH_SCREEN*/

/*#define CONFIG_MXC_EPDC*/

then,you could run again

0 项奖励
回复

2,164 次查看
saida
Contributor II

Hi

first of all thank you for your reply

what i understood is that i should add those #define( +LOAD_ADDR = 0x17800000 and CONFIG_STANDALONE_LOAD_ADDR  0x17800000) lines into appropriate  files and recompile u-boot and run from sd card but i have one dought this is already assigned to u-boot text base address is there any conflict ?

some clarifications i need

1. i have written my own linker script with x load address and i am downloading my bin file to x address, its working but i am getting "application terminated, rc=0x01" display output what could be the reason am i doing any thing wrong in this.

2. how to access eMMC flash in u-boot ?

3. my android filesystem is not booting which is there on the sdcard. (which is shipped with sabresd board) where can i get this image?

thanks and regards

saida

0 项奖励
回复

2,164 次查看
BiyongSUN
NXP Employee
NXP Employee

The default load address in 0x00907000

examples/standalone/Makefile

LOAD_ADDR=0x00907000

And you can confirmed  by run the following command:

arm-linux-readelf hello_world  -a |grep hello_world

  12: 00000000     0 FILE    LOCAL  DEFAULT  ABS hello_world.c

  47: 00907000   188 FUNC    GLOBAL DEFAULT    1 hello_world

Note:  uboot standalone hello_world.c entry is NOT main, it IS hello_world

Please load it to 0x00907000 and go to run it.

0 项奖励
回复

2,164 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hi,

Have you ensured that your application was compiled considering the proper execution addresses (uses a correct linker). On the following thread you could find additional information about a similar issue:

Run standalone application failed

Hope this will be useful for you.
Best regards!
/Carlos

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

0 项奖励
回复