Forum Discussion

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

how can i get the memory map file.

in a design , using several memory, flash , ddr, and ssram , after enter into the nios2 to setup a project, after building the project, i want to know each section 's address. but i can not find the corresponding file.

10 Replies

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

    You can either find it in the HTML datasheet generated by SOPC builder (in the same folder than the PTF file) or in the IDE itself, in a header file. Go in the syslib -> Debug -> system_description -> system.h

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

    The two files: *.html and system.h file can not give a detailed description of each section 's address, such as begining address,end address,section size, ect.

    This two files only give the hardware system's address, such as the ddr2 sdram 's address, flash 's address. On this cpu.ptf, i set up several software project, each project has diffrent software size. So the Nios2 should give a file descriping each section 's address. I can not find that file or information.:p
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The information is embedded in the elf file. You can retreive it using a command in the Nios shell. Something like:

    nios2-elf-size -Ax my_project.elf

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

    thanks , i have tried and the address map displayed on the screen.

    i found if use software build tools , a *.map file can be generated . this file can also display the address map.:)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    I am wondering if there is other way (than the Nios Shell command) to find such file.

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

    if you are using software build tools design flow, you can find a summary.html in the bsp file folder, it includes the hardware memory assignment. And you can also find a *.map or*.objdump file in the app file folder , it includes the memory assign of the application.

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

    I am using the Nios II IDE (v9.0). I can't find such file with the specified extensions neither in the workspace nor in the software folder!

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

    i met the same problems as you, so i have to use the software build tools design flow rather than the ide flow.

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

    Go to Window > Preferences > Nios II (may not be entirely correct, but you get the point...) and you'll find an option to enable its generation.

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

    Do you mean to generate the objdump file? the *.elf.objdump file generated contains a so mixed and confusing information including the assembly code!