Skip to content

Commit 980cb98

Browse files
committed
scripts: Support multilib clang arm toolchain
The llvm embedded toolchain for Arm has multilib configurations for a wide variety of targets. Support this, although skip the aarch64 variants it also promises for arm-none-eabi as that's a separate build adventure. Signed-off-by: Keith Packard <[email protected]>
1 parent 271a48c commit 980cb98

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[binaries]
2+
# Meson 0.53.2 doesn't use any cflags when doing basic compiler tests,
3+
# so we have to add -nostdlib to the compiler configuration itself or
4+
# early compiler tests will fail. This can be removed when picolibc
5+
# requires at least version 0.54.2 of meson.
6+
c = ['clang', '--target=arm-none-eabi', '-nostdlib']
7+
cpp = ['clang', '--target=arm-none-eabi', '-nostdlib']
8+
ar = 'llvm-ar'
9+
nm = 'llvm-nm'
10+
strip = 'llvm-strip'
11+
# only needed to run tests
12+
exe_wrapper = ['sh', '-c', 'test -z "$PICOLIBC_TEST" || run-arm "$@"', 'run-arm']
13+
14+
[host_machine]
15+
system = 'none'
16+
cpu_family = 'arm'
17+
cpu = 'arm'
18+
endian = 'little'
19+
20+
[properties]
21+
skip_sanity_check = true
22+
libgcc='-lclang_rt.builtins'
23+
default_flash_addr = '0x00000000'
24+
default_flash_size = '0x00400000'
25+
default_ram_addr = '0x20000000'
26+
default_ram_size = '0x00200000'
27+
28+
custom_mem_config_arm_none_eabi_armv8m_main = 'mps2_an505'
29+
30+
custom_mem_config_arm_none_eabi_armv8_1m_main = 'mps3_an547'
31+
32+
separate_boot_flash_mps2_an505 = true
33+
default_boot_flash_addr_mps2_an505 = '0x10000000'
34+
default_boot_flash_size_mps2_an505 = '0x10000400'
35+
default_flash_addr_mps2_an505 = '0x10000400'
36+
default_flash_size_mps2_an505 = '0x103ffc00'
37+
default_ram_addr_mps2_an505 = '0x80000000'
38+
default_ram_size_mps2_an505 = '0x01000000'
39+
40+
separate_boot_flash_mps3_an547 = true
41+
default_boot_flash_addr_mps3_an547 = '0x00000000'
42+
default_boot_flash_size_mps3_an547 = '0x00080000'
43+
default_flash_addr_mps3_an547 = '0x01000000'
44+
default_flash_size_mps3_an547 = '0x00200000'
45+
default_ram_addr_mps3_an547 = '0x60000000'
46+
default_ram_size_mps3_an547 = '0x01000000'

scripts/do-clang-arm-configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
3434
# OF THE POSSIBILITY OF SUCH DAMAGE.
3535
#
36-
exec "$(dirname "$0")"/do-configure clang-arm-none-eabi "$@"
36+
exec "$(dirname "$0")"/do-configure clang-arm-none-eabi -Dmultilib-exclude=aarch64 -Dtests=true "$@"

0 commit comments

Comments
 (0)