-
Notifications
You must be signed in to change notification settings - Fork 1k
support for F030 series #366
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
Conversation
This is to allow to use
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a branch with all fixed mentioned in this review.
I've made also some clean (trailing space, file format,...)
My branch:
fpistm@1149d33
#define HAL_SPI_MODULE_ENABLED | ||
#define HAL_TIM_MODULE_ENABLED | ||
//#define HAL_TSC_MODULE_ENABLED | ||
#define HAL_UART_MODULE_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define HAL_UART_MODULE_ENABLED | |
/*#define HAL_UART_MODULE_ENABLED*/ |
This have to be comment
#define HAL_TIM_MODULE_ENABLED | ||
//#define HAL_TSC_MODULE_ENABLED | ||
#define HAL_UART_MODULE_ENABLED | ||
#define HAL_USART_MODULE_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define HAL_USART_MODULE_ENABLED | |
/*#define HAL_USART_MODULE_ENABLED*/ |
This have to be comment
variants/DEMO_F030F4/variant.h
Outdated
#define PA14 12 //D12 - SWCLK | ||
|
||
// This must be a literal with the same value as PEND | ||
#define NUM_DIGITAL_PINS 13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define NUM_DIGITAL_PINS 13 | |
#define NUM_DIGITAL_PINS 22 |
Here 22 as you have to count the duplicated pins
variants/DEMO_F030F4/variant.h
Outdated
#define NUM_DIGITAL_PINS 13 | ||
// This must be a literal with a value less than or equal to MAX_ANALOG_INPUTS | ||
#define NUM_ANALOG_INPUTS 9 | ||
#define NUM_ANALOG_FIRST 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define NUM_ANALOG_FIRST 9 | |
#define NUM_ANALOG_FIRST 13 |
Here this is 13 then you will not have the static assert and analog will be functional
@@ -0,0 +1,322 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please align this file with the last template:
system/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_conf_template.h
*/ | ||
#define HAL_MODULE_ENABLED | ||
#define HAL_ADC_MODULE_ENABLED | ||
//#define HAL_CAN_MODULE_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here use /*...*/
instead of //...
@@ -467,6 +467,35 @@ Disco.menu.upload_method.STLink.upload.tool=stlink_upload | |||
# Other boards | |||
|
|||
############################### | |||
# Generic F030 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Generic F030 | |
# Generic F0 |
I guess it should be better to provide F0 menu for future addition like the GenF4
Moreover it miss the C Runtime menu and Serial (to add later in this file):
+GenF0.menu.xserial.generic=Enabled with generic Serial
+GenF0.menu.xserial.none=Enabled without generic Serial
+GenF0.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
+GenF0.menu.xserial.disabled=Disabled (No Serial)
+GenF0.menu.xserial.disabled.build.xSerial=
+GenF0.menu.rtlib.nano=Newlib Nano (default)
+GenF0.menu.rtlib.nanofp=Newlib Nano + Float Printf
+GenF0.menu.rtlib.nanofp.build.flags.ldspecs=--specs=nano.specs -u _printf_float
+GenF0.menu.rtlib.nanofs=Newlib Nano + Float Scanf
+GenF0.menu.rtlib.nanofs.build.flags.ldspecs=--specs=nano.specs -u _scanf_float
+GenF0.menu.rtlib.nanofps=Newlib Nano + Float Printf/Scanf
+GenF0.menu.rtlib.nanofps.build.flags.ldspecs=--specs=nano.specs -u _printf_float -u _scanf_float
+GenF0.menu.rtlib.full=Newlib Standard
+GenF0.menu.rtlib.full.build.flags.ldspecs=
@@ -467,6 +467,35 @@ Disco.menu.upload_method.STLink.upload.tool=stlink_upload | |||
# Other boards | |||
|
|||
############################### | |||
# Generic F030 | |||
GenF030.name=Generic STM32F030 series |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GenF030.name=Generic STM32F030 series | |
GenF0.name=Generic STM32F0 series |
So replace all GenF030
by GenF0
With my branch including review (#367): Blink:
Fading:
|
Merge thanks #367 |
Demo Board #165
Blink OK (uses 9820 Bytes / 59% of flash)
PWM (fading) OK (uses 11668 Bytes / 71% of flash)
Analog pins doesn't work (NUM_ANALOG_FIRST must be 0, NUM_ANALOG_INPUTS = 9) but: