Add minimum and common structure to start using STM32 on HW model V2.
Duplicated from soc/arm/st_stm32/common with minor modifications:
- common/Kconfig.soc moved to Kconfig as Kconfig.soc should now
be restricted to _SOC_FOO) related symbols
- "depends on LOG_BACKEND_SWO" LOG_BACKEND_SWO_REF_FREQ_HZ instead of if ..
- Symbols depending on series are not present, they'll have to be
introduced when converting respective series.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Testing r"(?!SERIES_).*$" was not correct as we need to consider
lines not starting by SERIES.
Fix this and make the condition globally more simple.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Boards are defining two Kconfigs, `BOARD_<board_name>` and
`BOARD_<board_name>_<identifier>`.
For the raspberry pi pico, this is then BOARD_RPI_PICO and
BOARD_RPI_PICO_RP2040 / BOARD_RPI_PICO_RP2040_W.
Thus there is no BOARD_RPI_PICO_W.
As all occurences with BOARD_RPI_PICO_W, is done as:
BOARD_RPI_PICO || BOARD_RPI_PICO_W, then simply remove BOARD_RPI_PICO_W.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Make 'default' and 'revisions' fields optional for custom revisions.
When using custom revision format, then board author must create a
revision.cmake file for revision handling, in which case revisions
don't need to be specified in the board.yml file.
Therefore make 'default' and 'revisions' fields optional in the schema
and implement custom yaml validation which can validate that 'default'
and 'revisions' are specified for all other revision formats.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Clear BOARD_CACHE when no or an invalid board identifier is provided
on first CMake invocation.
This allows users to re-run CMake and provide a valid board identifier
as well as avoiding `BOARD` to be replaced with an invalid BOARD_CACHED
value.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
In old hw model, board revisions was handled by creation of a
revisions.cmake file. In the new hw model, board revisions are defined
as integral part of board.yml, and revision.cmake is only needed and
used for custom revision format.
Users familiar with revision.cmake in old hw model may not be aware of
this difference, therefore provide warnings if developers create a
revision.cmake that is ignored by the build system.
Also fail a build if users specify a board revision for a board which
doesn't support revision. Such scenario can easily occur in the case
where a board developer may be creating a revisions.cmake file and
then try to build for a revision specified in that file.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
When creating file Kconfig.<board>, get the copyright from
old Kconfig.board file and use it in the new file.
Add the License as well.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
The BOARD_IDENTIFIER is extracted from the BOARD argument provided by
the user.
Thereafter the BOARD_IDENTIFIER is compared to the list of valid board
identifiers returned by list_boards.py, and expanded with optional
fields as required.
Thereafter the expanded and full BOARD_IDENTIFIER is place as internal
variable in the CMake cache.
This means subsequent CMake invocations should use the expanded
BOARD_IDENTIFIER from the CMake cache instead of extracting it from the
BOARD variable.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Board is looked up without identifier string, which means a legacy
board may actually be found but later fails when board identifier is
included.
Thus test for HWMv1 and fail CMake is board identifier is provided for
board using HWMv1.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
A CMake rerun would not extract or determine the BOARD_IDENTIFIER
correctly because `list_boards.py` is only invoked for first CMake
invocation.
Therefore cache the BOARD_IDENTIFIER so that it's preserved between
CMake re-runs.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Using extend instead of append to correctly extend the list of valid
board identifiers.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>