Forum Discussion

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

Object file creation error during build

Im using the 9.1 version of the Nios tool and when I include one assembly source file and try to build my project, I notice the corresponding object file is not being created. Therefore I am getting undefined reference errors for the functions I have made in the source file. Im using the correct extension (.S) so I cant seem to figure out whats going on. Anyone else run into a similar problem?

3 Replies

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

    We're seeing the same problem. It looks like the IDE is not adding the assembly files to the ASM_SRCS variable in the application makefile. I'm calling it a bug at this point.

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

    Figured out the solution. Apparently the extension is case sensitive so if you rename you file to xxx.s instead of xxx.S, it should build properly.

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

    I do not agree with your workaround.

    It may certainly work for pure assembly, but not assembly code that must be pre-processed by the C pre-processor.

    Indeed, the fundamental difference between a .s and a .S file is the implicit pre-processing stage of the .S file to include files with# include directives and conditionally include code with# if/#ifdef/(etc...) directives.

    See gcc manual, chapter "3.2 Options Controlling the Kind of Output" :

    file.s Assembler code.

    file.S Assembler code which must be preprocessed.

    I therefore do also consider this to be a bug.