Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Problem with Custom FPGA using MMU

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.

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I change Some Setting inside menuconfig than Problem can solve.

    Some Component can define inside nios.h
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?