You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The stm mcal files rely on files which are generated per-project by CubeMX. Thus if a project does not use a peripheral (say ADC), then the mcal/stm/periph/adc.hpp file will have a ton of errors since the file does not exist.
We can use #ifdef guards to detect if the current project uses each peripheral and enable / disable the whole file accordingly. CubeMX generates an stm32f7xx_hal.h file which includes ...hal_conf.h which has #define statements to indicate which peripherals are enabled.
The stm mcal files rely on files which are generated per-project by CubeMX. Thus if a project does not use a peripheral (say ADC), then the
mcal/stm/periph/adc.hpp
file will have a ton of errors since the file does not exist.We can use
#ifdef
guards to detect if the current project uses each peripheral and enable / disable the whole file accordingly. CubeMX generates anstm32f7xx_hal.h
file which includes...hal_conf.h
which has#define
statements to indicate which peripherals are enabled.For an example, see
mcal/stm32f767/periph/can.hpp
andcan.cc
in thedev/can
branch. https://github.com/macformula/racecar/blob/dev/can/firmware/mcal/stm32f767/periph/can.hppTask
Create a branch off of
dev/can
Guard all of the other peripheral files
Make a PR. Select
dev/can
as the base branchThe text was updated successfully, but these errors were encountered: