1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

88 Commits

Author SHA1 Message Date
Marian Buschsieweke
8eb3692b9d
makefiles/arch/riscv.inc.mk: improve error message
When no toolchain could be detected, provide a friendly message
instead.
2022-04-19 15:51:31 +02:00
Marian Buschsieweke
c89331f93b
build system: Detect more RISC-V target triples
Omitting the middle part of `riscv32-none-elf` is apparently legal and
done by Arch Linux.
2022-04-14 19:25:36 +02:00
Marian Buschsieweke
10f65f1631
build system: Fix compilation for RISC-V with newer GCC
A backward incompatible change in the RISC-V resulting in instructions
previously included by rv32imac to only be available with
rv32imac_zicsr. All RISC-V CPUs supported by RIOT are hence either
considered as rv32imac (from the old ISA spec point of view) or as
rv32imac_zicsr (from the new ISA spec point of view). This adds a
simple test if GCC understands rv32imac_zicsr and uses it then as march,
but uses rv32imac as march if not.
2022-04-14 16:52:48 +02:00
Keith Packard
b21e624280 cpu/arm7, arch/cortexm: Remove -fno-builtin flag
This flag disables all builtin functions provided by the compiler as
well as disabling all optimizations and error checking related to
standard C library functions. If you're using a C library which
conforms to the ANSI C standard, you want to leave these compiler
features enabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-04-02 16:58:09 -07:00
chrysn
a2e1b92e1d makefiles: Define RUST_TARGET for use with Cargo / Rust
For RISC-V and Cortex-M-not-3, triples are known and have worked in some
configuration, but do not work at the moment and stay disabled until the
reference platforms (native, M3) have been established well.
2021-12-14 12:55:13 +01:00
chrysn
69dadf61e9
Merge pull request #17152 from maribu/sys/posix/sockets
sys/posix/socket: align struct sockaddr{,_storage}
2021-11-16 13:55:27 +01:00
Marian Buschsieweke
4b02d0fbc1
makefiles/arch: use -std=gnu11 also for MIPS
This brings MIPS back in line with the other archs.
2021-11-11 09:55:24 +01:00
Benjamin Valentin
b4dc8a5366 makefiles: RISC-V: prefer target triple from riotdocker 2021-11-04 10:02:04 +01:00
Francisco
7f3344870d
Merge pull request #16972 from Ollrogge/flashpage_pr
periph/flashpage: extend API
2021-10-26 12:51:05 +02:00
Ollrogge
741943f021 cpu/msp430_common: extend flashpage API 2021-10-25 15:03:50 +02:00
Marian Buschsieweke
62d6a560b1
cpu/avr8_common: Fix link with binutils > 2.35.2
The xfa.ld script is incompatible with binutils > 2.35.2 and results
in firmwares that wont boot. Sadly, I couldn't figure out an elegant
way to fix the issue. Instead, I modified the linker script provided
by binutils to also include XFA.
2021-10-13 16:37:19 +02:00
Martine Lenders
13cc189a8a
Revert "Remove which from shell invocations" 2021-09-03 11:27:03 +02:00
chrysn
6b50033766 makefiles: Replace which with command -v
As the POSIX documentation[1] of `command -v` guarantees that on error
there will be no output (and there will be output in the other cases),
the tests in Makefiles were simplified to test for output equality to
the empty string.

Redirects swallowing error outputs were removed, as the command produces
no error output there (as recommended at [2]).

Existing uses of `command` are simplified as well.

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
[2]: https://salsa.debian.org/debian/debianutils/-/blob/master/debian/NEWS
2021-09-02 16:30:46 +02:00
Gerson Fernando Budke
307e8c7a17 cpu/atxmega: Add external bus interface
Introduce XMEGA EBI driver.  This enable EBI for use with all memory
supported by the device and peripherals. It include support to  SRAM,
SDRAM, LCDs or any other external bus access.

