Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error with V1.8.0, -DHAL_TIM_MODULE_ONLY in build_opt.h #839

Closed
geosmall opened this issue Dec 21, 2019 · 1 comment · Fixed by #840
Closed

Compile error with V1.8.0, -DHAL_TIM_MODULE_ONLY in build_opt.h #839

geosmall opened this issue Dec 21, 2019 · 1 comment · Fixed by #840
Assignees
Labels
bug 🐛 Something isn't working
Milestone

Comments

@geosmall
Copy link
Contributor

geosmall commented Dec 21, 2019

Compile error under recently released Version: 1.8.0

Describe the bug
Build error when compiling sketch with "HAL_TIM_MODULE_ONLY" defined in build_opt.h

To Reproduce
Compile the following minimal example sketch:

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

with the following build_opt.h:

-DHAL_TIM_MODULE_ONLY

Expected behavior
Expect to compile without error.

Error when compiling:

Compiling sketch...
"C:\Users\geoma\AppData\Local\Arduino15\packages\STM32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1/bin/arm-none-eabi-g++" -mcpu=cortex-m3  -mthumb "@C:\Users\geoma\AppData\Local\Temp\arduino_build_285411/sketch/build_opt.h" -c -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -MMD "-IC:\Users\geoma\OneDrive\Arduino\Blink" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/avr" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/stm32" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/stm32/LL" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/stm32/usb" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/stm32/usb/hid" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/stm32/usb/cdc" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\system/Drivers/STM32F1xx_HAL_Driver/Inc" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\system/Drivers/STM32F1xx_HAL_Driver/Src" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\system/STM32F1xx" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\system/Middlewares/ST/STM32_USB_Device_Library/Core/Src" -DSTM32F1xx -DARDUINO=10805 -DARDUINO_BLUEPILL_F103C8 -DARDUINO_ARCH_STM32 -DBOARD_NAME="BLUEPILL_F103C8"  -DSTM32F103xB  -DHAL_UART_MODULE_ENABLED  "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\tools\CMSIS\5.5.1/CMSIS/Core/Include/" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\system/Drivers/CMSIS/Device/ST/STM32F1xx/Include/" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\system/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\tools\CMSIS\5.5.1/CMSIS/DSP/Include" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\variants\PILL_F103XX" "-IC:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\libraries\SrcWrapper\src" "C:\Users\geoma\AppData\Local\Temp\arduino_build_285411\sketch\Blink.ino.cpp" -o "C:\Users\geoma\AppData\Local\Temp\arduino_build_285411\sketch\Blink.ino.cpp.o"
In file included from C:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/board.h:8,
                 from C:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/wiring.h:41,
                 from C:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/Arduino.h:32,
                 from C:\Users\geoma\AppData\Local\Temp\arduino_build_285411\sketch\Blink.ino.cpp:1:
C:\Users\geoma\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/stm32/analog.h:55:66: error: 'TimerCompareFormat_t' has not been declared
   55 | void pwm_start(PinName pin, uint32_t clock_freq, uint32_t value, TimerCompareFormat_t resolution);
      |   

Screenshots
See below attached screencap of error.

Desktop (please complete the following information):

  • OS: Win 10
  • Arduino IDE version: [1.8.5]
  • STM32 core version: [1.8.0]
  • Tools menu settings if not the default: [defaults]
  • Upload method: [N/A]

Board (please complete the following information):
Seems to be any variant, tested with Bluepill F103 and Wraith32

Capture

@fpistm fpistm added the bug 🐛 Something isn't working label Dec 21, 2019
@fpistm fpistm added this to the 1.9.0 milestone Dec 21, 2019
@fpistm fpistm self-assigned this Dec 21, 2019
@fpistm
Copy link
Member

fpistm commented Dec 21, 2019

Hi @geosmall
Right, since TimerCompareFormat_t was introduced as a parameter of pwm_start() there is an issue.
Same if HAL_TIM_MODULE_ENABLED is not enabled.

fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Dec 21, 2019
Fix stm32duino#839

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm added a commit that referenced this issue Dec 21, 2019
Fix #839

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm fpistm modified the milestones: 1.9.0, 1.8.1 Jan 2, 2020
@fpistm fpistm modified the milestones: 1.8.1, 1.9.0 Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants