AudioMoth-Project icon indicating copy to clipboard operation
AudioMoth-Project copied to clipboard

Make fails related to gps module

Open louis-lerbourg opened this issue 1 year ago • 0 comments

  • commit a46c21f6d989d077eab73789168d0d8a3c1f778c
  • toolchain GNU ARM v7.2.1

Hi, I just cloned the project and tried to compile it with simplicity studio v5. I don't know how to solve the following problems :

  • The gps module is missing in the include.
  • Even when I manualy add gps/inc to the includes, the compiler does not find the reference for the gps interface handles (see bellow prototypes)
/* Interrupt handlers */

extern void GPSInterface_handlePulsePerSecond(uint32_t counter, uint32_t counterPeriod, uint32_t counterFrequency);

extern void GPSInterface_handleReceivedByte(uint8_t byte);

extern void GPSInterface_handleTick(void);

see the bellow make error logs

log

Missing headers (solved)

15:38:17 **** Build of configuration GNU ARM v7.2.1 - Release for project AudioMoth-Project ****
make -j4 all 
Building file: ../src/audiomoth.c
Building file: ../src/main.c
Building file: ../gps/src/gpsinterface.c
Invoking: GNU ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mthumb -std=c99 '-DARM_MATH_CM4=1' '-DEFM32WG380F256=1' -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\cmsis" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\device\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\drivers\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\emlib\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\emusb\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\fatfs\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\inc" -O3 -Wall -ffunction-sections -fdata-sections -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fmessage-length=0 -MMD -MP -MF"src/audiomoth.d" -MT"src/audiomoth.o" -o "src/audiomoth.o" "../src/audiomoth.c"
Invoking: GNU ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mthumb -std=c99 '-DARM_MATH_CM4=1' '-DEFM32WG380F256=1' -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\cmsis" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\device\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\drivers\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\emlib\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\emusb\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\fatfs\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\inc" -O3 -Wall -ffunction-sections -fdata-sections -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fmessage-length=0 -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
Invoking: GNU ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mthumb -std=c99 '-DARM_MATH_CM4=1' '-DEFM32WG380F256=1' -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\cmsis" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\device\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\drivers\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\emlib\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\emusb\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\fatfs\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\inc" -O3 -Wall -ffunction-sections -fdata-sections -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fmessage-length=0 -MMD -MP -MF"gps/src/gpsinterface.d" -MT"gps/src/gpsinterface.o" -o "gps/src/gpsinterface.o" "../gps/src/gpsinterface.c"
Building file: ../gps/src/gpsutilities.c
Invoking: GNU ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mthumb -std=c99 '-DARM_MATH_CM4=1' '-DEFM32WG380F256=1' -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\cmsis" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\device\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\drivers\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\emlib\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\emusb\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\fatfs\inc" -I"C:\Users\LL265908\SimplicityStudio\v5_workspace\AudioMoth-Project\inc" -O3 -Wall -ffunction-sections -fdata-sections -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fmessage-length=0 -MMD -MP -MF"gps/src/gpsutilities.d" -MT"gps/src/gpsutilities.o" -o "gps/src/gpsutilities.o" "../gps/src/gpsutilities.c"
../gps/src/gpsinterface.c:16:10: fatal error: gpsinterface.h: No such file or directory
 #include "gpsinterface.h"
          ^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [gps/src/subdir.mk:29: gps/src/gpsinterface.o] Error 1
make: *** Waiting for unfinished jobs....
Finished building: ../src/main.c
../gps/src/gpsutilities.c:11:10: fatal error: gpsutilities.h: No such file or directory
 #include "gpsutilities.h"
          ^~~~~~~~~~~~~~~~
compilation terminated.
../src/audiomoth.c: In function 'handleUSBPacket':
../src/audiomoth.c:1490:13: warning: implicit declaration of function 'AudioMoth_blinkDuringUSB'; did you mean 'AudioMoth_handleUSB'? [-Wimplicit-function-declaration]
             AudioMoth_blinkDuringUSB(USB_SET_TIME_BLINK);
             ^~~~~~~~~~~~~~~~~~~~~~~~
             AudioMoth_handleUSB
