I made a couple simple programs using the ARM DS-5 compiler and now I would like to run them on the i.MX6 through UBOOT.
Uboot version:
U-Boot 2013.10-rc1-00097-g75ad664 (Sep 17 2013 - 14:40:03)
arm-linux-gcc (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) 4.6.2 20110630 (prerelease)
GNU ld (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) 2.21.52.20110702
Step 1: Compile .axf file with ARM DS-5 Compiler
Step 2: Use makeelf.exe to make a .bin file from the .axf file
Step 3: Save .bin file onto an USB drive
Step 4: Execute the following commands into UBOOT
usb dev 0:1
fatload usb 0:1 0x900000 serial.bin
go 0x900000
When I run my binary file I always get a software interrupt error:
U-Boot > go 0x900000
go 0x900000
## Starting application at 0x00900000 ...
software interrupt
pc : [<00902f78>] lr : [<00902f78>]
sp : 0093efe0 ip : 0093e010 fp : 00903f24
r10: 00903f24 r9 : 00000002 r8 : 2f357f38
r7 : 00903f13 r6 : 00000000 r5 : 00000000 r4 : 00000000
r3 : 00000000 r2 : 0093e000 r1 : 00000000 r0 : 00000010
Flags: nzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
U-Boot 2013.10-rc1-00097-g75ad664 (Sep 17 2013 - 14:40:03)
CPU: Freescale i.MX6SOLO rev1.1 at 792 MHz
Reset cause: WDOG
Board: Nitrogen6X
Is the 'go' command only for running specialized uboot applications or can I run binary files compiled from the ARM DS-5 Compiler?
Thank you so much!
(Austin is an amazing place!)
Hi Kyle, I fully agree with your last statement about Austin :smileyhappy:
I have not used the 'go' command instead I have used 'bootelf'. Can you try it with bootelf?
Here is a related document ysing the iMX6 Platform SDK
iRAM (OCRAM) i.MX6 SDK Application
Leo
Thanks for your fast reply Leo, I haven't tried that as my UBoot version does not have the bootelf command in it and I was trying to avoid compiling my own UBoot. But I have a good set of instructions on how to do that and how to add the bootelf command to my UBoot. Hopefully this helps my problem.
Actually I ran into trouble (building issue) adding the macro (+#define CONFIG_CMD_ELF) on LTIB u-boot, but then I moved to latest code (remotes/origin/imx_v2013.04_3.5.7_1.0.0_alpha, I think) and worked fine.
Well, after spending way to long figuring out how to compile U-Boot with the boot elf command I finally got it working and here are my results. Nothing really changed...
In more detail...
U-Boot > fatload usb 0:1 0x12000000 serial.axf
fatload usb 0:1 0x12000000 serial.axf
reading serial.axf
88256 bytes read in 50 ms (1.7 MiB/s)
U-Boot > bootelf
bootelf
## Starting application at 0x00900000 ...
software interrupt
pc : [<00902f78>] lr : [<00902f78>]
sp : 0093efe0 ip : 0093e010 fp : 00903f24
r10: 00903f24 r9 : 2f359f38 r8 : 2f35b9a0
r7 : 00903f13 r6 : 00000000 r5 : 00000000 r4 : 00000000
r3 : 00000000 r2 : 0093e000 r1 : 00000000 r0 : 00000010
Flags: nzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
So I loaded serial.axf into memory at hex 12 million and then proceeded to use the boot elf command. I got the exact same problem, a software interrupt. Is it safe to assume that the problem is not with U-Boot but in the .axf code itself?
I miss the Alamo Drafthouse!!!
Really dummy question: Does your app have printf statements? what does your app suppose to do/print?
My app opens up a comm port and transmits "Hello World." on a loop. It does not have printf statements.