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

Generate Device Tree Help and kernel compile questions

Honored Contributor II

Thanks in advance for any help. 

I’m a newbie to NIOS II embedded system design and would like to use the uClinux (version 2.6.38+mmu) running NIOS 2/f processor on my project. I have been following the wiki instruction, and successfully generated the SOPCINFO using the QSYS, and hope it will run on the NEEK development kit (Cyclone III) with the system design contains: 


  • NIOS2/f processor with reset vector: 0x02000000 (Ext_Flash), Exception Vector: 0x00200000 (On_Chip_RAM), and MMU Fast TLB Miss Exception Vector: 0x00400000 (On_Chip_RAM)  

  • PLL: c0 – 100MHz, c1-100MHz, c2-60MHz  

  • Tristate_conduit_bridge  

  • Ext_flash  

  • Avalong_MM_Pipeline_Bridge (Base Addr: 0x0200_0000 End: 0x03ff_ffff)  

  • Avalon_MM_Clock_Crossing_Bridge (Base Addr: 0x0000_1000 End: 0x03ff_ffff)  

  • Internal timer (Base Addr: 0x0000_0100 End: 0x0000_011f)  

  • Jtag UART (Base Addr: 0x0000_0120 End: 0x0000_0127)  

  • Uart_COM RS232 (Base Addr: 0x0000_0140 End: 0x0000_015f)  


My goal is to run the uClinux on the NEEK and understanding the design and implementation process. However, as of now, I am uncertain this will ever boot or successfully load onto the kit. 

Here are my questions: 

1. I got stuck on this failure message using the SOPC2DTS (Thanks Walter Goossens for provided us this Java application.)  

failure message: 

GenericTristateController: ext_flash failed to detect driver type. 

Component ext_flash of class altera_generic_tristate_controller is unknown  

dts memory section: No memory nodes specified. Blindly adding them all 


I have been searching for an answer and find this link 

I added another component into the bottom of the sopc_components_altera.xml, and then rebuild the .jar 


<S2DComponent classname=”ext_flash” 

compatDevice=”ext_flash” group =”flash”> 

<compatible name=”cfi_flash”></compatible> 



Executed: java –jar sopc2dts.jar –t dts –I system.sopcinfo –o system.dts –v -v 


Clearly this doesn’t work, since I still have the same failure message. Nonetheless, it does generate the system.dts, but maybe with failure in it? Can anyone point me into the right path to generate the device tree?? 


2. I tried to compile the kernel with the system.dts. I did the git checkout unstable-nios2mmu. Is this still the preferred branch to work with NIOS2 + MMU and use the dts? I read branch nios2 is the replacement of it because of the confusing name. 

3. The kernel did successful compiled with the dts, but it shows the load and entry address is in 0xC000_0000 instead of my reset vector. Not sure I understand. Perhaps anyone kindly explain it to me? 

4. I been using the version 2.6.38, is there a new kernel out there make life a LOT easier? Wishful thinking if we could just use the .SOPCINFO and it can generate the DTB or DTS file.  


0 Kudos
3 Replies
Honored Contributor II

You can get a newer version of the kernel from the "nios2" branch.
0 Kudos
Honored Contributor II

Hi, Thank you very much for your respond. I was able to result the problem and would like to share to anyone may have similar issue. Please kindly point me out if this isn’t a preferred method to result the SOPC2DTS bug. My problem is relate to the GenericTristateController class module in the (below is my modified code) which it’s locate at /tools/sopc2dts/sopc2dts/lib/components  


Note: The SOPCINFO uses the value "embeddedsw.configuration.hwClassnameDriverSupportList" and "altera_avalon_lan91c111,altera_avalon_cfi_flash" 


boolean bChanged = false; 

String driverType = getParamValByName("embeddedsw.configuration.softwareDriver"); 


driverType = getParamValByName("embeddedsw.configuration.hwClassnameDriverSupportDefault"); 

--> if(driverType==null) 

--> { 

--> driverType = getParamValByName("embeddedsw.configuration.hwClassnameDriverSupportList"); 

--> }  




Logger.logln("GenericTristateController: " + getInstanceName() 

+ " failed to detect driver type.", LogLevel.WARNING); 

} else { 

if(driverType.equalsIgnoreCase("altera_avalon_cfi_flash_driver") || 


--> driverType.equalsIgnoreCase("altera_avalon_lan91c111,altera_avalon_cfi_flash")) 

Logger.logln("GenericTristateController: " + getInstanceName()  

+ " seems to be a CFI-Flash chip.", LogLevel.INFO); 

SICFlash flash = new SICFlash(this); 





bChanged = true; 

} else { 

Logger.logln("GenericTristateController: " + getInstanceName()  

+ " is of unsupported type: " + driverType, LogLevel.WARNING); 

return bChanged; 


0 Kudos
Honored Contributor II

The answer to my third question regards of 0xC000 0000 is on uClinux uses it as Virtual Memory. Sorry for this dump question. 


0 Kudos