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

Problem with Custom FPGA using MMU

Altera_Forum
Honored Contributor II
1,345 Views

Hi~ 

 

I am try to build my own custom made FPGA design using uClinux with MMU. 

I follow the order in NIOS WIKI (nioswiki /Linux/Creating_a_Nios_II_Design_with_an_MMU) 

and I use my own design. 

 

However, I have problem of config.c inside of (~/nios2-linux/linux-2.6/arch/nios2/boards) 

 

It always generate a lot of error, and acturely the design is not for me. 

 

Does anyone know how to write config.c file or it can generate by itself? 

 

Thanks for your help.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
307 Views

I have the same problem. 

the nios2mmu have more difficulties to building custom-FPGA . 

 

the ball "nios2-linux-20100621.tar" can not build as "NEEK CUSTOM " 

some errors about "altera_pio_ports" 

 

but 3C120 board mode can build . 

 

puzzle!
0 Kudos
Altera_Forum
Honored Contributor II
307 Views

I change Some Setting inside menuconfig than Problem can solve. 

Some Component can define inside nios.h
0 Kudos
Altera_Forum
Honored Contributor II
307 Views

Hi,  

Can you elaborate what you have done?
0 Kudos
Altera_Forum
Honored Contributor II
307 Views

First of all, you have to build a system with mmu. 

If you can, I suggest to put a flash into your system. 

Follow this (http://www.nioswiki.com/linux/creating_a_nios_ii_design_with_an_mmu

 

 

 

--- Quote Start ---  

 

 

# ifndef _ASM_NIOS2_H__ 

# define _ASM_NIOS2_H__ 

 

# if defined(CONFIG_MY_NIOS2_FPGA) 

# include <asm/my_nios2_fpga.h> 

 

# define DDR2_TOP_BASE DDR_SDRAM_BASE 

# define DDR2_TOP_SPAN DDR_SDRAM_SPAN 

# define TIMER_1MS_FREQ SYS_CLK_TIMER_FREQ 

# define TIMER_1MS_BASE SYS_CLK_TIMER_BASE 

# define TIMER_1MS_SPAN SYS_CLK_TIMER_SPAN 

# define TIMER_1MS_IRQ SYS_CLK_TIMER_IRQ 

# define GPIO_LED1 0 

 

# else 

# error "No FPGA configuration selected" 

# endif 

 

.... 

 

--- Quote End ---  

 

 

Change Nios.h step is very important. 

Try to build you zImage use make 

If show error, check do you have that component or not? 

If you have, change (nios.h) to map you component name to his one. 

If you don't have, use make menuconfig to unselect that component. 

 

It is hard to show how to do thought this, you can show more detail than we can discuss together. 

 

Good lucky you can do it. 

 

 

htmin
0 Kudos
Altera_Forum
Honored Contributor II
307 Views

Thank you htmin,  

 

It has been very generous of you. 

 

I used neek, so, I follow neek_ocm_spi_mmu.zip and I checked that SOPC has MMU enabled. 

 

In make menuconfig, I checked  

[*] Default all settings (lose changes)# select  

[*] Customize Kernel Settings # to select board 

 

It was working with uClinux + MMU, however, I can not communicate too long with my board, it would hang after few minutes. So, I guess this concludes Linux porting for Nios II? 

 

Do you have this problem?
0 Kudos
Altera_Forum
Honored Contributor II
307 Views

Hi 

 

I didn't use neek board, but I use my custom design fpga board. 

My system can run at least few days I try without hanging. 

I think the system is stable enough. 

I don't know what's going wrong. 

 

Maybe you can say more detail about your situation like do you execute some you programs or execute some command. 

Or, do you have error messenger?
0 Kudos
Reply