Hello!
I'm trying to boot stm32mp15 based board. Source tree contains all dtsi/h for that platform although, DTB compilation fails with unresolved preprocessor macros (as I think):
It seems to fail at this code in DTS:
STM's macros look like this:
and
So, it looks like preprocessor does not resolve C char literals further to perform ultimate arithmetics ...
Any clues?
Thanks
I'm trying to boot stm32mp15 based board. Source tree contains all dtsi/h for that platform although, DTB compilation fails with unresolved preprocessor macros (as I think):
sh:
# $SRCROOT/sys/tools/fdt/make_dtb.sh $SRCROOT/sys stm32mp157c-ev1.dts .
converting stm32mp157c-ev1.dts -> ./stm32mp157c-ev1.dtb
Error at <standard input>:1615:19: Expected numbers in array of cells
pinmux = <(((((('F') - 'A') * 0x10 + (12))) << 8) | (0x11))>;
^
Error at <standard input>:1615:19: Expected ; at end of property
pinmux = <(((((('F') - 'A') * 0x10 + (12))) << 8) | (0x11))>;
^
Failed to parse tree.
#
It seems to fail at this code in DTS:
sh:
stm32mp15-pinctrl.dtsi
11: pinmux = <STM32_PINMUX('F', 12, ANALOG)>;
STM's macros look like this:
C:
/usr/src/sys/contrib/device-tree/include/dt-bindings/pinctrl/stm32-pinfunc.h
33:#define STM32_PINMUX(port, line, mode) (((PIN_NO(port, line)) << 8) | (mode))
and
C:
/usr/src/sys/contrib/device-tree/include/dt-bindings/pinctrl/stm32-pinfunc.h
31:#define PIN_NO(port, line) (((port) - 'A') * 0x10 + (line))
So, it looks like preprocessor does not resolve C char literals further to perform ultimate arithmetics ...
Any clues?
Thanks