Re: Core407V STM32F407VET6 Board Definition Help Needed


Warren Gay <ve3wwg@...>
 

/home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig:4:
warning: attempt to assign the value "y" to the undefined symbol
SOC_STM32F407XX

Could you try with SOC_STM32F407XG?

Thank-you, yes that did the trick. 

Now my board does not support GPIO ports starting with F. I see refs to them in Kconfig.defconfig.stm32f407xx as:

if SOC_STM32F407XG

config SOC
        string
        default stm32f407xx

config NUM_IRQS
        int
        default 82

if GPIO_STM32

config GPIO_STM32_PORTF
        default y

config GPIO_STM32_PORTG
        default y

config GPIO_STM32_PORTI
        default y

endif # GPIO_STM32
...

So in my core407v_stm32f407_defconfig, should I leave CONFIG_GPIO_STM32 undefined, or is the following acceptable also:

CONFIG_GPIO_STM32=n

Thanks, Warren


Yannis

On Sat, Apr 14, 2018 at 5:18 AM Warren Gay <ve3wwg@...> wrote:

> I am in need of help for developing a board description for the Core407V,
with a stm32f407vet6 chip.

>    https://www.waveshare.com/wiki/Core407V

> This board seems similar to the existing olimex_stm32_e407, with the
following immediate differences:

> The Core407V has

> two LEDs on PA6 and PA7,
> two user push buttons on PE4 (k0) and PE3 (k1)
> There is also a wakeup button k_up on PA0, which I didn't compare.

> I have edited my own board.h file, but having difficulty with the cmake
stuff:

> I tried to clone a core407v_stm32f407 board from the olimex_stm32_e407,
but running into problems. The first of which is this:

> $ mkdir build && cd build
> $ cmake ..
> -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.3",
minimum required is "3.4")
> -- Selected BOARD core407v_stm32f407
> Zephyr version: 1.11.99
> Parsing Kconfig tree in /home/wwg/zephyr/Kconfig
> Using
/home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig
as base
> Merging /home/wwg/zsrc/blinky/prj.conf
> warning: BOARD_CORE407V_STM32F407 (defined at
/home/wwg/zephyr/boards/arm/core407v_stm32f407/Kconfig.board:7) was
assigned the value "y" but got the value "n" -- check dependencies
> warning: CLOCK_STM32_PLL_N_MULTIPLIER (defined at
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217,
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) was assigned the
value "168" but got the value "336" -- check dependencies
> warning: CLOCK_STM32_PLL_N_MULTIPLIER (defined at
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217,
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) was assigned the
value "168" but got the value "336" -- check dependencies

/home/wwg/zephyr/boards/arm/core407v_stm32f407/core407v_stm32f407_defconfig:4:
warning: attempt to assign the value "y" to the undefined symbol
SOC_STM32F407XX
> /home/wwg/zsrc/blinky/prj.conf:2: warning: CONSOLE (defined at
/home/wwg/zephyr/drivers/console/Kconfig:10) set more than once. Old value:
"y", new value: "y".
> /home/wwg/zsrc/blinky/prj.conf:6: warning: UART_CONSOLE (defined at
/home/wwg/zephyr/drivers/console/Kconfig:40) set more than once. Old value:
"y", new value: "y".
> /home/wwg/zsrc/blinky/prj.conf:7: warning: SERIAL (defined at
/home/wwg/zephyr/drivers/serial/Kconfig:9) set more than once. Old value:
"y", new value: "y".
> warning: user value 168 on the int symbol CLOCK_STM32_PLL_N_MULTIPLIER
(defined at /home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:217,
/home/wwg/zephyr/drivers/clock_control/Kconfig.stm32:282) ignored due to
being outside the active range ([192, 432]) -- falling back on defaults
> -- Generating zephyr/include/generated/generated_dts_board.h
> Error: core407v_stm32f407.dts.pre.tmp:257.21-22 syntax error
> FATAL ERROR: Unable to parse input tree
> CMake Error at /home/wwg/zephyr/cmake/dts.cmake:83 (message):
>    command failed with return code: 1
> Call Stack (most recent call first):
>    /home/wwg/zephyr/cmake/app/boilerplate.cmake:260 (include)
>    CMakeLists.txt:3 (include)

> -- Configuring incomplete, errors occurred!

> The intended clock is 168 MHz, with 8 MHz HSE crystal. The top of the
_defconfig file is:

> CONFIG_ARM=y
> CONFIG_BOARD_CORE407V_STM32F407=y
> CONFIG_SOC_SERIES_STM32F4X=y
> CONFIG_SOC_STM32F407XX=y
> # 168MHz system clock
> CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
> CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

> # Enable MPU
> CONFIG_STM32_ARM_MPU_ENABLE=y

> CONFIG_SERIAL=y

> # console
> CONFIG_CONSOLE=y
> CONFIG_UART_CONSOLE=y

> # enable pinmux
> CONFIG_PINMUX=y

> # enable GPIO
> CONFIG_GPIO=y

> # clock configuration
> CONFIG_CLOCK_CONTROL=y

> # Clock configuration for Cube Clock control driver
> CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
> CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
> # use HSE as PLL input
> CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
> # produce 168MHz clock at PLL output
> CONFIG_CLOCK_STM32_PLL_M_DIVISOR=6
> CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=168
> CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
> CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=7
> CONFIG_CLOCK_STM32_AHB_PRESCALER=1
> CONFIG_CLOCK_STM32_APB1_PRESCALER=4
> CONFIG_CLOCK_STM32_APB2_PRESCALER=2

> I used the existing value for the MULTIPLIER. Hints for correcting these
errors would be appreciated.

> Warren


Join devel@lists.zephyrproject.org to automatically receive all group messages.