Forum Discussion

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

Nios II: mp3_player (error)

Need help because im just a newbie in FPGA programming..

I downloaded the mp3_player demo for NIOS II, and tried to build it (using NIOS II Command Shell). Unfortunately I found an error :

collect2: ld returned 1 exit status

make: *** [mp3_player.elf] Error 1

I dont have any idea what this error is.

I tried to run the flash files of this application and its working...

But I need to build this one..

Please help me, thanks in advance....

5 Replies

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

    thanks for reply

    here's the whole message after i build them:

    (the full build messages is on the attachment)

    https://www.alteraforum.com/forum/attachment.php?attachmentid=1555

    Here's the 1st half of the build message

    
    $ make all
    Info: Building ../../bsp/hal_default
    make: Circular src/mad/sf_table.dat <- mp3_player.elf dependency dropped.
    make: Circular src/mad/qc_table.dat <- mp3_player.elf dependency dropped.
    make: Circular src/mad/rq_table.dat <- mp3_player.elf dependency dropped.
    make: Circular src/mad/imdct_s.dat <- mp3_player.elf dependency dropped.
    make: Circular src/mad/D.dat <- mp3_player.elf dependency dropped.
    Info: Linking mp3_player.elf
    nios2-elf-g++ -T'../../bsp/hal_default/linker.x' -msys-crt0='../../bsp/hal_default/obj/HAL/src/crt0.
    o' -msys-lib=hal_bsp -L../../bsp/hal_default   -Wl,-Map=mp3_player.map   -O3 -g -Wall   -mno-hw-div
    -mhw-mul -mno-hw-mulx  -o mp3_player.elf obj/src/.metadata/.plugins/org.eclipse.cdt.make.core/specs.
    o obj/src/alt_touchscreen/alt_touchscreen.o obj/src/audio/audio_ctrl.o obj/src/fonts/arial_24.o obj/
    src/fonts/arial_28.o obj/src/fonts/arialbold_28.o obj/src/fonts/arialroundedmtbold_28.o obj/src/font
    s/arialroundedmtbold_58.o obj/src/gimp_bmp/gimp_bmp.o obj/src/graphics_lib/simple_graphics.o obj/src
    /graphics_lib/simple_text.o obj/src/gui.o obj/src/gui_old.o obj/src/i2c/i2c_ctrl.o obj/src/images/al
    tera_big.o obj/src/images/altera_small.o obj/src/images/edit_not_pressed.o obj/src/images/edit_press
    ed.o obj/src/images/pause_not_pressed.o obj/src/images/pause_pressed.o obj/src/images/play_not_press
    ed.o obj/src/images/play_pressed.o obj/src/images/prog_bar_empty_center_10x27.o obj/src/images/prog_
    bar_empty_left_10x27.o obj/src/images/prog_bar_empty_right_10x27.o obj/src/images/prog_bar_on_10x27.
    o obj/src/images/prog_bar_on_left_10x27.o obj/src/images/prog_bar_on_left_right_10x27.o obj/src/imag
    es/prog_bar_on_right_10x27.o obj/src/images/random_not_pressed.o obj/src/images/random_pressed.o obj
    /src/images/repeat_not_pressed.o obj/src/images/repeat_pressed.o obj/src/images/skip_back_not_presse
    d.o obj/src/images/skip_back_pressed.o obj/src/images/skip_fwd_not_pressed.o obj/src/images/skip_fwd
    _pressed.o obj/src/mad/audio.o obj/src/mad/bit.o obj/src/mad/decoder.o obj/src/mad/fixed.o obj/src/m
    ad/frame.o obj/src/mad/huffman.o obj/src/mad/layer12.o obj/src/mad/layer3.o obj/src/mad/stream.o obj
    /src/mad/synth.o obj/src/mad/timer.o obj/src/mad/version.o obj/src/main.o obj/src/player_lib.o obj/s
    rc/touchscreen.o -lm
    obj/src/gui_old.o(.text+0x0): In function `CopyImageToBuffer':
    src/gui_old.c:43: multiple definition of `CopyImageToBuffer'
    obj/src/gui.o(.text+0x0):src/gui.c:44: first defined here
    obj/src/gui_old.o(.text+0x84): In function `CopyImageToCoords':
    src/gui_old.c:66: multiple definition of `CopyImageToCoords'
    obj/src/gui.o(.text+0x84):src/gui.c:67: first defined here
    obj/src/gui_old.o(.text+0x130): In function `CopyBlockToNextFrame':
    src/gui_old.c:89: multiple definition of `CopyBlockToNextFrame'
    obj/src/gui.o(.text+0x130):src/gui.c:90: first defined here
    obj/src/gui_old.o(.text+0x1f4): In function `DisplaySlider':
    src/gui_old.c:125: multiple definition of `DisplaySlider'
    obj/src/gui.o(.text+0x1f4):src/gui.c:126: first defined here
    obj/src/gui_old.o(.text+0x684): In function `load_gimp_graphic_to_pointer':
    src/gui_old.c:218: multiple definition of `load_gimp_graphic_to_pointer'
    obj/src/gui.o(.text+0x684):src/gui.c:219: first defined here
    obj/src/gui_old.o(.text+0x718): In function `PrerenderButton':
    src/gui_old.c:247: multiple definition of `PrerenderButton'
    obj/src/gui.o(.text+0x718):src/gui.c:248: first defined here
    obj/src/gui_old.o(.text+0x83c): In function `PrerenderSlider':
    src/gui_old.c:299: multiple definition of `PrerenderSlider'
    $ $ make all
    obj/src/gui_old.o(.text+0xad8): In function `DisplayGimpImage':
    src/gui_old.c:375: multiple definition of `DisplayGimpImage'
    obj/src/gui.o(.text+0xad8):src/gui.c:376: first defined here
    obj/src/gui_old.o(.text+0xbc8): In function `DisplaySliders':
    src/gui_old.c:435: multiple definition of `DisplaySliders'
    obj/src/gui.o(.text+0xf4c):src/gui.c:429: first defined here
    obj/src/gui_old.o(.text+0xcac): In function `PrerenderButtons':
    src/gui_old.c:467: multiple definition of `PrerenderButtons'
    obj/src/gui.o(.text+0x1030):src/gui.c:461: first defined here
    obj/src/gui_old.o(.text+0xe84): In function `DrawGradBox':
    src/gui_old.c:610: multiple definition of `DrawGradBox'
    obj/src/gui.o(.text+0x1208):src/gui.c:604: first defined here
    obj/src/gui_old.o(.text+0x18c4): In function `InverseRoundCornerPoints':
    src/gui_old.c:825: multiple definition of `InverseRoundCornerPoints'
    obj/src/gui.o(.text+0x1c48):src/gui.c:819: first defined here
    obj/src/gui_old.o(.text+0x1b3c): In function `FillInverseRoundCorners':
    src/gui_old.c:853: multiple definition of `FillInverseRoundCorners'
    obj/src/gui.o(.text+0x1ec0):src/gui.c:847: first defined here
    obj/src/gui_old.o(.text+0x1c80): In function `DrawRoundCornerGradBox':
    src/gui_old.c:933: multiple definition of `DrawRoundCornerGradBox'
    obj/src/gui.o(.text+0x2004):src/gui.c:927: first defined here
    obj/src/gui_old.o(.text+0x1d3c): In function `DrawWindow':
    src/gui_old.c:556: multiple definition of `DrawWindow'
    obj/src/gui.o(.text+0x20c0):src/gui.c:550: first defined here
    obj/src/gui_old.o(.text+0x1eb0): In function `CoordsAreInArea':
    src/gui_old.c:960: multiple definition of `CoordsAreInArea'
    obj/src/gui.o(.text+0x2234):src/gui.c:954: first defined here
    obj/src/gui_old.o(.text+0x1ee4): In function `CoordsAreOnSlider':
    src/gui_old.c:989: multiple definition of `CoordsAreOnSlider'
    obj/src/gui.o(.text+0x2268):src/gui.c:983: first defined here
    obj/src/gui_old.o(.text+0x1f1c): In function `CoordsAreOnButton':
    src/gui_old.c:1021: multiple definition of `CoordsAreOnButton'
    obj/src/gui.o(.text+0x22a0):src/gui.c:1015: first defined here
    obj/src/gui_old.o(.text+0x1f54): In function `UpdateSlider':
    src/gui_old.c:1052: multiple definition of `UpdateSlider'
    obj/src/gui.o(.text+0x22d8):src/gui.c:1046: first defined here
    obj/src/gui_old.o(.text+0x204c): In function `DisplayButton':
    src/gui_old.c:1106: multiple definition of `DisplayButton'
    obj/src/gui.o(.text+0xbc8):src/gui.c:1100: first defined here
    obj/src/gui_old.o(.text+0x2134): In function `UpdateButton':
    src/gui_old.c:1148: multiple definition of `UpdateButton'
    obj/src/gui.o(.text+0x23d0):src/gui.c:1142: first defined here
    obj/src/gui_old.o(.text+0x2470): In function `UpdateMainButtons':
    src/gui_old.c:1241: multiple definition of `UpdateMainButtons'
    obj/src/gui.o(.text+0x270c):src/gui.c:1235: first defined here
    obj/src/gui_old.o(.text+0x2598): In function `vid_print_string_alpha_max_x':
    src/gui_old.c:1301: multiple definition of `vid_print_string_alpha_max_x'
    obj/src/gui.o(.text+0x2834):src/gui.c:1295: first defined here
    obj/src/gui_old.o(.text+0x2664): In function `vid_print_string_alpha_prerendered':
    src/gui_old.c:1339: multiple definition of `vid_print_string_alpha_prerendered'
    obj/src/gui.o(.text+0x2900):src/gui.c:1333: first defined here
    obj/src/gui_old.o(.text+0x2854): In function `vid_print_string_alpha_prerendered_max_x':
    src/gui_old.c:1401: multiple definition of `vid_print_string_alpha_prerendered_max_x'
    obj/src/gui.o(.text+0x2af0):src/gui.c:1395: first defined here
    obj/src/gui_old.o(.text+0x2914): In function `PrerenderFont':
    src/gui_old.c:1457: multiple definition of `PrerenderFont'
    obj/src/gui.o(.text+0x2bb0):src/gui.c:1451: first defined here
    obj/src/gui_old.o(.text+0x2a48): In function `PrerenderFonts':
    src/gui_old.c:1438: multiple definition of `PrerenderFonts'
    obj/src/gui.o(.text+0x2ce4):src/gui.c:1432: first defined here
    obj/src/gui_old.o(.text+0x2eec): In function `DisplayPlayTime':
    src/gui_old.c:1501: multiple definition of `DisplayPlayTime'
    obj/src/gui.o(.text+0x3188):src/gui.c:1495: first defined here
    
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    2nd half of the build message

    
    /cygdrive/d/altera/80/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/..
    /../../../nios2-elf/bin/ld: Warning: size of symbol `DisplayPlayTime' changed from 612 in obj/src/gu
    i.o to 736 in obj/src/gui_old.o
    obj/src/gui_old.o(.text+0x31cc): In function `CoordsAreWithinBox':
    src/gui_old.c:1576: multiple definition of `CoordsAreWithinBox'
    obj/src/gui.o(.text+0x33ec):src/gui.c:1562: first defined here
    obj/src/gui_old.o(.text+0x3200): In function `UpdatePlayTime':
    src/gui_old.c:1603: multiple definition of `UpdatePlayTime'
    obj/src/gui.o(.text+0x3420):src/gui.c:1589: first defined here
    obj/src/gui_old.o(.text+0x32e8): In function `CoordsAreOnPlaylist':
    src/gui_old.c:1637: multiple definition of `CoordsAreOnPlaylist'
    obj/src/gui.o(.text+0x3508):src/gui.c:1623: first defined here
    obj/src/gui_old.o(.text+0x3348): In function `CoordsAreOnScrollBulb':
    src/gui_old.c:1671: multiple definition of `CoordsAreOnScrollBulb'
    obj/src/gui.o(.text+0x3568):src/gui.c:1657: first defined here
    obj/src/gui_old.o(.text+0x339c): In function `CoordsAreOnScroll':
    src/gui_old.c:1699: multiple definition of `CoordsAreOnScroll'
    obj/src/gui.o(.text+0x35bc):src/gui.c:1685: first defined here
    obj/src/gui_old.o(.text+0x33dc): In function `CalculateScrollBulbCoords':
    src/gui_old.c:1729: multiple definition of `CalculateScrollBulbCoords'
    obj/src/gui.o(.text+0x35fc):src/gui.c:1715: first defined here
    obj/src/gui_old.o(.text+0x3464): In function `DisplaySimpleVertScroll':
    src/gui_old.c:1773: multiple definition of `DisplaySimpleVertScroll'
    obj/src/gui.o(.text+0x3684):src/gui.c:1759: first defined here
    obj/src/gui_old.o(.text+0x364c): In function `SetTotalScrollItems':
    src/gui_old.c:1938: multiple definition of `SetTotalScrollItems'
    obj/src/gui.o(.text+0x386c):src/gui.c:1924: first defined here
    obj/src/gui_old.o(.text+0x3738): In function `SetCurrentScrollIndex':
    src/gui_old.c:1960: multiple definition of `SetCurrentScrollIndex'
    obj/src/gui.o(.text+0x3958):src/gui.c:1946: first defined here
    obj/src/gui_old.o(.text+0x37c0): In function `InitializePlaylistGUI':
    src/gui_old.c:1830: multiple definition of `InitializePlaylistGUI'
    obj/src/gui.o(.text+0x39e0):src/gui.c:1816: first defined here
    obj/src/gui_old.o(.text+0x3aa4): In function `SetReferenceScrollIndex':
    src/gui_old.c:1974: multiple definition of `SetReferenceScrollIndex'
    obj/src/gui.o(.text+0x3cc4):src/gui.c:1960: first defined here
    obj/src/gui_old.o(.text+0x3b30): In function `ScrollPlaylistToIndex':
    src/gui_old.c:1990: multiple definition of `ScrollPlaylistToIndex'
    obj/src/gui.o(.text+0x3d50):src/gui.c:1976: first defined here
    obj/src/gui_old.o(.text+0x3b50): In function `CalculateScrollIndex':
    src/gui_old.c:2008: multiple definition of `CalculateScrollIndex'
    obj/src/gui.o(.text+0x3d70):src/gui.c:1994: first defined here
    obj/src/gui_old.o(.text+0x3c00): In function `UpdatePlaylistScroll':
    src/gui_old.c:2042: multiple definition of `UpdatePlaylistScroll'
    obj/src/gui.o(.text+0x3e20):src/gui.c:2028: first defined here
    obj/src/gui_old.o(.text+0x3e48): In function `DisplayPlaylist':
    src/gui_old.c:2118: multiple definition of `DisplayPlaylist'
    obj/src/gui.o(.text+0x4068):src/gui.c:2104: first defined here
    /cygdrive/d/altera/80/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/..
    /../../../nios2-elf/bin/ld: Warning: size of symbol `DisplayPlaylist' changed from 592 in obj/src/gu
    i.o to 744 in obj/src/gui_old.o
    obj/src/gui_old.o(.text+0x4130): In function `GetPointerToRelativePlaylistNode':
    src/gui_old.c:2211: multiple definition of `GetPointerToRelativePlaylistNode'
    obj/src/gui.o(.text+0x42b8):src/gui.c:2187: first defined here
    obj/src/gui_old.o(.text+0x4248): In function `UpdatePlaylist':
    src/gui_old.c:2302: multiple definition of `UpdatePlaylist'
    obj/src/gui.o(.text+0x42d4):src/gui.c:2211: first defined here
    obj/src/gui_old.o(.text+0x43b4): In function `InitializeNowPlayingGUI':
    src/gui_old.c:2377: multiple definition of `InitializeNowPlayingGUI'
    obj/src/gui.o(.text+0x4440):src/gui.c:2286: first defined here
    obj/src/gui_old.o(.text+0x4530): In function `DisplayNowPlayingElements':
    src/gui_old.c:2413: multiple definition of `DisplayNowPlayingElements'
    obj/src/gui.o(.text+0x45bc):src/gui.c:2322: first defined here
    obj/src/gui_old.o(.text+0x46d0): In function `DisplayNowPlaying':
    src/gui_old.c:2452: multiple definition of `DisplayNowPlaying'
    obj/src/gui.o(.text+0x475c):src/gui.c:2361: first defined here
    /cygdrive/d/altera/80/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/..
    /../../../nios2-elf/bin/ld: Warning: size of symbol `DisplayNowPlaying' changed from 616 in obj/src/
    gui.o to 624 in obj/src/gui_old.o
    obj/src/gui_old.o(.text+0x4940): In function `UpdateNowPlayingScroll':
    src/gui_old.c:2505: multiple definition of `UpdateNowPlayingScroll'
    obj/src/gui.o(.text+0x49c4):src/gui.c:2413: first defined here
    obj/src/gui_old.o(.text+0x4a20): In function `UpdateNowPlayingStrings':
    src/gui_old.c:2523: multiple definition of `UpdateNowPlayingStrings'
    obj/src/gui.o(.text+0x4aa4):src/gui.c:2431: first defined here
    obj/src/gui_old.o(.text+0x4cd0): In function `UpdateNowPlaying':
    src/gui_old.c:2579: multiple definition of `UpdateNowPlaying'
    obj/src/gui.o(.text+0x4d54):src/gui.c:2487: first defined here
    obj/src/gui_old.o(.text+0x4ddc): In function `DisplayStatusMessage':
    src/gui_old.c:2604: multiple definition of `DisplayStatusMessage'
    obj/src/gui.o(.text+0x4e60):src/gui.c:2512: first defined here
    obj/src/gui_old.o(.text+0x4ec0): In function `ClearNowPlayingWindow':
    src/gui_old.c:2637: multiple definition of `ClearNowPlayingWindow'
    obj/src/gui.o(.text+0x4f44):src/gui.c:2545: first defined here
    obj/src/gui_old.o(.text+0x4f44): In function `DrawInitialScreenMain':
    src/gui_old.c:2659: multiple definition of `DrawInitialScreenMain'
    obj/src/gui.o(.text+0x55d0):src/gui.c:2714: first defined here
    obj/src/gui_old.o(.text+0x55c0): In function `UpdateGUIMain':
    src/gui_old.c:2752: multiple definition of `UpdateGUIMain'
    obj/src/gui.o(.text+0x4fc8):src/gui.c:2567: first defined here
    /cygdrive/d/altera/80/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/..
    /../../../nios2-elf/bin/ld: Warning: size of symbol `UpdateGUIMain' changed from 1544 in obj/src/gui
    .o to 1556 in obj/src/gui_old.o
    collect2: ld returned 1 exit status
    make: ***  Error 1
    
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It looks like you have two files in the project that conflict and define the same functions: gui.c and gui_old.c

    You should remove one of them from the project, or see in those two file if there are some# ifdefs that you could use to prevent one of the files to define any function.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    oh wow! its now working... thanks to you Mr. Daixiwen for great and fast reply... :)