We're using 20.3.x, refer to this topic: viewtopic.php?f=35&t=5946
Basically the STM32_HAS_GPIOI flag was set to true for all STM496, but there are some packages that don't have a GPIOI.
#1198 breaks compilation for all STM496 with less than 169 pins Topic is solved
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: #1198 breaks compilation for all STM496 with less than 169 pins
Hi,
Exactly which device is failing?
Giovanni
Exactly which device is failing?
Giovanni
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: #1198 breaks compilation for all STM496 with less than 169 pins
Hi,
Not sure how to handle this, headers do not make differences among packages, GPIOI is always defined, any idea?
Giovanni
Not sure how to handle this, headers do not make differences among packages, GPIOI is always defined, any idea?
Giovanni
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: #1198 breaks compilation for all STM496 with less than 169 pins
Hi,
Question, is the device actually crashing on GPIOI initialization or it is simply doing a useless initialization? Compilation is fine.
Giovanni
Question, is the device actually crashing on GPIOI initialization or it is simply doing a useless initialization? Compilation is fine.
Giovanni
Re: #1198 breaks compilation for all STM496 with less than 169 pins
Yeah we had this part in our board.c
Which wasn't defined in the board.h, maybe we need to figure out how to fix that on our side.
Code: Select all
#if STM32_HAS_GPIOI
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH, VAL_GPIOI_ASCR,
VAL_GPIOI_LOCKR},
#endifWhich wasn't defined in the board.h, maybe we need to figure out how to fix that on our side.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: #1198 breaks compilation for all STM496 with less than 169 pins
Hi,
Re-generating board files should fix it.
Giovanni
Re-generating board files should fix it.
Giovanni
Re: #1198 breaks compilation for all STM496 with less than 169 pins
JSStabl wrote:Yeah we had this part in our board.cCode: Select all
#if STM32_HAS_GPIOI
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH, VAL_GPIOI_ASCR,
VAL_GPIOI_LOCKR},
#endif
Which wasn't defined in the board.h, maybe we need to figure out how to fix that on our side.
The solution is not to keep generated board files in your repo. Generate them as part of your build. Giovanni, I would encourage you to do the same. But that would require your users to install fmpp ..
Re: #1198 breaks compilation for all STM496 with less than 169 pins
JSStabl wrote:Can you elaborate on how to generate the board files as part of the build?
Sure, add this to your makefile:
Code: Select all
BOARD_GEN_FILES = $(BOARDDIR)/board.c $(BOARDDIR)/board.h $(BOARDDIR)/board.mk
BOARD_TEMPLATE_FILES = $(BOARDDIR)/cfg/board.chcfg $(BOARDDIR)/cfg/board.fmpp
.PHONY: PRE_MAKE_ALL_RULE_HOOK
PRE_MAKE_ALL_RULE_HOOK: $(BOARD_GEN_FILES)
$(BOARD_GEN_FILES) &: $(BOARD_TEMPLATE_FILES)
@echo "Rebuilding board files"
@echo
@fmpp -C $(BOARDDIR)/cfg/board.fmpp -O $(BOARDDIR)/
.PHONY: CLEAN_RULE_HOOK
CLEAN_RULE_HOOK:
@echo CLEAN_RULE_HOOK
@echo - $(BOARDDIR)/{board.h board.c board.mk}
@rm -f $(BOARDDIR)/board.c $(BOARDDIR)/board.h $(BOARDDIR)/board.mk 2>/dev/null