sparkfun / Arduino_Apollo3

Arduino core to support the Apollo3 microcontroller from Ambiq Micro
83 stars 37 forks source link

Example MicrophoneOutput not compiling on Artemis Thing Plus #355

Closed stevie67 closed 3 years ago

stevie67 commented 3 years ago

Hi,

none of the examples using the microphone compile on the mentioned board using Arduino with the 2.0.5 core. Here is the output:

_In file included from /Users/stevie/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.0.5/libraries/PDM/examples/Example1_MicrophoneOutput/Example1_MicrophoneOutput.ino:31: /Users/stevie/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.0.5/cores/mbed-os/cmsis/TARGET_CORTEX_M/arm_math.h:345:4: error: #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS, ARM_MATH_CM0, ARM_MATH_ARMV8MBL, ARM_MATH_ARMV8MML"

error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS, ARM_MATH_CM0, ARM_MATH_ARMV8MBL, ARM_MATHARMV8MML"

When defining ARM_MATHCM4 it complains about a duplicate define. And it also raises more errors: /Users/xxx/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.0.5/libraries/PDM/src/PDM.h:37:2: warning: #warning "Mic CLOCK pin not defined in variant. Using default." [-Wcpp]_

And also at the linker stage it complains about a missing symbol:

/_Users/xxx/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: sketch/Example1_MicrophoneOutput.ino.cpp.o: in function printLoudest()': /var/folders/tp/jn7h1nzs34g9x55ztlz3fwqh0000gn/T/arduino_modified_sketch_883686/Example1_MicrophoneOutput.ino:100: undefined reference toarm_cfft_radix4_initf32'

So it seems neither the math library nor the microphone is actually supported in the mentioned version of the Arduino core.

Wenn0101 commented 3 years ago

Fixed in v2.1.0