STM32F0xx/ADC example not compiling Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
ceremcem
Posts: 67
Joined: Mon Aug 10, 2015 6:57 am
Has thanked: 7 times
Been thanked: 6 times

STM32F0xx/ADC example not compiling  Topic is solved

Postby ceremcem » Tue May 12, 2020 12:05 pm

Starting from https://github.com/ChibiOS/ChibiOS/commit/1647491035, testhal/STM32/STM32F0xx/ADC example fails to compile with the following error:

Code: Select all

Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m0 -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -ffunction-sections -fdata-sections -fno-common -flto -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=build/lst/ -DCORTEX_USE_FPU=FALSE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/build.d -I. -I../../../../os/license -I../../../../os/common/portability/GCC -I../../../../os/common/startup/ARMCMx/compilers/GCC -I../../../../os/common/startup/ARMCMx/devices/STM32F0xx -I../../../../os/common/ext/ARM/CMSIS/Core/Include -I../../../../os/common/ext/ST/STM32F0xx -I../../../../os/hal/include -I../../../../os/hal/ports/common/ARMCMx -I../../../../os/hal/ports/STM32/STM32F0xx -I../../../../os/hal/ports/STM32/LLD/ADCv1 -I../../../../os/hal/ports/STM32/LLD/CANv1 -I../../../../os/hal/ports/STM32/LLD/DACv1 -I../../../../os/hal/ports/STM32/LLD/DMAv1 -I../../../../os/hal/ports/STM32/LLD/EXTIv1 -I../../../../os/hal/ports/STM32/LLD/GPIOv2 -I../../../../os/hal/ports/STM32/LLD/I2Cv2 -I../../../../os/hal/ports/STM32/LLD/RTCv2 -I../../../../os/hal/ports/STM32/LLD/SPIv2 -I../../../../os/hal/ports/STM32/LLD/TIMv1 -I../../../../os/hal/ports/STM32/LLD/USARTv2 -I../../../../os/hal/ports/STM32/LLD/USBv1 -I../../../../os/hal/ports/STM32/LLD/xWDGv1 -I../../../../os/hal/boards/ST_STM32F0_DISCOVERY -I../../../../os/hal/osal/rt -I../../../../os/rt/include -I../../../../os/common/oslib/include -I../../../../os/common/ports/ARMCMx -I../../../../os/common/ports/ARMCMx/compilers/GCC main.c -o main.o

Compiling crt0_v6m.S
Compiling vectors.S
Compiling chcoreasm_v6m.S
Compiling crt1.c
Compiling hal.c
Compiling hal_st.c
Compiling hal_buffers.c
Compiling hal_queues.c
Compiling hal_mmcsd.c
Compiling hal_adc.c
Compiling hal_pal.c
Compiling nvic.c
Compiling stm32_isr.c
Compiling hal_lld.c
Compiling hal_adc_lld.c
../../../../os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c: In function 'adc_lld_stop_adc':
../../../../os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c:64:5: error: 'adcp' undeclared (first use in this function)
     adcp->adc->IER = 0;
     ^
../../../../os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c:64:5: note: each undeclared identifier is reported only once for each function it appears in
make: *** [../../../../os/common/startup/ARMCMx/compilers/GCC/rules.mk:235: build/obj/hal_adc_lld.o] Error 1


Code: Select all

$ arm-none-eabi-gcc -dumpversion
8.3.1


(GCC version 5.3.1 also fails)

The previous commit (4887332a17) compiles correctly.

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM32F0xx/ADC example not compiling

Postby Giovanni » Mon May 18, 2020 5:16 pm

Hi,

I committed a fix, note it is the 18.2 branch which is now unsupported so there is no tracking number associated.

My recommendation is to switch to the latest ChibiOS version: 20.3.1.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 73 guests