Hello, Yuri!
Let me tell how I try to boot from SD on EVK. I used MCIMX6UL-EVK board.
Using Yocto I built recipe core-image-minimal and ran it from SD. Therefore I’m sure this board can boot from SD card.
I soldered two LEDs to pins GPIO1_00 and GPIO1_01 (pins 1 and 2 on J1706)
I made a new project in Eclipse. As toolchain I used a toolchain that I built using recipe meta-toolchain before.
After compilation I got ELF and BIN (arm-none-eabi-objcopy -v -O binary bgw_leds.elf bgw_leds.bin). The ELF had the following header
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x87800000
Start of program headers: 52 (bytes into file)
Start of section headers: 73956 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 1
Size of section headers: 40 (bytes)
Number of section headers: 8
Section header string table index: 7
To check if app works properly, I loaded it to board using Trace32. As DDR configuration I used dcd.config I copied from SDK (SDK_2.2_MCIM6ULL\tools\imgutil\evkmcimx6ull\dcd.config).
I used the following script
RESet
SYStem.RESet
SYStem.CPU IMX6ULTRALITE
SYStem.Option ResBreak OFF
IF VERSION.BUILD()<92177.
(
SYStem.Option WaitReset 10ms
)
ELSE
(
SYStem.Option WaitIDCODE 1.5s
)
SYStem.JtagClock CTCK 10MHz
SYStem.Up
DO ~~~~/scripts/dcd_interpreter "~~~~/../evk_dcd.config"
Data.LOAD.Elf "/home/user/eclipse-workspace/bgw_leds/EVK/bgw_leds.elf"
Go
App ran successfully, LEDs blinked as expected.
After this I prepared dcd.bin using dcdgen.bin utility from SDK
dcdgen.bin /opt/SDK_2.2_MCIM6UL/tools/imgutil/evkmcimx6ul/dcd.config /opt/SDK_2.2_MCIM6UL/tools/imgutil/evkmcimx6ul/dcd.bin
Then I made IMX image using utility imgutil.bin from SDK
./imgutil.bin --combine base_addr=0x80000000 ivt_offset=0x400 app_offset=0x1000 dcd_file=/opt/SDK_2.2_MCIM6UL/tools/imgutil/evkmcimx6ul/dcd.bin app_file=/home/user/eclipse-workspace/bgw_leds/EVK/bgw_leds.bin ofile=/home/user/eclipse-workspace/bgw_leds/EVK/bgw_leds.imx image_entry_point=0x87800000
As result I got IMX file that contained IVT, DCD and app at their places.
Combined Image Info:
--------------------------------------
base_addr = 0x80000000
ivt_offset = 0x00000400
hab_ivt.hdr = 0x412000d1
hab_ivt.entry = 0x87800000
hab_ivt.self = 0x80000400
hab_ivt.csf = 0x00000000
hab_ivt.boot_data = 0x80000420
hab_ivt.dcd = 0x80000440
boot_data.start = 0x80000000
boot_data.size = 0x00002cac
boot_data.plugin = 0x00000000
Info for CSF file generation
--------------------------------------
ivt_addr = 0x80000400, ivt_offset = 0x00000400
app_addr = 0x80001000, app_offset = 0x00001000, app_size = 0x00001cc0
Then I put this file to microSD card
dd if=/home/user/eclipse-workspace/bgw_leds/EVK/bgw_leds.imx of=/dev/sdb bs=1024 conv=fsync
Inserted SD card into holder on EVK board and restarted, but MCU couldn’t boot from SD and run app
What do I do wrong? the project and Trace32 scripts are attached
Best regards, George Makarov