../src/audiomoth.c: At top level:
../src/audiomoth.c:1765:6: warning: conflicting types for 'AudioMoth_blinkDuringUSB'
 void AudioMoth_blinkDuringUSB(uint32_t milliseconds) {
      ^~~~~~~~~~~~~~~~~~~~~~~~
../src/audiomoth.c:1490:13: note: previous implicit declaration of 'AudioMoth_blinkDuringUSB' was here
             AudioMoth_blinkDuringUSB(USB_SET_TIME_BLINK);
             ^~~~~~~~~~~~~~~~~~~~~~~~
make: *** [gps/src/subdir.mk:36: gps/src/gpsutilities.o] Error 1
 
Finished building: ../src/audiomoth.c
 
"make -j4 all" terminated with exit code 2. Build might be incomplete.

15:38:19 Build Failed. 5 errors, 2 warnings. (took 1s.944ms)

Missing reference for extern handles (unsolved)

[...]
Building target: AudioMoth-Project.axf
Invoking: GNU ARM C Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mthumb -T "AudioMoth-Project.ld" -Xlinker --gc-sections -Xlinker -Map="AudioMoth-Project.map" -mfpu=fpv4-sp-d16 -mfloat-abi=hard --specs=nano.specs -o AudioMoth-Project.axf "./device/src/startup_efm32wg.o" "./device/src/system_efm32wg.o" "./emusb/src/em_usbd.o" "./emusb/src/em_usbdch9.o" "./emusb/src/em_usbdep.o" "./emusb/src/em_usbdint.o" "./emusb/src/em_usbhal.o" "./emusb/src/em_usbtimer.o" "./emlib/src/em_acmp.o" "./emlib/src/em_adc.o" "./emlib/src/em_aes.o" "./emlib/src/em_assert.o" "./emlib/src/em_burtc.o" "./emlib/src/em_can.o" "./emlib/src/em_cmu.o" "./emlib/src/em_core.o" "./emlib/src/em_cryotimer.o" "./emlib/src/em_crypto.o" "./emlib/src/em_csen.o" "./emlib/src/em_dac.o" "./emlib/src/em_dbg.o" "./emlib/src/em_dma.o" "./emlib/src/em_ebi.o" "./emlib/src/em_emu.o" "./emlib/src/em_gpcrc.o" "./emlib/src/em_gpio.o" "./emlib/src/em_i2c.o" "./emlib/src/em_idac.o" "./emlib/src/em_lcd.o" "./emlib/src/em_ldma.o" "./emlib/src/em_lesense.o" "./emlib/src/em_letimer.o" "./emlib/src/em_leuart.o" "./emlib/src/em_mpu.o" "./emlib/src/em_msc.o" "./emlib/src/em_opamp.o" "./emlib/src/em_pcnt.o" "./emlib/src/em_prs.o" "./emlib/src/em_qspi.o" "./emlib/src/em_rmu.o" "./emlib/src/em_rtc.o" "./emlib/src/em_rtcc.o" "./emlib/src/em_system.o" "./emlib/src/em_timer.o" "./emlib/src/em_usart.o" "./emlib/src/em_vcmp.o" "./emlib/src/em_vdac.o" "./emlib/src/em_wdog.o" "./drivers/src/dmactrl.o" "./drivers/src/microsd.o" "./fatfs/src/diskio.o" "./fatfs/src/ffunicode.o" "./fatfs/src/ff.o" "./src/main.o" -lm "./gps/src/gpsinterface.o" "./gps/src/gpsutilities.o" "./gps/src/nmeaparser.o" "./gps/src/sunrise.o" "./src/audiomoth.o" -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group
./gps/src/gpsinterface.o: In function `UART1_RX_IRQHandler':
gpsinterface.c:(.text.UART1_RX_IRQHandler+0x1c): undefined reference to `GPSInterface_handleReceivedByte'
./gps/src/gpsinterface.o: In function `TIMER2_IRQHandler':
gpsinterface.c:(.text.TIMER2_IRQHandler+0x2c): undefined reference to `GPSInterface_handlePulsePerSecond'
gpsinterface.c:(.text.TIMER2_IRQHandler+0x3a): undefined reference to `GPSInterface_handleTick'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:52: AudioMoth-Project.axf] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.

15:46:18 Build Failed. 4 errors, 2 warnings. (took 28s.790ms)

louis-lerbourg avatar Sep 12 '24 13:09 louis-lerbourg