diff options
author | Damien George <damien@micropython.org> | 2020-12-07 17:11:49 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-12-07 22:27:38 +1100 |
commit | cb1bb7592e18a50f33d22f84614c5ee9f45ce21e (patch) | |
tree | 3086e1f99fc94f5b800883153b004b4759cab8b5 /ports/stm32/can.c | |
parent | 1e4e2644ecfd2cab5154a2ad95f3eb5aca545ba7 (diff) |
stm32/Makefile: Change -O0 to -Og for DEBUG=1 builds.
The -Og optimisation level produces a more realistic build, gives a better
debugging experience, and generates smaller code than -O0, allowing debug
builds to fit in flash.
This commit also assigns variables in can.c to prevent warnings when -Og is
used, and builds a board in CI with DEBUG=1 enabled.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/can.c')
-rw-r--r-- | ports/stm32/can.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/can.c b/ports/stm32/can.c index e5fc55e40..bcc698359 100644 --- a/ports/stm32/can.c +++ b/ports/stm32/can.c @@ -226,8 +226,8 @@ int can_receive(CAN_HandleTypeDef *can, int fifo, CanRxMsgTypeDef *msg, uint8_t HAL_StatusTypeDef CAN_Transmit(CAN_HandleTypeDef *hcan, uint32_t Timeout) { uint32_t transmitmailbox; uint32_t tickstart; - uint32_t rqcpflag; - uint32_t txokflag; + uint32_t rqcpflag = 0; + uint32_t txokflag = 0; // Check the parameters assert_param(IS_CAN_IDTYPE(hcan->pTxMsg->IDE)); |