Forum Discussion
Nios V, Max10, C++: region `reset' overflowed by 4 bytes
- 2 years ago
I think I found an answer. My Nios Reset was pointing to on-chip memory, with base 0xc000000.
.text was in external ddr3 at base 0x0, and __start was at 0x804.
Generating the linker map I see:
.entry 0x000000000c000000 0x24 *(.entry) .entry 0x000000000c000000 0x24 freertos_bsp/libfreertos_bsp.a(crt0.S.obj) 0x000000000c000000 __resetWhich tells me the only thing in the .entry section is __reset, and this is __reset in crt0.S:
.section .entry, "xa" .align 5 .globl __reset .type __reset, @function __reset: /* * Jump to the _start entry point in the .text section if reset code * is allowed or if optimizing for RTL simulation. */ /* Jump to the _start entry point in the .text section. */ tail _start .size __reset, . - __resetI'm wondering if the "tail _start" instruction had to be encoded with extra bits because I'm jumping from 0xc000000 to 0x804?
When I switched my Nios reset to also point to external ddr3, then my C++ compiled ok.
Now my .entry is at 0x0, and _start is still 0x804.
Does that seem like a reasonable explanation?
Hi,
Thanks for the update.
I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.
p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.