Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
364bb61d
Commit
364bb61d
authored
Nov 25, 2015
by
Dave Hylands
Committed by
Damien George
Nov 26, 2015
Browse files
stmhal: Allow make DEBUG=1 to build
parent
8844d031
Changes
2
Hide whitespace changes
Inline
Side-by-side
stmhal/Makefile
View file @
364bb61d
...
...
@@ -58,14 +58,16 @@ CFLAGS += -DSTM32_HAL_H='<stm32$(MCU_SERIES)xx_hal.h>'
LDFLAGS
=
-nostdlib
-T
$(LD_FILE)
-Map
=
$
(
@:.elf
=
.map
)
--cref
LIBS
=
# Remove uncalled code from the final image.
CFLAGS
+=
-fdata-sections
-ffunction-sections
LDFLAGS
+=
--gc-sections
# Debugging/Optimization
ifeq
($(DEBUG), 1)
CFLAGS
+=
-g
-DPENDSV_DEBUG
COPT
=
-O0
else
CFLAGS
+=
-fdata-sections
-ffunction-sections
COPT
+=
-Os
-DNDEBUG
LDFLAGS
+=
--gc-sections
endif
# uncomment this if you want libgcc
...
...
stmhal/uart.c
View file @
364bb61d
...
...
@@ -115,7 +115,7 @@ void uart_deinit(void) {
STATIC
bool
uart_init2
(
pyb_uart_obj_t
*
uart_obj
)
{
USART_TypeDef
*
UARTx
;
IRQn_Type
irqn
;
uint32_t
GPIO_Pin
,
GPIO_Pin2
;
uint32_t
GPIO_Pin
,
GPIO_Pin2
=
0
;
uint8_t
GPIO_AF_UARTx
=
0
;
GPIO_TypeDef
*
GPIO_Port
=
NULL
;
GPIO_TypeDef
*
GPIO_Port2
=
NULL
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment