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

92 Commits

Author SHA1 Message Date
Marian Buschsieweke
f34cd3f7c1
cpu/native: fix build with musl
This changes a bunch of things that allows building with the musl C lib,
provided that `libucontext-dev` and `pkg-config` are installed.

Note that installing libucontext makes absolutely zero sense on C libs
that do natively provide this deprecated System V API, such as glibc.
Hence, it no sane glibc setup is expected to ever have libucontext
installed.

A main pain point was that argv and argc are expected to be passed to
init_fini handlers, but that is actually a glibc extension. This just
parses `/proc/self/cmdline` by hand to populate argv and argc during
startup, unless running on glibc.
2024-05-31 12:18:33 +02:00
Frederik Haxel
0c2cfe99e6 native64: Add Linux/x86_64 board
Adds a separate board for native64 instead of the `NATIVE_64BIT` workaround.
The files in `boards/native64` are more or less dummy files and just include
the `boards/native` logic (similar to `openlabs-kw41z-mini-256kib`).
The main logic for native is in `makefiles/arch/native.inc.mk`, `cpu/native`
and `boards/native`.

The remaining changes concern the build system, and change native board checks
to native CPU checks to cover both boards.
2024-02-05 22:01:40 +01:00
Frederik Haxel
16eff9b6ed native: Linux/x86_64 support
Initial version to test 64 bit compatibility.

Instead of a separate board, the inital version for Linux/x86_64 is enabled
by setting the environment variable `NATIVE_64BIT=y` and compiling as usual.

Not currently implemented:
* Architectures other than x86_64 or operating systems other than Linux
    * No FreeBSD support
    * No Aarch support
* Rust support for x86_64
2024-01-30 16:33:19 +01:00
Teufelchen1
c9e9a8d2f1 native: Remove code used for __MACH__ target 2022-12-22 17:57:25 +01:00
Benjamin Valentin
41a5b7ef7a core: change return type of irq_is_in(), irq_is_enabled() to bool
This only cleans up the API, no change in behavior or users of the API
is expected.
2021-12-08 15:53:15 +01:00
Marian Buschsieweke
09b8387df4
cpu/native: align stack in thread_stack_init()
Unaligned accesses on x86(_64) are allowed, but slow. However, some host systems
might not be that forgiving. Aligning the stack to sizeof(uintptr_t) should be
a pretty safe safety measure.

