k3ng / k3ng_cw_keyer

K3NG Arduino CW Keyer

Home Page:http://blog.radioartisan.com/arduino-cw-keyer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compillation error for Generic STM32F103C

Sergey-R5AU opened this issue · comments

Hi !
I have error with compillation keyer code for STM32 Blue Pill board:


C:\Users\r5au\Documents\Arduino\k3ng_cw_keyer-master\k3ng_keyer\k3ng_keyer.ino:1536:4: error: #error "You cannot define paddle_left or paddle_right as 0 to disable"
#error "You cannot define paddle_left or paddle_right as 0 to disable"
^
Multiple libraries were found for "Wire.h"
Used: C:\Users\r5au\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2022.9.26\libraries\Wire
Not used: C:\Users\r5au\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2022.9.26\libraries\WireSlave
exit status 1

Compilation error: #error "You cannot define paddle_left or paddle_right as 0 to disable"

Arduino IDE version 2.0.3 64bit

STM32 board support with http://dan.drown.org/stm32duino/package_STM32duino_index.json

What is wrong ?
Copmpillation for Arduino nano without troubles

Hi Antony !
Thank you for reply !
in my definitions: keyer_pin_settings_generic_STM32F103C.h looks like:

GENERIC STM32F103C Blue Pill board

*/

/* Pins - you must review these and configure ! */
#ifndef keyer_pin_settings_h
#define keyer_pin_settings_h

#define paddle_left PA1
#define paddle_right PA0
#define tx_key_line_1 PC15 // (high = key down/tx on)
.
.

or i should directly wrote here pins nr from Blue Pill, like:
#define paddle_left 11
#define paddle_right 10
following with attached pic ?

stm32-pin-details_0

For tetsing purpose i did as abose
#define paddle_left 11
#define paddle_right 10

however next stop with Serial Port:

C:\Users\r5au\Documents\Arduino\k3ng_cw_keyer-master\k3ng_keyer\k3ng_keyer.ino: In function 'void initialize_serial_ports()':
C:\Users\r5au\Documents\Arduino\k3ng_cw_keyer-master\k3ng_keyer\k3ng_keyer.ino:18238:25: error: cannot convert 'HardwareSerial' to 'USBSerial' in assignment
primary_serial_port = PRIMARY_SERIAL_PORT;

Compilation error: cannot convert 'HardwareSerial' to 'USBSerial' in assignment

probably somwhere in definitions files port assigment are wrong ? 'HardwareSerial' <-> 'USBSerial' ?

commented

Do you have the correct board loaded ?
Load the stm boards on IDE.
Preferences -> Board Manegers URL
Use :https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json

I have now the same error :
error: cannot convert 'HardwareSerial*' to 'USBSerial*' in assignment
primary_serial_port = PRIMARY_SERIAL_PORT;

line 18246 k3ng_keyer.ino