onelife / Arduino_RT-Thread

RT-Thread library optimized for Arduino.
52 stars 9 forks source link

[BUG] Blink does not compile with version 0.9.4 #9

Closed raphaelvalentin closed 1 year ago

raphaelvalentin commented 1 year ago

Hi, I have an issue of compilation with the example Blink and with the version RT-Thread 0.9.4. My board is the Nucleo STM32F767. Note that there is no error when using version 0.9.1. Maybe I missed something... Below we can see the log message.

Thank you very much for your support. Raphael.

Compiling library "RT-Thread"
/home/raphael/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/arm-none-eabi-g++ -mcpu=cortex-m7 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DUSE_FULL_LL_DRIVER -mthumb @/tmp/arduino_build_686495/sketch/build.opt -c -O1 -DNDEBUG -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -MMD -I/home/raphael/Arduino/libraries/RT-Thread/examples/RttMutex -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/cores/arduino/avr -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/cores/arduino/stm32 -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/cores/arduino/stm32/LL -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/cores/arduino/stm32/usb -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/cores/arduino/stm32/OpenAMP -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/cores/arduino/stm32/usb/hid -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/cores/arduino/stm32/usb/cdc -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Drivers/STM32F7xx_HAL_Driver/Inc -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Drivers/STM32F7xx_HAL_Driver/Src -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/STM32F7xx -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Middlewares/OpenAMP -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Middlewares/OpenAMP/open-amp/lib/include -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Middlewares/OpenAMP/libmetal/lib/include -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Middlewares/OpenAMP/virtual_driver -DSTM32F7xx -DARDUINO=10813 -DARDUINO_NUCLEO_F767ZI -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"NUCLEO_F767ZI\"" "-DVARIANT_H=\"variant_NUCLEO_F767ZI.h\"" -DSTM32F767xx -DHAL_UART_MODULE_ENABLED -I/home/raphael/.arduino15/packages/STMicroelectronics/tools/CMSIS/5.7.0/CMSIS/Core/Include/ -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Drivers/CMSIS/Device/ST/STM32F7xx/Include/ -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/system/Drivers/CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/ -I/home/raphael/.arduino15/packages/STMicroelectronics/tools/CMSIS/5.7.0/CMSIS/DSP/Include -I/home/raphael/.arduino15/packages/STMicroelectronics/tools/CMSIS/5.7.0/CMSIS/DSP/PrivateInclude -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/cores/arduino -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT -I/home/raphael/Arduino/libraries/RT-Thread/src -I/home/raphael/.arduino15/packages/STMicroelectronics/hardware/stm32/2.3.0/libraries/SrcWrapper/src -I/home/raphael/Arduino/libraries/STM32duino_RTC/src /home/raphael/Arduino/libraries/RT-Thread/src/rtt.cpp -o /tmp/arduino_build_686495/libraries/RT-Thread/rtt.cpp.o
In file included from /home/raphael/Arduino/libraries/RT-Thread/src/components/drivers/include/rtdevice.h:39,
                 from /home/raphael/Arduino/libraries/RT-Thread/src/rtt.cpp:178:
/home/raphael/Arduino/libraries/RT-Thread/src/components/drivers/include/drivers/alarm.h:60:21: error: field 'event' has incomplete type 'rt_event'
   60 |     struct rt_event event;
      |                     ^~~~~
/home/raphael/Arduino/libraries/RT-Thread/src/components/drivers/include/drivers/alarm.h:60:12: note: forward declaration of 'struct rt_event'
   60 |     struct rt_event event;
      |            ^~~~~~~~
onelife commented 1 year ago

Hi @raphaelvalentin, Please provide the following info:

raphaelvalentin commented 1 year ago

Hi, Board: Nucleo F767ZI Board part number: MB1137 B-01 A203700391. Library version: 0.9.4 rtconfig: unchanged.

As I mentioned, code (the blinking example) compilation passed and run smootly with 0.9.1.

Thanks.


Raphaël.


From: onelife @.> Sent: Saturday, September 24, 2022 6:24:04 PM To: onelife/Arduino_RT-Thread @.> Cc: raphael valentin @.>; Mention @.> Subject: Re: [onelife/Arduino_RT-Thread] [BUG] Blink does not compile with version 0.9.4 (Issue #9)

Hi @raphaelvalentinhttps://github.com/raphaelvalentin, Please provide the following info:

— Reply to this email directly, view it on GitHubhttps://github.com/onelife/Arduino_RT-Thread/issues/9#issuecomment-1256933331, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC5BEGFY32IPEIQTVP7SWETV73JEJANCNFSM6AAAAAAQMO267A. You are receiving this because you were mentioned.Message ID: @.***>

onelife commented 1 year ago

Hi @raphaelvalentin, It seems the RTC function requires "event" module support, which can be enabled by uncommenting the following line. https://github.com/onelife/Arduino_RT-Thread/blob/2906ad832b44149f14c707018f349a5b00cfa7d7/src/rtconfig.h#L411

However, when testing, I found the STM32duino RTC library doesn't support STM32F767. So the final solution is commenting out the following line. https://github.com/onelife/Arduino_RT-Thread/blob/2906ad832b44149f14c707018f349a5b00cfa7d7/src/rtconfig.h#L130

raphaelvalentin commented 1 year ago

Thanks a lot for this investigation ! I will have a look asap on it. RT-THREAD is definitely of great interest for me for many reasons. I am using the STM32 MCU Based boards v2.3.0 library by STm which I would believe quite appropriate for the nucleo. This library has regular updates on large list of chips and get quick online support from STM engineers.

link. https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json

Concerning the STMduino RTC v1.3.2 library, with the NucleoF767ZI, the example seems working fine. As instance, the example SimpleRTC.ino provides me this output.

12:23:07.124 -> 15/06/15 16:02:54.340
12:23:08.085 -> 15/06/15 16:02:55.308
12:23:09.078 -> 15/06/15 16:02:56.276
12:23:10.039 -> 15/06/15 16:02:57.244
12:23:11.033 -> 15/06/15 16:02:58.212

However, I cannot confirm concerning what is going on with the internals. If it is the case, maybe should we make a notice on the github issue list of the library?

Thanks again !