Note: This feature only works for A1/A1U series, which are, the series
with EBI hardware.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-08-24 08:35:41 -03:00
Marian Buschsieweke
5cc62437da
cpu/avr8_common: move ldscripts from atmega_common
The ldscripts are already used for both ATmega and ATxmega, so it
makes sense to have them in the common folder.
2021-03-30 10:50:09 +02:00
Gerson Fernando Budke
4b2bcd560b makefiles/arch/avr8: Add xmega linker conditions
The current script doesn't allow change script path and name.
Add LDSCRIPT_COMPAT_PATH and LDSCRIPT_COMPAT_NAME default
values to allow a unique path inside atxmega folder.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Gerson Fernando Budke
699248c65f makefiles/arch/atmega.inc.mk: Rename to avr8.inc.mk
Atmel AVR-8 CPU was reworked to accomodate variants like ATxmega.
This rename to atmega.inc.mk to avr8.inc.mk to be compliant with
new directory structure.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
56165d22a4
arch/riscv: use natural malign-data type 2021-02-25 12:50:52 +01:00
6711388afe cpu/mips_pic32_common: fix XFA support 2021-02-18 10:46:08 +01:00
f411fd4814 cpu/msp430_common: add XFA support 2021-02-18 10:46:08 +01:00
Joakim Nohlgård
6adeec09e9 atmega_common: add arch specific XFA ldscript to properly place .roxfa 2021-02-16 14:55:26 +01:00
Sören Tempel
125e4b54c1 fe310: Support the LLVM toolchain (i.e. compilation with clang)
This requires -nostartfiles to be only passed to the linker, not the
compiler, as it is a linker flag and passing it to the compiler causes a
clang warning to be emitted.

Additionally, clang does not seem to support `-mcmodel=medlow` and
`-msmall-data-limit=8` but these options do not seem strictly necessary
to me anyhow thus they are deactivated conditionally when using clang.
2020-10-07 07:37:52 +00:00
2692957c0e
riscv_common: Refactor common fe310 code to riscv_common 2021-02-05 09:32:19 +01:00
Benjamin Valentin
236c4db83e cpu/atmega*: drop ldscripts_compat
Those were only needed with very old toolchains.
These days they cause more confusion than benefit, so drop them.
2021-01-22 19:05:20 +01:00
Marian Buschsieweke
720ea90372
Merge pull request #15668 from leandrolanzieri/pr/makefiles/arch/riscv_redirect_which_error
makefiles/arch/riscv: redirect 'which' error message to /dev/null
2020-12-19 21:43:16 +01:00
Marian Buschsieweke
902aa29b62
sys/malloc_thread_safe: split out of cpu/atmega_common
Split out Gunar Schorcht's clever approach to provide thread safe malloc for
AVR into a system module and make AVR depend on this. This allows other
platforms to also use this.
2020-12-17 15:39:05 +01:00
Leandro Lanzieri
aaf4a738f9
makefiles/arch/riscv: redirect error message to /dev/null 2020-12-17 15:23:21 +01:00
Marian Buschsieweke
feee507bf9
makefiles/arch/riscv.inc.mk: Detect target triple
This improves the target triple detection logic to include all possible target
triples of compilers that might be able to generate our binaries.
2020-11-06 20:53:28 +01:00
benpicco
ee189fa428
Merge pull request #15187 from bergzand/pr/info/add_json
info.inc.mk: Add info-build-json as JSON-formatted build info
2020-10-15 21:27:26 +02:00
2dac4db343
make: Use common comma variable definition 2020-10-09 12:02:28 +02:00
Bas Stottelaar
0f8cecb50b cpu/cortexm_common: add support for Cortex-M33 2020-10-06 17:11:26 +02:00
chrysn
2eeda9a1ca makefiles: Pass explicit float mode to clang
The assumption that clang defaults to hard-float on ARM architectures
does not hold on Debian systems where [set-correct-float-abi].
As setting the flags that are implied on most systems does no harm, the
flags for the selected hard- or soft float behavior are now set
independently of the toolchain.

