diff --git a/bsp/stm32/stm32f103-blue-pill/rtconfig.py b/bsp/stm32/stm32f103-blue-pill/rtconfig.py index a6d89ffdfd..43e61097a2 100644 --- a/bsp/stm32/stm32f103-blue-pill/rtconfig.py +++ b/bsp/stm32/stm32f103-blue-pill/rtconfig.py @@ -52,7 +52,7 @@ if PLATFORM == 'gcc': LPATH = '' if BUILD == 'debug': - CFLAGS += ' -O0 -gdwarf-2 -g' + CFLAGS += ' -O2 -gdwarf-2 -g' AFLAGS += ' -gdwarf-2' else: CFLAGS += ' -O2' @@ -83,7 +83,7 @@ elif PLATFORM == 'armcc': EXEC_PATH += '/ARM/ARMCC/bin/' if BUILD == 'debug': - CFLAGS += ' -g -O0' + CFLAGS += ' -g -O2' AFLAGS += ' -g' else: CFLAGS += ' -O2' @@ -165,7 +165,7 @@ elif PLATFORM == 'iar': if BUILD == 'debug': CFLAGS += ' --debug' - CFLAGS += ' -On' + CFLAGS += ' -Oh' else: CFLAGS += ' -Oh' diff --git a/bsp/stm32/stm32f302-st-nucleo/rtconfig.py b/bsp/stm32/stm32f302-st-nucleo/rtconfig.py index 871c33548c..c1d6bcf869 100644 --- a/bsp/stm32/stm32f302-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32f302-st-nucleo/rtconfig.py @@ -52,7 +52,7 @@ if PLATFORM == 'gcc': LPATH = '' if BUILD == 'debug': - CFLAGS += ' -O0 -gdwarf-2 -g' + CFLAGS += ' -O2 -gdwarf-2 -g' AFLAGS += ' -gdwarf-2' else: CFLAGS += ' -O2' @@ -83,7 +83,7 @@ elif PLATFORM == 'armcc': EXEC_PATH += '/ARM/ARMCC/bin/' if BUILD == 'debug': - CFLAGS += ' -g -O0' + CFLAGS += ' -g -O2' AFLAGS += ' -g' else: CFLAGS += ' -O2' @@ -164,7 +164,7 @@ elif PLATFORM == 'iar': if BUILD == 'debug': CFLAGS += ' --debug' - CFLAGS += ' -On' + CFLAGS += ' -Oh' else: CFLAGS += ' -Oh' diff --git a/bsp/stm32/stm32l010-st-nucleo/rtconfig.py b/bsp/stm32/stm32l010-st-nucleo/rtconfig.py index 79558e8877..8eeff0e7be 100644 --- a/bsp/stm32/stm32l010-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l010-st-nucleo/rtconfig.py @@ -52,7 +52,7 @@ if PLATFORM == 'gcc': LPATH = '' if BUILD == 'debug': - CFLAGS += ' -O0 -gdwarf-2 -g' + CFLAGS += ' -O2 -gdwarf-2 -g' AFLAGS += ' -gdwarf-2' else: CFLAGS += ' -O2' @@ -83,7 +83,7 @@ elif PLATFORM == 'armcc': EXEC_PATH += '/ARM/ARMCC/bin/' if BUILD == 'debug': - CFLAGS += ' -g -O0' + CFLAGS += ' -g -O2' AFLAGS += ' -g' else: CFLAGS += ' -O2' @@ -164,7 +164,7 @@ elif PLATFORM == 'iar': if BUILD == 'debug': CFLAGS += ' --debug' - CFLAGS += ' -On' + CFLAGS += ' -Oh' else: CFLAGS += ' -Oh' diff --git a/bsp/stm32/stm32l053-st-nucleo/board/Kconfig b/bsp/stm32/stm32l053-st-nucleo/board/Kconfig index febe9f5527..cc948cfbc8 100644 --- a/bsp/stm32/stm32l053-st-nucleo/board/Kconfig +++ b/bsp/stm32/stm32l053-st-nucleo/board/Kconfig @@ -11,6 +11,7 @@ menu "Onboard Peripheral Drivers" config BSP_USING_USB_TO_USART bool "Enable USB TO USART (uart2)" + select BSP_USING_UART select BSP_USING_UART2 default y diff --git a/bsp/stm32/stm32l053-st-nucleo/rtconfig.py b/bsp/stm32/stm32l053-st-nucleo/rtconfig.py index 79558e8877..8eeff0e7be 100644 --- a/bsp/stm32/stm32l053-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l053-st-nucleo/rtconfig.py @@ -52,7 +52,7 @@ if PLATFORM == 'gcc': LPATH = '' if BUILD == 'debug': - CFLAGS += ' -O0 -gdwarf-2 -g' + CFLAGS += ' -O2 -gdwarf-2 -g' AFLAGS += ' -gdwarf-2' else: CFLAGS += ' -O2' @@ -83,7 +83,7 @@ elif PLATFORM == 'armcc': EXEC_PATH += '/ARM/ARMCC/bin/' if BUILD == 'debug': - CFLAGS += ' -g -O0' + CFLAGS += ' -g -O2' AFLAGS += ' -g' else: CFLAGS += ' -O2' @@ -164,7 +164,7 @@ elif PLATFORM == 'iar': if BUILD == 'debug': CFLAGS += ' --debug' - CFLAGS += ' -On' + CFLAGS += ' -Oh' else: CFLAGS += ' -Oh'