Forum Discussion
5 Replies
- Altera_Forum
Honored Contributor
Is your CPU reset vector set to an address in program area? In theory, after reset the CPU should jump to the defined reset vector and execute code from there.
- Altera_Forum
Honored Contributor
Dear Daixiwen,
I appreciate your reply and pointing out. I understand that reset vector must be adjusted by relationship between SOPC builder and Nios EDS automatically. I s there any potential to break this coordination? After my post I found some deference in .objdump file between good case and bad case. In good case, there is following part in the .objdump file. 00002000 is the my reset vector address. ========= 00002000 <__reset>: * Jump to the _start entry point in the .text section if reset code * is allowed or if optimizing for RTL simulation. */ # if defined(ALT_ALLOW_CODE_AT_RESET) || defined(ALT_SIM_OPTIMIZE) /* Jump to the _start entry point in the .text section. */ movhi r1, %hi(_start) 2000: 00400034 movhi at,0 ori r1, r1, %lo(_start) 2004: 08480814 ori at,at,8224 jmp r1 2008: 0800683a jmp at 0000200c <_exit>: ... =============== In bad case, there is not above part. Is it any hint? Tank you. - Altera_Forum
Honored Contributor
Yes it is automatic. When you generate your system in SOPC builder, it creates or updates the .sopcinfo file that describes the vectors. Then Nios EDS uses that file to make the link script with all the memory sections.
You should try and find out why you don't have the code at the reset address. It could be an option somewhere in the bsp settings. - Altera_Forum
Honored Contributor
Dear Daixiwen,
Thank you very much for your suggestion for BSP setting. Now I am using BSP setting as default. In BSP setting, items in Linker Script tab seems relate my problem. Actually, Now my problem has disappeared since I built original "Hello_world.c". (I don't understand what affect my problem) So I captured screenshot of Linker Script tab, Memory Usage and memory map as evidence of good condition. Later, when I will meet same problem, I will compare the condition with good condition I captured. Highly appreciate your comment. Toshihito Habuka - Altera_Forum
Honored Contributor
It's possible that at one point you compiled the BSP with a wrong .sopcinfo file that indicated another address for the reset exception. But I'm glad your problem disappeared!