[set-correct-float-abi]: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/10/debian/patches/26-set-correct-float-abi.diff

Closes: https://github.com/RIOT-OS/RIOT/issues/15026
2020-09-25 11:02:29 +02:00
Marian Buschsieweke
d9e495fe83
build system: use riscv-none-elf as triplet
Use riscv-none-elf instead of legacy riscv-none-embed as target triplet for
RISC-V development. However, if ricsv-none-elf is not present, try
riscv64-unknown-elf and riscv-none-embed instead. If the legacy riscv-none-embed
is used, a warning is printed.
2020-09-15 11:18:33 +02:00
Cenk Gündoğan
0d0bc91553
Merge pull request #14754 from leandrolanzieri/pr/no_archives
build system: link object files
2020-09-10 09:36:29 +02:00
Marian Buschsieweke
7c1949341e
build system: Overwrite TARGET_ARCH per arch
Add `TARGET_ARCH_<ARCH>` for each architecture (e.g. `TARGET_ARCH_CORTEX` for
Cortex M) to allow users to overwrite the target triple for a specific arch
from ~/.profile or ~/.bashrc (or the like) without overwriting it for all others
as well.
2020-09-08 22:28:41 +02:00
Leandro Lanzieri
81cb769cad
makefiles: avoid building archives when compiling 2020-09-04 15:01:10 +02:00
08c50947cc cpu/msp430_common: move newlib default module decl to Makefile.dep 2020-08-05 14:32:58 +02:00
a0aeeb5ff4 cpu/msp430: update to modern gcc & newlib 2020-08-05 14:29:00 +02:00
Francisco Molina
e98341da93
Makefile: use normal conditionals 2020-06-29 22:40:29 +02:00
Leandro Lanzieri
4d65bc8e0a
cpu: Rename CPU_ARCH to CPU_CORE 2020-06-16 12:05:40 +02:00
Leandro Lanzieri
ea2f963302
cpu/cortexm: Add 'cortexm_fpu' as a DEFAULT_MODULE if possible
This adds cortexm_fpu to the DEFAULT_MODULE list when the feature
cortexm_fpu is provided by the architecture. It also moves the
dependency resolution of this module to the architecture-specific
Makefile.dep file.
2020-04-01 09:46:29 +02:00
Leandro Lanzieri
64552a3b9a
cpu/cortexm_common: Move common modules to Makefile.dep
This moves the following modules to a architecture-specific Makefile.dep
file:
- cortexm_common
- cortexm_common_periph
- newlib
- newlib_nano
- periph
2020-04-01 09:46:21 +02:00
c7a3219ddb
make: remove useless export of TARGET_ARCH 2020-02-25 09:42:12 +01:00
benpicco
bc6fb241a0
Merge pull request #13139 from francois-berder/mips-cflags
makefiles: arch: mips: Allow CFLAGS_DBG and CFLAGS_OPT to be overridden
2020-02-12 00:02:20 +01:00
e969b2fcd5
cpu/atmega_common: move common dependencies 2020-01-28 13:20:53 +01:00
Francois Berder
10939f2a57 makefiles: arch: mips: Allow CFLAGS_DBG and CFLAGS_OPT to be overridden
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2020-01-15 22:00:58 +00:00
b56827323c
make/mips: cleanup include makefile
Remove a useless export of the ABI variable, fix indentation
2020-01-10 15:08:12 +01:00
ff00097992
cpu/cortexm: cleanup cortexm.inc.mk
- fix indent
- remove unnecessary exports
2020-01-03 14:19:48 +01:00
Francisco
45b2cca14f
Merge pull request #13018 from aabadie/pr/make/linkflags_remove_exports
make: remove use of export with LINKFLAGS variable
2020-01-02 16:37:04 +01:00
df376aeef7
make/cortexm: fix mfpu flag for CortexM7
Use single precision, like with M4 instead of double precision
2020-01-02 14:40:50 +01:00