Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

QSPI flash boot problems

Honored Contributor II

I'm working on running a bare metal program to test the functionality of the HPS but it us currently aborting at the image_entry command seen if the code below taken from the spl.c file. I believe this error is occurring while still in the proloader code when its trying to find the uboot app image.  


__weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image){ typedef void __noreturn (*image_entry_noargs_t)(u32 *); image_entry_noargs_t image_entry = (image_entry_noargs_t) spl_image->entry_point; # ifdef CONFIG_HW_WATCHDOG WATCHDOG_RESET(); # endif # ifdef CONFIG_SPL_CHECKSUM_NEXT_IMAGE u32 calculated_crc; if (spl_image->crc_size != 0) { # if defined(CONFIG_SPL_SDRAM_ECC_PADDING) && !defined(CONFIG_SPL_SPI_XIP) /* * do additional memory initialization / padding to avoid * the false double bit error (DBE) during read back * (for checksum purpose) when ECC is enabled */ debug("Padding the SDRAM to avoid false ECC DBE\n"); memset((unsigned char *) (spl_image->entry_point + spl_image->crc_size), 0, CONFIG_SPL_SDRAM_ECC_PADDING); # endif debug("Verifying Checksum ... "); calculated_crc = crc32_wd(0, (unsigned char *)spl_image->entry_point, spl_image->crc_size, CHUNKSZ_CRC32); if (calculated_crc != spl_image->crc) { puts("Bad image with mismatched CRC\n"); debug("CRC calculate from 0x%08x " "with length 0x%08x\n", spl_image->entry_point, spl_image->size); debug("CRC Result : Expected 0x%08x " "Calculated 0x%08x\n", spl_image->crc, calculated_crc); hang(); } else debug("OK\n"); } # endif debug("image entry point: 0x%X\n", spl_image->entry_point); /* Pass the saved boot_params from rom code */ # if defined(CONFIG_VIRTIO) || defined(CONFIG_ZEBU) image_entry = (image_entry_noargs_t)0x80100000; # endif # if defined(CONFIG_SOCFPGA) && (CONFIG_PRELOADER_STATE_REG_ENABLE == 1) /* to indicate a successful run */ writel(CONFIG_PRELOADER_STATE_VALID, CONFIG_PRELOADER_STATE_REG); # endif # ifdef CONFIG_HW_WATCHDOG WATCHDOG_RESET(); # endif image_entry((u32 *)boot_params_ptr); }  


This project I am using produces three files that can be programmed into QSPI flash; one preloader file, one app image, and one combined preloader and app image. No combnation of these files when programmed into QSPI flash will allow me to advance past the image_entry command. Currently I have no explanation to why the program aborts at this point, this same project ran on a cycloneV SOC dev kit but now is having problems running on a unique board with the cycloneV chip. Any suggestions on where to look for possible problems would be appreciated. I would be happy to provide addition details.
0 Kudos
0 Replies