And with this done, all casts of the stack pointer that increase alignment
requirements are now intermediately casted to `uintptr_t` to silence
warnings from -Wcast-align - after all the stacks are now manually aligned.
2021-11-06 20:22:10 +01:00
Francisco
3db378e015
Merge pull request #11117 from haukepetersen/add_core_irqisen
core: add irq_is_enabled() function to irq interface
2021-08-26 18:41:02 +02:00
Hauke Petersen
d4181b91fa cpu/native: implement irq_is_enabled() 2021-08-25 08:01:05 +02:00
87b49d04ab cpu/native: defer yield when IRQs are disabled.
This makes native behave like Cortex-M, which flags PENDSV, which then
gets triggered once IRQs are re-enabled.
2021-08-24 09:49:40 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Marian Buschsieweke
b657ebc39a
cpu/native: Don't access sched_active_*
Replaced accesses to sched_active_* with API calls in C files
2020-08-17 12:16:08 +02:00
31b027124b cpu/native: fix typos 2019-11-23 22:39:36 +01:00
Francisco Molina
97dda76e7a cpu/native/irq_cpu.c: fix cpp.check unitialized variable 2019-11-21 11:58:07 +01:00
4133908fe0 cpu/native: fix doxygen grouping 2018-06-11 19:12:02 +02:00
86665b71bf cpu: adapt to COREIF_NG removal 2017-11-16 14:40:16 +01:00
4291c1f839 native: support add periph/pm support 2017-01-12 11:24:15 +01:00
0194091673 remove obsolete lpm code 2017-01-12 11:24:15 +01:00
Ludwig Ortmann
83886d61c7 native: start with interrupts disabled 2016-10-15 07:50:44 +02:00
Ludwig Ortmann
3b6d0595ef native: indicate interrupt status in ISR context 2016-10-15 07:50:44 +02:00
Ludwig Ortmann
535eda8805 native: improve comments, coding style 2016-10-15 07:40:49 +02:00
Joakim Nohlgård
b02e0eca47 ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP) 2016-07-12 10:17:49 +02:00
Yonezawa-T2
1ce140d910 debug: fix compilation error for %p formatter 2016-03-29 11:46:29 +09:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
effb15a2cc Merge pull request #3313 from gebart/pr/eINT-fixes
eINT/dINT fixes
2015-09-29 12:39:16 +02:00
Ludwig Knüpfer
eda6328e21 documentation: update my name (Ortmann -> Knüpfer) 2015-09-27 18:58:30 +02:00
Joakim Gebart
27565a655e cpu/native: remove dINT/eINT definitions 2015-09-19 10:38:18 +02:00
Oleg Hahm
49917a5797 core: cpu: fix check for DEVELHELP 2015-09-12 12:43:15 +02:00
Benoît Canet
ced541cc67 native: irq_cpu: Rewrite IRQs (de)registration 2015-07-09 02:43:04 +02:00
Benoît Canet
4832a1a6b0 native: irq_cpu: Whitelist signals 2015-07-09 02:43:03 +02:00
Benoît Canet
a035d27414 native: irq_cpu: Make IRQ enabling/disabling safe 2015-07-09 02:43:01 +02:00
Ludwig Ortmann
015f5598e4 native: cleanup irq_cpu, native_cpu debug output 2014-12-04 10:48:15 +01:00
Ludwig Ortmann
eb2cc522cd native: forced debug message for SIGUSR1 2014-12-04 10:38:12 +01:00
Ludwig Ortmann
a1b530a98d native: shutdown -> native_shutdown 2014-11-14 20:51:34 +01:00
Oleg Hahm
eb40993d8b native: remove obsolete line 2014-10-30 16:37:10 +01:00
Oleg Hahm
9a61d8cf1c core: move optional tcb members to DEVELHELP 2014-10-30 16:37:10 +01:00
Ludwig Ortmann
7bcf896ec6 native: add and use callback type 2014-10-30 12:11:22 +01:00
Ludwig Ortmann
3d29a9e3d3 native: add support for Linux on ARM 2014-09-04 16:39:33 +02:00
René Kijewski
a79d9c8562 native: remove redeclarations of sched_active_thread 2014-08-14 13:21:17 +02:00
Ludwig Ortmann
3ca4f18479 doc: use lgplv2.1-short license header instead of lgpl-short-riot 2014-07-31 22:57:20 +02:00
Ludwig Ortmann
bea563d1da Fix a few cppcheck findings 2014-07-25 08:17:06 +02:00
René Kijewski
2e9a1773e9 native: use real_pipe() and read_close() 2014-06-14 00:39:02 +02:00
Oleg Hahm
ef5ec344fd core: prefix API functions correctly
Also changed names for bitarithm functions and rename thread_pid to sched_active_pid.
2014-05-18 08:53:20 +02:00
Ludwig Ortmann
98bbb80571 documentation: append my email to my name everywhere 2014-05-15 18:07:17 +02:00
Ludwig Ortmann
e0a1217f20 native: refactor one debug/errx use in irq_cpu.c 2014-05-15 11:37:18 +02:00
René Kijewski
9a9caf2c68 Exterminate old-style function definitions 2014-05-12 21:57:09 +02:00
Ludwig Ortmann
42aa3d9f5b native: update support for FreeBSD
works with FreeBSD 10.0 amd64/i386

fixes: #505
2014-04-20 07:31:40 +02:00
Ludwig Ortmann
176f379c7a dont err() but warn() if no thread exists in native_isr_entry 2014-01-29 18:44:42 +01:00
Ludwig Ortmann
796b656e31 force-debug (eINT && in_isr) in DEVELHELP 2014-01-29 18:44:42 +01:00
Ludwig Ortmann
6f5d4dcdb4 block all signals per default 2014-01-29 18:44:42 +01:00