Skip to content

Commit 484b24d

Browse files
committed
Update variant header management
By default the variant.h will include variant_generic.h file. *.build.variant_h=variant_{build.board}.h can be added in the boards.txt to define the dedicated header to a board. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 3ae7a3c commit 484b24d

File tree

203 files changed

+74
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+74
-8
lines changed

Diff for: boards.txt

+57-7
Large diffs are not rendered by default.

Diff for: cores/arduino/variant.h

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2020-2021, STMicroelectronics
4+
* All rights reserved.
5+
*
6+
* This software component is licensed by ST under BSD 3-Clause license,
7+
* the "License"; You may not use this file except in compliance with the
8+
* License. You may obtain a copy of the License at:
9+
* opensource.org/licenses/BSD-3-Clause
10+
*
11+
*******************************************************************************
12+
*/
13+
#pragma once
14+
15+
#include VARIANT_H

Diff for: platform.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ compiler.define=-DARDUINO=
5353
build.extra_flags=
5454
build.bootloader_flags=
5555
build.ldscript=ldscript.ld
56+
build.variant_h=variant_generic.h
5657

5758
# These can be overridden in platform.local.txt
5859
compiler.c.extra_flags={build.peripheral_pins}
@@ -89,7 +90,7 @@ build.virtio_flags=-DVIRTIOCON -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DMETAL_M
8990
build.virtio_extra_include="-I{build.system.path}/Middlewares/OpenAMP" "-I{build.system.path}/Middlewares/OpenAMP/open-amp/lib/include" "-I{build.system.path}/Middlewares/OpenAMP/libmetal/lib/include" "-I{build.system.path}/Middlewares/OpenAMP/virtual_driver"
9091

9192
# Build information's
92-
build.info.flags=-D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DBOARD_NAME="{build.board}"
93+
build.info.flags=-D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DBOARD_NAME="{build.board}" -DVARIANT_H="{build.variant_h}"
9394

9495
# Defaults config
9596
build.xSerial=-DHAL_UART_MODULE_ENABLED
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)