Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- Mine is: arm-altera-eabi-objcopy -O binary app.axf app_binary.bin mkimage -A arm -T standalone -C none -a 0x100000 -e 0 -n "baremetal image" -d app_binary.bin app.img But i'am using MPL preloader, worked fine with it. You can use debugger with sd card or whatever else you have got there. Just use the script file like this, for example, debug-unhosted.ds
# Reset and stop the system.
reset system
stop
wait 30s
# Disable semihosting.
set semihosting enabled false
# # Load the preloader into memory.
loadfile "$sdir/../Altera-SoCFPGA-HardwareLib-MPL_de10nano/mpl_C5_s.axf" 0x0
# Delete any existing breakpoints.
delete
# Set a breakpoint just before application code is called
tbreak mpl.c:419
# Set the PC to the entry point and go.
run
# Wait for the breakpoint.
wait
Then step into the code to see what is happening next. --- Quote End --- it seems I have lost. With the debugger I mean the DS5, I can load the program with the .ds script and step into the code just fine. But if I need to load the program through the sd-card to achieve the exact same thing, let's say blink the led, it won't work. it shows the following in putty, : U-Boot SPL 2013.01.01 (Aug 17 2017 - 17:27:12) BOARD : Altera SOCFPGA Cyclone V Board CLOCK: EOSC1 clock 25000 KHz CLOCK: EOSC2 clock 25000 KHz CLOCK: F2S_SDR_REF clock 0 KHz CLOCK: F2S_PER_REF clock 0 KHz CLOCK: MPU clock 925 MHz CLOCK: DDR clock 400 MHz CLOCK: UART clock 100000 KHz CLOCK: MMC clock 50000 KHz CLOCK: QSPI clock 370000 KHz RESET: WARM SDRAM: Initializing MMR registers SDRAM: Calibrating PHY SEQ.C: Preparing to start memory calibration SEQ.C: CALIBRATION PASSED SDRAM: 1024 MiB ALTERA DWMMC: 0 reading blink.img reading blink.img It seems the preloader is not loading the program.