board.chcfg for mcu default reset state
Posted: Sun Aug 19, 2018 11:58 pm
I'm looking at porting an STM32F042 application (originally written directly against STM32F0xx_StdPeriph_Driver) to ChibiOS.
It looks like the board config unconditionally expects to configure all pins - is there any way to generate a board config for an MCU in default reset state (other than just going through the datasheet pin by pin), or tell the board config to just leave pins as they are on reset?
I've cloned the ST_NUCLEO32_F042K6 board, but of course it's set up for the various external items on the Nucleo board - LED, crystal, etc. If I remove all the ports from board.chcfg and regenerate board.{c,h} all the #define's are dropped from board.h (as expected) but board.c still expects to find them to configure the pins on reset instead of leaving them in their default state.
I'm assuming the answer is "just make a board.chcfg that reflects the state you want", but thought it was worth asking as a dumb beginner question.
It looks like the board config unconditionally expects to configure all pins - is there any way to generate a board config for an MCU in default reset state (other than just going through the datasheet pin by pin), or tell the board config to just leave pins as they are on reset?
I've cloned the ST_NUCLEO32_F042K6 board, but of course it's set up for the various external items on the Nucleo board - LED, crystal, etc. If I remove all the ports from board.chcfg and regenerate board.{c,h} all the #define's are dropped from board.h (as expected) but board.c still expects to find them to configure the pins on reset instead of leaving them in their default state.
I'm assuming the answer is "just make a board.chcfg that reflects the state you want", but thought it was worth asking as a dumb beginner question.