MP3 Audio Decoder on STM32F4 Discovery (update)

Posted by

I have made small updates to the code :

– Using -Os instead of -O3 gives much better performance (load is <20%) - Used 'ssat' instruction for clipping output instead of the basic 'minimad.c' code example. New code/Binary is here .

MP3 in : lg 879457
...
Decoding return 0
Timing Max. 518 19.82 %
Timing Min. 437 16.72 %
Timing Moy. 466 17.83 %

9 comments

  1. Thank you for publishing this article. Your binary worked on my F4Discovery, but not my build from source. I’m using Eclipse + Codesourcery Lite 4.6.1 on Windows. When I build with soft floating point, I get only noise. I can’t build with hard floating point, as Mentor doesn’t distribute the libs with cs lite. I saw your build used Codesourcery Lite as well. How did you you obtain the hard FP libs?

    What I’m attempting to do at this point is implement a USB audio streaming device. I have been trying to combine the USB Audio device example in STM32_USB-Host-Device_Lib_V2.1.0 with the f4 discovery codec. The stitcking point seems to be understanding how to initialize and manage the DMA buffers for the codec. I think I will be able to study your version of waveplayer.c to get it working. Thank you again.

    Best regards,
    Jon

    1. Well, I am not using Eclipse so I don’t know what are your flags for C compiling.

      If it can help, here is the compilation command used for one of the C file :

      arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/waveplayer.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/waveplayer.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/waveplayer.c -o build/obj/waveplayer.o

      And here is the final link line :

      arm-none-eabi-gcc build/obj/startup_stm32f4xx.o build/obj/stm32f4_discovery.o build/obj/stm32f4_discovery_audio_codec.o build/obj/misc.o build/obj/stm32f4xx_dac.o build/obj/stm32f4xx_dma.o build/obj/stm32f4xx_exti.o build/obj/stm32f4xx_gpio.o build/obj/stm32f4xx_i2c.o build/obj/stm32f4xx_rcc.o build/obj/stm32f4xx_spi.o build/obj/stm32f4xx_syscfg.o build/obj/stm32f4xx_usart.o build/obj/stm32f4xx_tim.o build/obj/bit.o build/obj/decoder.o build/obj/fixed.o build/obj/frame.o build/obj/huffman.o build/obj/layer3.o build/obj/layer12.o build/obj/stream.o build/obj/synth.o build/obj/timer.o build/obj/version.o build/obj/main.o build/obj/stm32f4xx_it.o build/obj/system_stm32f4xx.o build/obj/waveplayer.o -mcpu=cortex-m4 -nostartfiles -Tstm32_flash.ld -Wl,-Map=build/audio.map,--cref,--no-warn-mismatch,--gc-sections -mno-thumb-interwork -mthumb -o build/audio.elf

      My version of GCC is : gcc version 4.5.2 (Sourcery G++ Lite 2011.03-42)

      1. Thanks for replying. I didn’t mention that I had set my compile and link flags like yours. There are a few differences in the link (me: -nostdlib you: -nostartupfiles)that may be relevant. I think I tried -nostartupfiles first, but I’m not sure. Maybe my assembler flags are the problem.

        My next step will be to try to compile and link a minimal program with hard FP options. I’ll let you know what I observe.

        My compilation and link:

        cs-make all
        ‘Building file: ../Startup/startup_stm32f4xx.S’
        ‘Invoking: ARM Sourcery Windows GCC Assembler’
        arm-none-eabi-gcc -x assembler-with-cpp -Wall -Wa,-adhlns=”Startup/startup_stm32f4xx.o.lst” -c -fmessage-length=0 -MMD -MP -MF”Startup/startup_stm32f4xx.d” -MT”Startup/startup_stm32f4xx.d” -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o “Startup/startup_stm32f4xx.o” “../Startup/startup_stm32f4xx.S”
        ‘Finished building: ../Startup/startup_stm32f4xx.S’
        ‘ ‘
        ‘Building file: ../Src/main.c’
        ‘Invoking: ARM Sourcery Windows GCC C Compiler’
        arm-none-eabi-gcc -DUSE_STM32F4_DISCOVERY -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -DTHUMB -DSTM32F4XX -DUSE_STDPERIPH_DRIVER -DFPM_ARM -DHAVE_CONFIG_H -IC:/Users/Utilities/STM32F4-Discovery -IC:/Users/Libraries/CMSIS/Include -IC:/Users/Libraries/CMSIS/ST/STM32F4xx/Include -IC:/Users/Libraries/STM32F4xx_StdPeriph_Driver/inc -I”C:Usersvibrolaxstm32f4discovery_projectsworkspaceAudioMP3Src” -I”C:Usersvibrolaxstm32f4discovery_projectsworkspaceAudioMP3Inc” -Os -ffunction-sections -fdata-sections -MD -MF -MP -mfloat-abi=softfp -mno-thumb-interwork -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fno-common -Wall -Wextra -Wa,-adhlns=”Src/main.o.lst” -c -fmessage-length=0 -MMD -MP -MF”Src/main.d” -MT”Src/main.d” -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o “Src/main.o” “../Src/main.c”
        In file included from ../Src/main.c:63:0:
        ../Src/chprintf.c: In function ‘chIOPut’:
        ../Src/chprintf.c:30:20: warning: unused parameter ‘chp’ [-Wunused-parameter]
        In file included from ../Src/main.c:65:0:
        ../Src/mad.c: In function ‘output’:
        ../Src/mad.c:140:28: warning: unused parameter ‘data’ [-Wunused-parameter]
        ../Src/mad.c:141:33: warning: unused parameter ‘header’ [-Wunused-parameter]
        ../Src/mad.c: In function ‘error’:
        ../Src/mad.c:205:25: warning: unused parameter ‘frame’ [-Wunused-parameter]
        ‘Finished building: ../Src/main.c’

        The link step:
        ‘Building target: AudioMP3.elf’
        ‘Invoking: ARM Sourcery Windows GCC C Linker’
        arm-none-eabi-gcc -T”../stm32_flash.ld” -nostdlib -Xlinker –gc-sections -Wl,-Map,AudioMP3.map -mno-thumb-interwork -mhard-float -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mfloat-abi=hard -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o “AudioMP3.elf” ./Startup/startup_stm32f4xx.o ./Src/main.o ./Src/stm32f4xx_it.o ./Src/system_stm32f4xx.o ./Src/waveplayer.o ./STM32F4xx_StdPeriph_Driver/misc.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_dac.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_dma.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_exti.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_gpio.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_i2c.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_rcc.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_spi.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_syscfg.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_tim.o ./STM32F4xx_StdPeriph_Driver/stm32f4xx_usart.o ./STM32F4_Discovery/stm32f4_discovery.o ./STM32F4_Discovery/stm32f4_discovery_audio_codec.o ./LibMAD/bit.o ./LibMAD/decoder.o ./LibMAD/fixed.o ./LibMAD/frame.o ./LibMAD/huffman.o ./LibMAD/layer12.o ./LibMAD/layer3.o ./LibMAD/stream.o ./LibMAD/synth.o ./LibMAD/timer.o ./LibMAD/version.o
        c:/program files (x86)/codesourcery/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld.exe: error: AudioMP3.elf uses VFP register arguments, c:/program files (x86)/codesourcery/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb2libc.a(lib_a-memcpy.o) does not
        c:/program files (x86)/codesourcery/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file c:/program files (x86)/codesourcery/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb2libc.a(lib_a-memcpy.o)
        c:/program files (x86)/codesourcery/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld.exe: error: AudioMP3.elf uses VFP register arguments, c:/program files (x86)/codesourcery/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb2libc.a(lib_a-memmove.o) does not

        Best regards,
        Jon

        1. You have two different ‘-mfloat-abi’ options : ‘softfp’ in compile phase, ‘hard’ during linker phase. Not 100% sure that this is your problem but it looks strange to me. I don’t have any ‘float-abi’ specified in my (which is in fact chibios based) Makefile, thus it is probably using a default setting.

          By the way, I must admit that the project at http://forum.chibios.org/phpbb/viewtopic.php?f=4&t=351 is very nice too, using ChibiOS and Helix decoder instead of libmad.

          1. Thanks. I will look into the -mfloat-abi issue. I have also obtained the ChibiOS project you referenced. I don’t have an SD card interface hooked up to my board, (though I like your hacked method of attaching one). I decided to try yours first since it didn’t require any external storage interface. Of course I want to use the STM32F4’s FPU, so your project is a nice way to explore that aspect. I have only a few minutes per day to work on this, so my progress is limited at times. I appreciate your assistance.

            Best regards,
            Jon

  2. Looking into my floating point issues with CodeSourcerey G++ Lite, I believe that the following command shows that the hardware floating point libraries were not configured.

    C:Usersvibrolax>arm-none-eabi-gcc -print-multi-lib
    .;
    thumb;@mthumb
    armv6-m;@mthumb@march=armv6-m
    thumb2;@mthumb@march=armv7@mfix-cortex-m3-ldrd

    Today I built the arm-none-eabi-gcc from source using summon-arm-toolchain.
    arm-none-eabi-gcc -print-multi-lib executed on the source-built gcc gives:

    thumb;@mthumb
    fpu;@float-abi=hard

    The toolchain build failed building gdb, so I have a few more things to sort out before I can switch out of CodeSourcery. I might also be able to configure Codesourcery to use the source-built libraries. I am learning a lot, and see some advantages from using a source-built toolchain.

    Best regards,
    Jon

    1. My CodeSourcerey also gives :

      arm-none-eabi-gcc -print-multi-lib
      .;
      thumb;@mthumb
      armv6-m;@mthumb@march=armv6-m
      thumb2;@mthumb@march=armv7@mfix-cortex-m3-ldrd

      I was thinking that the code was not using floats since the libmad was using integer arithmetic, but the ‘timer.c’ that just gives some stats is using floats. But it is not used for MP3 decoding, thus it is possible to remove it (frame.c has to be adjusted not to use it). Then I checked what were the remaining parts that needed to link with libc.a and it was only used by 4-to-5 calls to memcpy/memmove in ‘layer3.c’ : I have quickly coded a dumb memmove/memcpy function and now the code shouldn’t need libc anymore.

      If you want to give this version a try : it is here.

  3. The project without floats and libc still failed to link with the Windows CodeSourcery in the same fashion as before. I gave up with that, and proceeded to build your project unaltered in any way from the command line with an arm-none-eabi toolchain of GCC 4.6.2, newlib 1.19, and gdb 7.3.1, under Windows MinGW. It built normally, but when executed the results were the same as my soft-float build with CodeSourcery: a click and then noise, with the blue LED stuck on. The build command was simply ‘make’. I downloaded audio.hex to the board using the ST stlink utility.

    The Library and Utilities came from STM32F4-Discovery_FW_V1.1.0. Is this what you used?

    Since I don’t really need the mp3 function at this point, I’m going to try feeding your version of waveplayer with uncompressed samples in memory in USB frame-sized chunks.

    For reference, here’s my make output:
    mkdir -p build/obj
    mkdir -p build/lst

    arm-none-eabi-gcc -x assembler-with-cpp -c -mcpu=cortex-m4 -Wa,-amhls=build/lst/startup_stm32f4xx.lst -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s -o build/obj/startup_stm32f4xx.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4_discovery.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4_discovery.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Utilities/STM32F4-Discovery/stm32f4_discovery.c -o build/obj/stm32f4_discovery.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4_discovery_audio_codec.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4_discovery_audio_codec.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c -o build/obj/stm32f4_discovery_audio_codec.o
    ../../../Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c: In function ‘Codec_Init’:
    ../../../Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:609:37: warning: unused parameter ‘OutputDevice’ [-Wunused-parameter]
    ../../../Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c: In function ‘Audio_MAL_PauseResume’:
    ../../../Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:1546:58: warning: unused parameter ‘Addr’ [-Wunused-parameter]

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/misc.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/misc.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c -o build/obj/misc.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_dac.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_dac.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dac.c -o build/obj/stm32f4xx_dac.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_dma.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_dma.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c -o build/obj/stm32f4xx_dma.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_exti.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_exti.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c -o build/obj/stm32f4xx_exti.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_gpio.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_gpio.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c -o build/obj/stm32f4xx_gpio.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_i2c.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_i2c.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c -o build/obj/stm32f4xx_i2c.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_rcc.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_rcc.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c -o build/obj/stm32f4xx_rcc.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_spi.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_spi.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c -o build/obj/stm32f4xx_spi.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_syscfg.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_syscfg.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c -o build/obj/stm32f4xx_syscfg.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_usart.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_usart.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c -o build/obj/stm32f4xx_usart.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_tim.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_tim.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c -o build/obj/stm32f4xx_tim.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/bit.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/bit.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/bit.c -o build/obj/bit.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/decoder.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/decoder.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/decoder.c -o build/obj/decoder.o
    ../src/libmad/decoder.c: In function ‘mad_decoder_finish’:
    ../src/libmad/decoder.c:96:44: warning: unused parameter ‘decoder’ [-Wunused-parameter]
    ../src/libmad/decoder.c: In function ‘mad_decoder_message’:
    ../src/libmad/decoder.c:569:45: warning: unused parameter ‘decoder’ [-Wunused-parameter]
    ../src/libmad/decoder.c:570:10: warning: unused parameter ‘message’ [-Wunused-parameter]
    ../src/libmad/decoder.c:570:33: warning: unused parameter ‘len’ [-Wunused-parameter]

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/fixed.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/fixed.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/fixed.c -o build/obj/fixed.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/frame.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/frame.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/frame.c -o build/obj/frame.o
    ../src/libmad/frame.c: In function ‘mad_header_decode’:
    ../src/libmad/frame.c:320:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    ../src/libmad/frame.c:407:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/huffman.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/huffman.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/huffman.c -o build/obj/huffman.o
    ../src/libmad/huffman.c:3081:12: warning: missing initializer [-Wmissing-field-initializers]
    ../src/libmad/huffman.c:3081:12: warning: (near initialization for ‘mad_huff_pair_table[4].linbits’) [-Wmissing-field-initializers]
    ../src/libmad/huffman.c:3091:12: warning: missing initializer [-Wmissing-field-initializers]
    ../src/libmad/huffman.c:3091:12: warning: (near initialization for ‘mad_huff_pair_table[14].linbits’) [-Wmissing-field-initializers]

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/layer3.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/layer3.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/layer3.c -o build/obj/layer3.o
    ../src/libmad/layer3.c: In function ‘III_requantize’:
    ../src/libmad/layer3.c:908:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    ../src/libmad/layer3.c: In function ‘III_huffdecode’:
    ../src/libmad/layer3.c:1067:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    ../src/libmad/layer3.c:1102:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/layer12.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/layer12.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/layer12.c -o build/obj/layer12.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stream.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stream.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/stream.c -o build/obj/stream.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/synth.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/synth.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/synth.c -o build/obj/synth.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/version.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/version.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/libmad/version.c -o build/obj/version.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/main.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/main.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/main.c -o build/obj/main.o
    In file included from ../src/main.c:34:0:
    ../src/chprintf.c: In function ‘chIOPut’:
    ../src/chprintf.c:30:20: warning: unused parameter ‘chp’ [-Wunused-parameter]
    In file included from ../src/main.c:36:0:
    ../src/mad.c: In function ‘output’:
    ../src/mad.c:140:28: warning: unused parameter ‘data’ [-Wunused-parameter]
    ../src/mad.c:141:33: warning: unused parameter ‘header’ [-Wunused-parameter]
    ../src/mad.c: In function ‘error’:
    ../src/mad.c:205:25: warning: unused parameter ‘frame’ [-Wunused-parameter]

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/stm32f4xx_it.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/stm32f4xx_it.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/stm32f4xx_it.c -o build/obj/stm32f4xx_it.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/system_stm32f4xx.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/system_stm32f4xx.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/system_stm32f4xx.c -o build/obj/system_stm32f4xx.o

    arm-none-eabi-gcc -c -mcpu=cortex-m4 -Os -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/waveplayer.lst -DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DFPM_ARM -DHAVE_CONFIG_H -DNOTIMER -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/waveplayer.o.d -mthumb -DTHUMB -I. -I../inc -I../../../Utilities/STM32F4-Discovery -I../../../Libraries/CMSIS/Include -I../../../Libraries/CMSIS/ST/STM32F4xx/Include -I../../../Libraries/STM32F4xx_StdPeriph_Driver/inc ../src/waveplayer.c -o build/obj/waveplayer.o
    ../src/waveplayer.c: In function ‘WavePlayerInit’:
    ../src/waveplayer.c:61:3: warning: implicit declaration of function ‘chprintf’ [-Wimplicit-function-declaration]
    ../src/waveplayer.c: In function ‘EVAL_AUDIO_TransferComplete_CallBack’:
    ../src/waveplayer.c:81:52: warning: unused parameter ‘pBuffer’ [-Wunused-parameter]
    ../src/waveplayer.c:81:70: warning: unused parameter ‘Size’ [-Wunused-parameter]
    ../src/waveplayer.c: In function ‘EVAL_AUDIO_HalfTransfer_CallBack’:
    ../src/waveplayer.c:103:48: warning: unused parameter ‘pBuffer’ [-Wunused-parameter]
    ../src/waveplayer.c:103:66: warning: unused parameter ‘Size’ [-Wunused-parameter]
    ../src/waveplayer.c: In function ‘EVAL_AUDIO_Error_CallBack’:
    ../src/waveplayer.c:117:38: warning: unused parameter ‘pData’ [-Wunused-parameter]
    ../src/waveplayer.c: In function ‘WavePlayerInit’:
    ../src/waveplayer.c:61:3: warning: ‘res’ is used uninitialized in this function [-Wuninitialized]

    arm-none-eabi-gcc build/obj/startup_stm32f4xx.o build/obj/stm32f4_discovery.o build/obj/stm32f4_discovery_audio_codec.o build/obj/misc.o build/obj/stm32f4xx_dac.o build/obj/stm32f4xx_dma.o build/obj/stm32f4xx_exti.o build/obj/stm32f4xx_gpio.o build/obj/stm32f4xx_i2c.o build/obj/stm32f4xx_rcc.o build/obj/stm32f4xx_spi.o build/obj/stm32f4xx_syscfg.o build/obj/stm32f4xx_usart.o build/obj/stm32f4xx_tim.o build/obj/bit.o build/obj/decoder.o build/obj/fixed.o build/obj/frame.o build/obj/huffman.o build/obj/layer3.o build/obj/layer12.o build/obj/stream.o build/obj/synth.o build/obj/version.o build/obj/main.o build/obj/stm32f4xx_it.o build/obj/system_stm32f4xx.o build/obj/waveplayer.o -mcpu=cortex-m4 -nostartfiles -Tstm32_flash.ld -Wl,-Map=build/audio.map,–cref,–no-warn-mismatch,–gc-sections -mno-thumb-interwork -mthumb -o build/audio.elf
    arm-none-eabi-objcopy -O ihex build/audio.elf build/audio.hex
    arm-none-eabi-objcopy -O binary build/audio.elf build/audio.bin
    arm-none-eabi-objdump -x –syms build/audio.elf > build/audio.dmp

Leave a Reply

Your email address will not be published. Required fields are marked *