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++

C++ and nios/e

Altera_Forum
Honored Contributor II
1,468 Views

Hello guys,  

I wonder if NIOS/e core supports C++ mode.  

My system is OK until I add a class and run the class constructor.  

System hangs and loop around in this  

 

--- Quote Start ---  

 

else { 

# ifdef NIOS2_HAS_DEBUG_STUB 

NIOS2_BREAK(); 

# else 

while(1) 

# endif /* NIOS2_HAS_DEBUG_STUB */ 

 

--- Quote End ---  

 

Tracing assembly code  

https://www.alteraforum.com/forum/attachment.php?attachmentid=13607  

 

it leads to the alt_main function but the memory content is all 0xFFFFFFFs 

https://www.alteraforum.com/forum/attachment.php?attachmentid=13606  

 

I'm not sure what's happening here. Never debugged at this level before. 

 

As soon as I remove the object instantiation. It runs. 

It boots from onchip flash then the bootcopier jumps to the .text which should be located in SDRAM 

:( 

Any hint would be really appreciated. Thanks 

A separate application that runs mem test reports memory is OK.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
473 Views

If I download the elf directly with the GDB debugger it works ...

0 Kudos
Altera_Forum
Honored Contributor II
473 Views

Further testing shows that this is likely User Flash Memory issue of my MAX10 bemicro kit.  

Moving from SDRAM to Onchip RAM shows the same result of all FFs in part of the text memory.  

Luckily i have another board and everything seems ok. it runs. No problem.  

 

Previously on the bad board, I already had some weird issue but didn't trace to the bottom of it. When I put my reset vector to the first sector of the UFM, the boot copier couldn't load the application. It got stuck half way when it reads an all F boot record header.  

When I put the reset vector to an offset of 16kB into the UFM then it worked. Then I moved on.  

Now, when the code grows larger, it stops working again.  

 

So, on the bad board, there are sectors of FLASH that can't be written to by the Quartus PROGRAMMER tool ... Be ware! 

The kit is fitted with MAX10 10M08DA...ES 

Thanks.
0 Kudos
Reply