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

Error in STM32F401RC6 compilation #46

Closed
phalgunimondal opened this issue Aug 17, 2023 · 5 comments
Closed

Error in STM32F401RC6 compilation #46

phalgunimondal opened this issue Aug 17, 2023 · 5 comments
Labels
incorrect setup Library installed or setup incorrectly.

Comments

@phalgunimondal
Copy link

I am using STM32F401RC6 controller and this core https://github.com/stm32duino/Arduino_Core_STM32
not sure why below compilation error comes

arduino-cli compile -b STMicroelectronics:stm32:GenF4 dmd_monochrome

In file included from C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.h:24,
from C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp:9:
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:235:40: error: 'voidFuncPtr' has not been declared
235 | virtual void initialize_timers(voidFuncPtr handler);
| ^~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:264:9: error: 'PortType' does not name a type
264 | PortType clk_clrmask = 0;
| ^~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:265:9: error: 'PortType' does not name a type
265 | PortType clkmask = 0;
| ^~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:275:9: error: 'OE_PWM_Polarity' does not name a type
275 | OE_PWM_Polarity OE_polarity = OE_PWM_POSITIVE;
| ^~~~~~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp: In constructor 'DMD_RGB_BASE::DMD_RGB_BASE(byte, uint8_t*, byte, byte, uint8_t*, byte, byte, bool, uint8_t, uint8_t, byte, byte)':
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp:32:9: error: 'OE_polarity' was not declared in this scope
32 | OE_polarity = OE_PWM_NEGATIVE;
| ^~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp:32:23: error: 'OE_PWM_NEGATIVE' was not declared in this scope
32 | OE_polarity = OE_PWM_NEGATIVE;
| ^~~~~~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp: In member function 'virtual void DMD_RGB_BASE::init(uint16_t)':
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_RGB.cpp:167:27: error: invalid conversion from 'void ()()' to 'int' [-fpermissive]
167 | initialize_timers(scan_running_dmd_R);
| ^~~~~~~~~~~~~~~~~~
| |
| void (
)()
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:235:52: note: initializing argument 1 of 'virtual void DMD::initialize_timers(int)'
235 | virtual void initialize_timers(voidFuncPtr handler);
| ~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.cpp:27:
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:235:40: error: 'voidFuncPtr' has not been declared
235 | virtual void initialize_timers(voidFuncPtr handler);
| ^~~~~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:264:9: error: 'PortType' does not name a type
264 | PortType clk_clrmask = 0;
| ^~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:265:9: error: 'PortType' does not name a type
265 | PortType clkmask = 0;
| ^~~~~~~~
C:\Users\Phalguni\Downloads\DMD_STM32-dev-V2\examples\STM32F4_RP2040\dmd_monochrome\DMD_STM32a.h:275:9: error: 'OE_PWM_Polarity' does not name a type
275 | OE_PWM_Polarity OE_polarity = OE_PWM_POSITIVE;
| ^~~~~~~~~~~~~~~

Used library Version Path
SPI 1.0.0 C:\Users\Phalguni\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.6.0\libraries\SPI
SrcWrapper 1.0.1 C:\Users\Phalguni\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.6.0\libraries\SrcWrapper

Used platform Version Path
STMicroelectronics:stm32 2.6.0 C:\Users\Phalguni\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.6.0
Error during build: exit status 1

@board707
Copy link
Owner

I am using STM32F401RC6 controller and this core https://github.com/stm32duino/Arduino_Core_STM32

Hi
The library is incompatible with the core you used. Please use a edited Robert Clark's core? as stated in the Readme

@phalgunimondal
Copy link
Author

How to use Robert Clark's core because no index.json found EX:(https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json)

kindly refer documentation

@board707
Copy link
Owner

board707 commented Aug 17, 2023

see the Wiki
https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Installation

For STM32F4 boards use a local clone of the Clark's code from this repo:
https://github.com/board707/Arduino_STM32/tree/lto_for_c6

@vahoo22
Copy link

vahoo22 commented Sep 17, 2023

hi, friend,
after compilation project DMD_STM32 the same errors, Do I have the same problem as you solved this problem?

@board707
Copy link
Owner

Hi, you used incompatible stm32 core. To solve the issue please read my answer just above your message.

@board707 board707 added the incorrect setup Library installed or setup incorrectly. label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incorrect setup Library installed or setup incorrectly.
Projects
None yet
Development

No branches or pull requests

3 participants