[Flac] FLAC on ARM Cortex-M4
Kenny Koller
kenny at understoryweather.com
Thu Oct 19 03:25:18 UTC 2017
I'd like to compress a 32 kHz 16-bit mono using an STM32F4 microcontroller.
My plan is to capture from 500-1000 ms of data, compress, and send the
result over a UART.
I have the arm-none-eabi tools installed on MacOS. I used homebrew to
install autoconf, automake, and libtool. autogen.sh succeeded and I was
able to create my makefiles using the following:
*./configure --build=x86_64-apple-darwin16.7.0 --host=arm-none-eabi
--prefix=$PWD/export CFLAGS="-O3 -mthumb -mcpu=cortex-m4 -lc -lrdimon
-specs=rdimon.specs" --disable-cpplibs --disable-ogg --disable-oggtest
--disable-examples --disable-xmms-plugin*
* Configuration summary :*
* FLAC version : ........................ 1.3.2*
* Host CPU : ............................ arm*
* Host Vendor : ......................... none*
* Host OS : ............................. eabi*
* Compiler is GCC : ..................... yes*
* GCC version : ......................... 5.4.1*
* Compiler is Clang : ................... no*
* SSE optimizations : ................... yes*
* Asm optimizations : ................... no*
* Ogg/FLAC support : .................... no*
I'm getting some errors around type mismatches between the declarations and
definitions for example:
*grabbag/cuesheet.c:32:10: error: conflicting types for
'grabbag__cuesheet_msf_to_frame'*
* uint32_t grabbag__cuesheet_msf_to_frame(uint32_t minutes, uint32_t
seconds, uint32_t frames)*
* ^*
*In file included from ../../include/share/grabbag.h:24:0,*
* from grabbag/cuesheet.c:29:*
*../../include/share/grabbag/cuesheet.h:32:10: note: previous declaration
of 'grabbag__cuesheet_msf_to_frame' was here*
* unsigned grabbag__cuesheet_msf_to_frame(unsigned minutes, unsigned
seconds, unsigned frames);*
I can see that the variables in the header are not declared using the
<stdint.h> values.
More broadly though: Assuming I can sort out these errors, am I on the
right track/ My experiments have shown that a compression level of zero
will meet my needs and I have read that encoding is faster than real-time.
Once I have the library built I plan to measure things. But I'm seeing
calls to fprintf etc that I don't need. If I just want encodying functions
but not the general purpose flac tool is there any advice as to how to pare
this back further so I'm only building what I need. I'm not too concerned
about library size as the linker should just pull in what is needed. It's
more that I would like fewer things to debug in the build.
Is it possible to encode on-the-fly? I have 192 KB of RAM. It'd be nice if
I could compress straight to a buffer.
Thanks for reading,
Kenny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/flac/attachments/20171019/6d0efe01/attachment.html>
More information about the Flac
mailing list