From 35c602d3b8e1ee2d06715c75fa0b4ca7a353372e Mon Sep 17 00:00:00 2001 From: Herwin Grobben Date: Fri, 5 Mar 2021 10:05:19 +0100 Subject: [PATCH] stm32/make-stmconst.py: Allow "[]" chars when parsing source comments. For STM32WB MCUs, EXTI offset addresses were not parsed due to the appearance of "[31:0]" in a comment in the .h file. --- ports/stm32/make-stmconst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm32/make-stmconst.py b/ports/stm32/make-stmconst.py index ac5c56f5c7..602bdc6c19 100644 --- a/ports/stm32/make-stmconst.py +++ b/ports/stm32/make-stmconst.py @@ -46,7 +46,7 @@ class LexerError(Exception): class Lexer: re_io_reg = r"__IO uint(?P8|16|32)_t +(?P[A-Z0-9]+)" - re_comment = r"(?P[A-Za-z0-9 \-/_()&:]+)" + re_comment = r"(?P[A-Za-z0-9 \-/_()&:\[\]]+)" re_addr_offset = r"Address offset: (?P0x[0-9A-Z]{2,3})" regexs = ( (