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

Support F303C frankenpills #67

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions STM32/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,60 @@ DISCOVERY_F303VC.build.extra_flags_serial_auto=-DMENU_SERIAL_AUTO=SerialUART2
#DISCOVERY_F303VC.menu.serial.SerialUART2=SerialUART2 [PA2/PA3]
#DISCOVERY_F303VC.menu.serial.SerialUART2.build.extra_flags_serial=-DMENU_SERIAL=SerialUART2

####################################### Franken Pill F303C #########################################
# Franken Pill F303C board
# Made by transplaning F303C in place of F103C on a Blue or Black Pill board

FRANKEN_F303C.name=Franken Pill F303C

FRANKEN_F303C.build.core=arduino
FRANKEN_F303C.build.board=FRANKEN_F303C

FRANKEN_F303C.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
FRANKEN_F303C.build.series=STM32F3
FRANKEN_F303C.build.variant=FRANKEN_F303C
FRANKEN_F303C.build.f_cpu=72000000L

FRANKEN_F303C.menu.upload_method.stlink=STLink
FRANKEN_F303C.menu.upload_method.stlink.upload.protocol=STLink
FRANKEN_F303C.menu.upload_method.stlink.upload.tool=stlink_upload
FRANKEN_F303C.menu.upload_method.dfu_util=dfu-util
FRANKEN_F303C.menu.upload_method.dfu_util.upload.tool=dfuutil_upload
FRANKEN_F303C.menu.upload_method.dfu_util.upload.protocol=dfu-util
FRANKEN_F303C.menu.upload_method.BMPMethod=BMP (Black Magic Probe)
FRANKEN_F303C.menu.upload_method.BMPMethod.upload.protocol=gdb_bmp
FRANKEN_F303C.menu.upload_method.BMPMethod.upload.tool=bmp_upload

FRANKEN_F303C.menu.subboard.Blue128k = Blue F303CB (128KB)
FRANKEN_F303C.menu.subboard.Blue128k.upload.maximum_size=131072
FRANKEN_F303C.menu.subboard.Blue128k.build.ldscript=ldscript128k.ld
FRANKEN_F303C.menu.subboard.Blue128k.upload.maximum_data_size=32768
FRANKEN_F303C.menu.subboard.Blue128k.build.extra_flags=-DSTM32F303CB -DLED_BUILTIN=PC13

FRANKEN_F303C.menu.subboard.Blue256k = Blue F303CC (256KB)
FRANKEN_F303C.menu.subboard.Blue256k.upload.maximum_size=262144
FRANKEN_F303C.menu.subboard.Blue256k.upload.maximum_data_size=40960
FRANKEN_F303C.menu.subboard.Blue256k.build.ldscript=ldscript256k.ld
FRANKEN_F303C.menu.subboard.Blue256k.build.extra_flags=-DSTM32F303CC -DLED_BUILTIN=PC13

FRANKEN_F303C.menu.subboard.Black128k = Black F303CB (128KB)
FRANKEN_F303C.menu.subboard.Black128k.upload.maximum_size=131072
FRANKEN_F303C.menu.subboard.Black128k.build.ldscript=ldscript128k.ld
FRANKEN_F303C.menu.subboard.Black128k.upload.maximum_data_size=32768
FRANKEN_F303C.menu.subboard.Black128k.build.extra_flags=-DSTM32F303CB -DLED_BUILTIN=PC13

FRANKEN_F303C.menu.subboard.Black256k = Black F303CC (256KB)
FRANKEN_F303C.menu.subboard.Black256k.upload.maximum_size=262144
FRANKEN_F303C.menu.subboard.Black256k.upload.maximum_data_size=40960
FRANKEN_F303C.menu.subboard.Black256k.build.ldscript=ldscript256k.ld
FRANKEN_F303C.menu.subboard.Black256k.build.extra_flags=-DSTM32F303CC -DLED_BUILTIN=PB12

FRANKEN_F303C.menu.usb.Disabled=Disabled, no USB
FRANKEN_F303C.menu.usb.Disabled.build.extra_flags_serial=-DMENU_SERIAL=SerialUART2
FRANKEN_F303C.menu.usb.SerialUSB=Serial [Virtual COM port]
FRANKEN_F303C.menu.usb.SerialUSB.build.extra_flags_usb=-DMENU_USB_SERIAL
FRANKEN_F303C.menu.usb.SerialUSB.build.extra_flags_serial=-DMENU_SERIAL=SerialUSB

################################################################################
# Discovery F407VG board

Expand Down
4 changes: 4 additions & 0 deletions STM32/cores/arduino/stm32/USBDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ extern PCD_HandleTypeDef hpcd_USB_OTG_FS;
extern "C" void USB_LP_CAN1_RX0_IRQHandler(void) {
HAL_PCD_IRQHandler(&hpcd_USB_FS);
}
//F3
extern "C" void USB_LP_CAN_RX0_IRQHandler(void) {
HAL_PCD_IRQHandler(&hpcd_USB_FS);
}
//F4 F7
extern "C" void OTG_FS_IRQHandler(void) {
HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS);
Expand Down
Loading