Hello,
Am able to solve the problem, which mentioned here earlier. That problem was solved by changing the Environment variables offset location(in spl_bsp/uboot-socfpga/include/configs/socfpga-common.h).
Now i want run my custom application (hello.c) in the place of u-boot. In the place of u-boot am placing the hello-mkimage.bin(which was generated using mkimage tool). But its not running my application.
here is my mkimage tool command:
mkimage -A arm -T standalone -C none -a 0x2000040 -e 0x0 -n "baremetal image" -d hello.bin hello-mkimage.bin
The things i observed is:
Case 1:
a) i have eraised entire NAND and i have placed my application image(hello-mkimage.bin) only at 0xC0000.
b) Then i debugged the preloader through DS-5. and i allowed preloader to boot the next image from NAND flash.(i have used preloadr.ds file)
--> its copying entire image including header part of the image. this thing i observed when the control entered into uboot-socfpga/common/spl/spl.c, in the function
spl_parse_image_header(); its not entering into the first if statement. i.e., if (spl_image.flags & SPL_COPY_PAYLOAD_ONLY) becoming false.
--> Load address is becoming 0x2000000, and entry point is 0x2000040. (no change in these values when i changed the value of -e in mkimage cmd).
Case 2:
when i executed my application in debug mode(this time image is loaded using debug-hosted.ds file for debugging, no image in my NAND, and in debug configuration i have selected "debug from entry point"). the hello.bin file is loaded at 0x2000000 loaction,entry point is from 0x2000040. This i observed in disassembly window and memory window.
In both the cases entry point is same i.e 0x2000040. But what ever the instruction or opcode is not same at 0x2000040. The opcode which is in debug mode is located at 0x2000080 loaction when i loaded the image from NAND. This is due to copying of image including header. To shift my entry point i have added/subtracted 0x40 from entry point(edited in this function spl_parse_image_header();). but its giving CRC error for image entry point.
Can anyone solve my issue... Please tell me if am doing any mistake.
Thank you in advance.