Forum Discussion

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

system.h is not locatable even after compiling the project

hi,

i am using Nios-II version 9.0.

i have created a new project using a .ptf file. it has no additional files other than a simple hello_world.c

i have included the system.h file and plan to use the peripheral specific macros for developing the drivers.

when i build the project, it successfully compiles and creates an .elf

but when i try to indivudally build the hello_world.c file it throws an error saying "no such file or directory"

any idea to how to resolve this?

3 Replies

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

    hi,

    for every .c file there is a option to build that file. i am using that option.

    also when i build the complete project i get error of not being able to open following header files:

    "system.h"

    "altera_avalon_pio_regs.h"

    "alt_types.h"
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I never tried this option before, and it doesn't work on my system either. There is a warning saying it's experimental though ;)

    Just build the full project, it will only recompile modified files anyway.

    For the .h files, it is sometimes a real pain to find them in the IDE. You often need to find them by hand from the project explorer on your left.

    For system.h, go in your project's syslib, Debug, system_description

    For the altera component include files, go in altera.components, IP Device Drivers, sopc_builder_ip, your_component_name, inc

    Other general include files, such as alt_types.h, are in altera.components, IP Device Drivers, nios2_ip, altera_nios2, HAL. inc