<div dir="ltr">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.<div><br></div><div>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:</div><div><br></div><div><font face="monospace" color="#38761d"><b>./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<br></b></font></div><div><br></div><div><div><font face="monospace" color="#38761d"><b style="">  Configuration summary :</b></font></div><div><font face="monospace" color="#38761d"><b><br></b></font></div><div><font face="monospace" color="#38761d"><b>    FLAC version : ........................ 1.3.2</b></font></div><div><font face="monospace" color="#38761d"><b><br></b></font></div><div><font face="monospace" color="#38761d"><b>    Host CPU : ............................ arm</b></font></div><div><font face="monospace" color="#38761d"><b>    Host Vendor : ......................... none</b></font></div><div><font face="monospace" color="#38761d"><b>    Host OS : ............................. eabi</b></font></div><div><font face="monospace" color="#38761d"><b><br></b></font></div><div><font face="monospace" color="#38761d"><b>    Compiler is GCC : ..................... yes</b></font></div><div><font face="monospace" color="#38761d"><b>    GCC version : ......................... 5.4.1</b></font></div><div><font face="monospace" color="#38761d"><b>    Compiler is Clang : ................... no</b></font></div><div><font face="monospace" color="#38761d"><b>    SSE optimizations : ................... yes</b></font></div><div><font face="monospace" color="#38761d"><b>    Asm optimizations : ................... no</b></font></div><div><font face="monospace" color="#38761d"><b>    Ogg/FLAC support : .................... no</b></font></div></div><div><br></div><div>I'm getting some errors around type mismatches between the declarations and definitions for example:</div><div><br></div><div><div><b><font color="#38761d" face="monospace">grabbag/cuesheet.c:32:10: error: conflicting types for 'grabbag__cuesheet_msf_to_frame'</font></b></div><div><b><font color="#38761d" face="monospace"> uint32_t grabbag__cuesheet_msf_to_frame(uint32_t minutes, uint32_t seconds, uint32_t frames)</font></b></div><div><b><font color="#38761d" face="monospace">          ^</font></b></div><div><b><font color="#38761d" face="monospace">In file included from ../../include/share/grabbag.h:24:0,</font></b></div><div><b><font color="#38761d" face="monospace">                 from grabbag/cuesheet.c:29:</font></b></div><div><b><font color="#38761d" face="monospace">../../include/share/grabbag/cuesheet.h:32:10: note: previous declaration of 'grabbag__cuesheet_msf_to_frame' was here</font></b></div><div><b><font color="#38761d" face="monospace"> unsigned grabbag__cuesheet_msf_to_frame(unsigned minutes, unsigned seconds, unsigned frames);</font></b></div><div><br></div></div><div>I can see that the variables in the header are not declared using the <stdint.h> values.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Thanks for reading,</div><div><br></div><div>Kenny</div></div>