--- Quote Start ---
Hi,
Nios2-download requires an elf format file. After the verify check and execution from its entry point, nios2-download will exit, so you need to monitor the output with nios2-terminal etc. The method introduced in the wiki is to send the binary file using the nios2-gdb loader functionality, after executing debug stub program by nios2-gdb-server. In either method, an appropriate terminal is necessary on your PC to communicate with the nios2 side.
Kazu
--- Quote End ---
Thank you for your reply.
I understand what you mean, and I am using the elf formatted file with the both nios2-terminal and and the terminal opened. I dont think that printing on the screen is the problem. Im gonna copy below an email that I just sent to the nios2 mail list:
We are developing a custom board that has the hardware very similar to the the Max10 Neek (
https://www.altera.com/products/boards_and_kits/dev-kits/partners/max-10-neek.html). It differs in a few things (like qspi / ram size).
Im trying to get uboot up on this board but i had no success so far. My first question to this list would be: Did anyone already try running uboot on this neek board? Does it work ?
Im using the default u-boot from
denx.de (
http://denx.de/) branch u-boot-2016.09.y.
I tried the same approach with the linux kernel (vmlinux) and i can send the kernel directly to it using the nios2-download program.
I did the necessary modifications pointed out by the doc/README.nios2 but my board is hanging here:
GNU gdb (GDB) 7.10.50.20150827-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type show copying
and show warranty for details.
This GDB was configured as --host=x86_64-pc-linux-gnu --target=nios2-elf.
Type show configuration for configuration details.
For bug reporting instructions, please see:
<
http://www.altera.com/mysupport>.
Find the GDB manual and other documentation resources online at:
<
http://www.gnu.org/software/gdb/documentation/>.
For help, type help.
Type apropos word to search for commands related to word...
Reading symbols from u-boot...done.
(gdb) target remote localhost:2345
Remote debugging using localhost:2345
0xd7fab0dc in bootstage_error (id=BOOTSTAGE_ID_NEED_RESET) at include/bootstage.h:358
358show_boot_progress(-id);
(gdb) backtrace
# 0 0xd7fab0dc in bootstage_error (id=BOOTSTAGE_ID_NEED_RESET) at include/bootstage.h:358
# 1 hang () at lib/hang.c:28
# 2 0xd7f8bcf4 in board_init_f (boot_flags=<optimized out>) at common/board_f.c:1076
# 3 0xd7f800e4 in _reloc () at arch/nios2/cpu/start.S:134
(gdb)
So the board is getting stuck on initialization, which explains why I dont see anything on the terminal. Now my problem is: Why am i getting stuck there? Im not sure if im missing a config, or if I should edit some linker script to make uboot point to another place in memory. Im looking for some documentation on this and / or some brief explanation of how can I move forward with this debug problem that im facing.
Thanks !
David