2016-03-01 11:02 PM
Hei there
Is there any working mp3 player using this eval board ?Right now I try helix mp3 decoder but cannot compile using keil v4.There are some error on assembly.h i cannot understand.Please guide me thanks. #mp3-stm32f4 #mp3-player2016-03-02 04:13 AM
> Is there any working mp3 player using this eval board ?
Didn't try it myself, but my favorite search engine told me this (amongst others):
http://vedder.se/2012/12/stm32f4-discovery-usb-host-and-mp3-player/
http://www.codeforge.com/s/0/STM32F4-MP3-codec
https://github.com/vanbwodonk/STM32F4_USB_MP3
>There are some error on assembly.h i cannot understand.>Please guide me thanks.
Posting the compiler/assembler/linker output would be really helpful. Not much clairvoyants here ...
2016-03-02 04:42 PM
2016-03-02 10:23 PM
I don't mess with an assembler often, but IMHO, the source (
..\Src\helix
eal\assembly.h
) seems to use the gas (Gnu Assembler) syntax, which is incompatible with the Keil assembler syntax.
2016-03-03 04:59 PM
Hello Avatar
So what do you suggest for me?2016-03-03 10:43 PM
>So what do you suggest for me?
I don't know this Cortex-M port, but if this assembler routines are actually gcc code, you have two option. The first is to port those assembler routines to Keil. The second one is to use a gcc-based toolchain to build your application. Or perhaps, you can use such a toolchain to build a library, and link it into your Keil project.2016-03-04 01:38 AM
Hello Avatar
Thanks for your suggestion.I manage to compile the helix mp3 codec with gnu toolchain and got libhelix.a file.But i am kinda a puzzle how to include and use this library file into my keil project. Can you tell me how to do it ?Thank you2016-03-04 02:45 AM
> Can you tell me how to do it ?
Only in general terms - I'm no uVision user. But usually, you have to add the library to the project. In a usual make-file base build, one would add ''
-lhelix
'' to the linker flags, to include the librarylibhelix.a
for linking. And you will need to add the helix header file (*.h) that declares the Helix API to your project, too. You might consult the uVision help/documentation or the Keil user forum, too. This assumes that Keil uVision can link against this format, and you have matching floating point ABIs for both the library and the rest of the application.2016-03-06 11:25 PM
Man this stuff really killing me!!
OK, i succeed compile my project using libhelix.a by adding --wchar32 option to C/C++ project like u said to match ABIs library and rest of application. When I download my mp3 .hex file using ST LINK Utility produce error. It saidProgramming error @: 0x00008000.
I thought my board was NG. But when I download another hex is fine. So there something wrong with my mp3 .hex file. Do you have any idea why? I also try by adding linker --fpu=[listname] but none of fpu work. here's the make file I didn't change anything still original from site.#BINPATH=~/sat/bin
CC=arm-none-eabi-gcc
AR=arm-none-eabi-ar
###################################################
# Check for valid float argument
ifneq ($(FLOAT_TYPE), hard)
ifneq ($(FLOAT_TYPE), soft)
override FLOAT_TYPE = hard
#override FLOAT_TYPE = soft
endif
endif
###################################################
vpath %.c real
CFLAGS = -g -O2 -Wall
CFLAGS += -mlittle-endian -mthumb -mthumb-interwork -mcpu=cortex-m4
ifeq ($(FLOAT_TYPE), hard)
CFLAGS += -fsingle-precision-constant -Wdouble-promotion
CFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
#CFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
else
CFLAGS += -msoft-float
endif
#-nostdlib
CFLAGS += -ffreestanding -nostdlib
CFLAGS += -Ireal -Ipub
SRCS = mp3dec.c mp3tabs.c bitstream.c buffers.c dctc dequant.c dqchan.c
SRCS += huffman.c hufftabs.c imdct.c polyphase.c scalfact.c
SRCS += stproc.c subband.c trigtabs_fixpt.c
OBJS = $(SRCS:.c=.o)
.PHONY: libhelix.a
all: libhelix.a
%.o : %.c
$(CC) $(CFLAGS) -c -o $@ $^
libhelix.a: $(OBJS)
$(AR) -r $@ $(OBJS)
clean:
rm -f $(OBJS) libhelix.a
2016-03-07 03:07 AM
> It said
Programming error @: 0x00008000.
Definitely not a issue with the downloaded code, but with the toolchain /IDE, which is for some reason unable to put the code into the Flash. Perhaps some Keil user here can help you, or you try the Keil support forum.