Benjamin Valentin
ce36460b16
cpu/native: implement periph_rtc_ms
2023-03-05 02:56:28 +01:00
chrysn
494942b981
native/stdio: Explicitly provide getchar
...
This ensures that even when libc does not implement getchar through
getc, any custom stdio is still in the loop when getchar is used.
2023-02-27 20:43:15 +01:00
bors[bot]
d4d91492cd
Merge #18100 #19121 #19164 #19169
...
18100: core/assert: print backtrace on failed assertion r=kaspar030 a=benpicco
19121: socket_zep: only report size of single datagram r=kaspar030 a=benpicco
19164: cpu/sam0_common: move adc_res_t to common code r=dylad a=benpicco
19169: tests/driver_ws281x: don't overwrite board definition r=benpicco a=benpicco
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-01-18 23:59:58 +00:00
bors[bot]
fb603f2660
Merge #18459 #18724 #19081 #19082 #19136
...
18459: makefiles/suit: make it possible to accept multiple SUIT keys r=miri64 a=benpicco
18724: nanocoap_sock: implement DTLS socket r=miri64 a=benpicco
19081: sys/stdio_udp: add stdio over UDP r=benpicco a=benpicco
19082: core/init: add early_init() r=benpicco a=benpicco
19136: CI: re-add "synchronize" event to check-labels r=miri64 a=kaspar030
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-01-13 13:50:55 +00:00
Benjamin Valentin
81625fd5f2
doc: sort all stdio implementations into sys_stdio group
2023-01-13 11:08:22 +01:00
Benjamin Valentin
913d72cb99
socket_zep: don't discard frames if not in RX mode
2023-01-10 17:36:30 +01:00
Benjamin Valentin
3dedfb7a17
socket_zep: only report size of single datagram
2023-01-10 17:36:30 +01:00
Benjamin Valentin
8a80e70e5e
cpu/native: syscalls: provide real_recv()
2023-01-10 14:24:16 +01:00
Benjamin Valentin
59f067171f
core/init: call vfs_bind_stdio() in early_init()
2023-01-08 22:26:13 +01:00
Benjamin Valentin
124b849503
cpu: call early_init()
2023-01-08 22:26:12 +01:00
Marian Buschsieweke
86fdbd7054
core/lib: Add macros/utils.h header
...
The macros CONCAT(), MIN(), and MAX() are defined over and over again in
RIOT's code base. This de-duplicates the code by moving the macros to a
common place.
2023-01-07 09:47:44 +01:00
Teufelchen1
c9e9a8d2f1
native: Remove code used for __MACH__ target
2022-12-22 17:57:25 +01:00
Benjamin Valentin
dd5c876034
cpu/native: replace RIOT_FILE_RELATIVE with __FILE__
2022-11-19 01:48:42 +01:00
Martine Lenders
669e21c7f5
Merge pull request #18735 from Teufelchen1/chore/native_macos
...
boards/native: Remove macOS as native target
2022-10-26 12:48:00 +02:00
Teufelchen1
35a06c4806
boards/native: Remove macOS as native target
2022-10-25 19:11:23 +02:00
Benjamin Valentin
2bb657c72c
socket_zep: make use of crc16_ccitt
2022-10-20 13:08:30 +02:00
Benjamin Valentin
debdbf91d9
cpu/native: get mtd size from file size
2022-09-29 14:55:30 +02:00
Benjamin Valentin
0aa931ad7d
cpu/native: povide real_ftell() function
2022-09-29 14:55:27 +02:00
Benjamin Valentin
838a5e4bd3
netdev_drivers: make sure to signal LINK_UP at least once
2022-09-16 22:57:28 +02:00
Benjamin Valentin
66153a47cf
treewide: fix typos
2022-09-15 23:31:40 +02:00
Marian Buschsieweke
6790167a18
Merge pull request #18226 from benpicco/cpu_get_last_instruction
...
cpu: cpu_print_last_instruction() -> cpu_get_caller_pc()
2022-09-15 20:06:10 +02:00
Benjamin Valentin
ea917f4b07
cpu: cpu_print_last_instruction() -> cpu_get_caller_pc()
2022-09-15 10:49:56 +02:00
Benjamin Valentin
bf1c580b0c
socket_zep: ignore packets sent on the wrong radio channel
2022-09-14 11:50:14 +02:00
Jose Alamos
c0dcbc247e
Kconfig/ieee802154: fix typo in hal selector
2022-08-10 13:43:04 +02:00
Leandro Lanzieri
f266243477
cpu/native/socket_zep/Kconfig: indicate the radio HAL is implemented
2022-07-28 09:32:25 +02:00
Leandro Lanzieri
6679663647
cpu/native/cli_eui_provider: model in Kconfig
2022-07-22 15:57:22 +02:00
Teufelchen1
1231807bab
Documentation: Renaming OS X to macOS
2022-06-23 17:25:48 +02:00
Martine Lenders
c4e202ae67
Merge pull request #17709 from benpicco/cpu/native-tap_wired
...
netdev_tap: make 'wired' property configurable
2022-06-01 02:24:43 +02:00
Benjamin Valentin
fad65011b7
netdev_tap: make NETDEV_TAP_MAX an upper bound
2022-05-23 15:27:35 +02:00
Benjamin Valentin
2520aaf1e8
cpu/native: add -w <tap> command line parameter to simulate wireless tap
2022-05-23 15:27:35 +02:00
Benjamin Valentin
f61c12e008
netdev_tap: make 'wired' property configurable
...
`netdev_tap` is a virtual interface, make it possible to simulate both
a wired and a wireless interface.
2022-05-23 15:27:35 +02:00
Marian Buschsieweke
bae91c1660
Merge pull request #17723 from benpicco/periph_timer_periodic-set_stopped
...
drivers/periph/timer: add TIM_FLAG_SET_STOPPED flag
2022-05-03 12:06:37 +02:00
Benjamin Valentin
4326b5ca54
cpu/native: timer: implement TIM_FLAG_SET_STOPPED
2022-04-28 13:27:59 +02:00
Francisco Molina
0d7eb36247
boards/native: only one CAN_DLL by default
2022-04-20 14:40:06 +02:00
Daniel Lockau
879e082703
cpu/native: use socketcan pkg
2022-04-20 11:55:29 +02:00
Francisco Molina
0819660303
sys/syscalls: add libc_gettimeofday
...
Conditionally implement gettimeofday() if module is included, this
avoids including ztimer64 even when not needed
2022-03-24 11:36:49 +01:00
Francisco Molina
6151895bfa
sys: use ztimer64_xtimer_compat when required
2022-03-02 14:28:54 +01:00
c5b3934767
cpu/native: improve getpid()
stub message
2022-02-16 11:38:32 +01:00
Jens Wetterich
4dfeafcabd
cpu/native/netdev_tap: Add to netdev_register
2022-02-11 07:54:11 +01:00
benpicco
be45400631
Merge pull request #17341 from benpicco/vfs-mtd_cleanup
...
sys/vfs: add file-system auto-mount
2022-02-09 21:50:34 +01:00
Benjamin Valentin
fc4cd0484b
cpu/native: change mtd_native_dev_t parent name to base
...
This brings it in line with the other MTD implementations.
2022-02-09 12:21:53 +01:00
Benjamin Valentin
4c9f1e0ca4
cpu/native: fix build with afl-gcc 11.2
...
Building `fuzzing/gcoap` with afl-gcc 11.2 gives
/home/benpicco/dev/RIOT/cpu/native/native_cpu.c: In function ‘thread_stack_init’:
/home/benpicco/dev/RIOT/cpu/native/native_cpu.c:120:11: error: variable ‘stk’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
120 | char *stk = NULL;
| ^~~
/home/benpicco/dev/RIOT/cpu/native/native_cpu.c:118:72: error: argument ‘stack_start’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
118 | char *thread_stack_init(thread_task_func_t task_func, void *arg, void *stack_start, int stacksize)
|
We can re-write the function to not use this temporary variable and the error goes away.
2022-01-27 21:09:59 +01:00
Jose Alamos
874a13e090
ieee802154/hal: remove RX continuous cap
2022-01-10 13:57:03 +01:00
Jose Alamos
db815aa779
ieee802154/hal: migrate to request_op and confirm_op
2022-01-10 13:57:02 +01:00
8272e4fbd2
Merge pull request #17359 from benpicco/irq_is_in-bool
...
core: change return type of irq_is_in(), irq_is_enabled() to bool
2022-01-06 18:13:20 +01:00
chrysn
afdabcf9b6
Merge pull request #16274 from chrysn-pull-requests/rust-application
...
Add some Rust building infrastructure and example
2021-12-16 16:17:28 +01:00
b206658b51
cpu/native: define default CLOCK_CORECLOCK constant
2021-12-15 12:41:36 +01: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
Leandro Lanzieri
df7ce1c647
makefiles/kconfig: use two lists for boards and CPUs default configs
...
This introduces KCONFIG_BOARD_CONFIG and KCONFIG_CPU_CONFIG variable for
boards and CPUs (including common directories) to add default
configuration files to be merged. The current approach, as it uses
Makefile.features, would include boards first, not allowing them to
override CPU configurations.
2021-12-13 12:33:21 +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
José Alamos
ce8cda2fd8
Merge pull request #16932 from benpicco/socket_zep-hal
...
socket_zep: port to radio HAL
2021-12-07 18:24:33 +01:00
Leandro Lanzieri
368ccdf3f8
sys/vfs: model Kconfig
2021-11-29 10:30:49 +01:00
Leandro Lanzieri
c5f9d50a57
socket_zep: add Kconfig
2021-11-18 14:17:29 +01:00
Benjamin Valentin
fa2d9bde56
socket_zep: port to radio HAL
2021-11-18 11:51:14 +01:00
83c2f2d367
Merge pull request #17155 from maribu/cpu/native
...
cpu/native: align stack in thread_stack_init()
2021-11-16 20:48:32 +01:00
326b0c980a
cpu/native: migrate periph_rtc to ztimer
2021-11-11 10:54:30 +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
7f3344870d
Merge pull request #16972 from Ollrogge/flashpage_pr
...
periph/flashpage: extend API
2021-10-26 12:51:05 +02:00
Francisco
96e2ad1f0e
Merge pull request #16956 from fjmolinas/pr_native_relative_stacksize
...
cpu/native/include: other stacksizes based on default
2021-10-26 09:04:16 +02:00
Ollrogge
cdd9f303cf
cpu/native: extend flashpage API
2021-10-25 15:07:37 +02:00
Francisco Molina
5070489aa6
cpu/native/include: other stacksizes based on default
2021-10-25 09:13:21 +02:00
Benjamin Valentin
1a2984b786
cpu/native: fix build with gcc 11
...
This fixes the following warning with GCC 11.2:
cpu/native/include/native_internal.h:153:13: error: variably modified ‘__isr_stack’ at file scope
153 | extern char __isr_stack[SIGSTKSZ];
| ^~~~~~~~~~~
cpu/native/include/native_internal.h:154:13: error: variably modified ‘__end_stack’ at file scope
154 | extern char __end_stack[SIGSTKSZ];
2021-10-12 14:56:11 +02:00
benpicco
cc3df3ec85
Merge pull request #16822 from benpicco/cpu/native-stdio
...
cpu/native: make use of stdio_read() / stdio_write()
2021-09-22 20:47:45 +02:00
Benjamin Valentin
13e16fa34f
cpu/native: make use of stdio_read() / stdio_write()
...
On `native` the functions stdio_read() / stdio_write() were not
used.
Those functions are intended for alternative stdio implementations.
As a result, no alternative stdio could be used on `native`.
To fix this, call the functions in `_native_read()` / `_native_write()`
when dealing with stdio fds.
2021-09-22 17:22:30 +02:00
Francisco
0b7eb2bbc9
Merge pull request #16836 from fjmolinas/pr_kconfig_mtd
...
drivers/mtd: fix Kconfig dependencies
2021-09-22 10:08:14 +02:00
Francisco Molina
14ef09b8b4
drivers/mtd: fix Kconfig dependencies
...
Currently implementations of the MTD api are selecting the module,
this makes it easy for default backends to be selected. But the
correct modeling is simply selecting the MTD api and then selecting
a backend. BOARDs providing one of the backends can expose this and
then that backend can be selected by default.
There is also currently nothing preventing from using the MTD api
with no backend since a mock backend can easily be provided as is
done in all mtd tests.
2021-09-22 09:22:51 +02:00
Jean Pierre Dudey
ffff68deaf
Merge pull request #16813 from jeandudey/doc1
...
cpu: fix doxygen grouping warnings
2021-09-13 11:30:27 +02:00
Jean-Pierre De Jesus DIAZ
d1f9cd0647
cpu/native: fix doxygen grouping warnings
...
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2021-09-11 12:45:15 +02:00
Benjamin Valentin
9a6fc85b16
treewide: replace gnrc_netdev_default with netdev_default
2021-09-06 15:43:40 +02:00
Hugues Larrive
f292cfc8ce
drivers/periph_spi: remove duplicated includes introduced in #15902
2021-09-02 09:40:31 +02:00
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
...
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02:00
Marian Buschsieweke
f04b522601
cpu/periph_spi: update implementations to new API
...
Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.
2021-09-01 21:38:40 +02: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
Jose Alamos
853b3a0918
netdev_tap: avoid explicit cast to netdev
2021-07-09 10:38:34 +02:00
Jose Alamos
686c81caf7
socket_zep: avoid explicit cast to netdev
2021-07-09 10:38:33 +02:00
benpicco
1407559f33
Merge pull request #15773 from benpicco/tools/zep_dispatch-topology
...
tools/zep_dispatch: add support for advanced topologies
2021-07-07 12:14:43 +02:00
MrKevinWeiss
9917b37c1c
cpu/native: Add native mtd kconfig dep
2021-06-18 11:27:33 +02:00
136c630870
cpu/native: make thread size defines overridable
2021-05-07 13:12:01 +02:00
Karl Fessel
15f2d0008a
native/rtc: ensure no struct tm extra information is used
2021-04-01 18:19:15 +02:00
Karl Fessel
72213ec99a
native/rtc: avoid dealing with DST
2021-04-01 18:19:15 +02:00
Tobias Nießen
8a56692236
cpu/native: rename _get_promiscous/_set_promiscous
2021-03-03 17:50:19 +01:00
Francisco
c91499997e
Merge pull request #16030 from benpicco/drivers/mtd_flashpage-fix_native
...
drivers/mtd_flashpage: fixes for native (and stm32l0, stm32l4)
2021-02-23 15:12:06 +01:00
Benjamin Valentin
65093a47a3
cpu/native: timer: fix style issue
2021-02-23 09:52:05 +01:00
Benjamin Valentin
7eb159c2a2
cpu/native: timer: implement timer_set_periodic()
...
The native timer is not free running, so we can't honor it's flags.
But setitimer() already provides an interval option, we only have to enable it.
2021-02-23 09:51:53 +01:00
Benjamin Valentin
934d1c1f7f
socket_zep: include HW address with HELLO packet
2021-02-20 20:37:14 +01:00
Benjamin Valentin
99341a3dc4
cpu/native: export send() as real_send()
2021-02-20 20:35:33 +01:00
Martine Lenders
de4ee0f934
Merge pull request #15562 from benpicco/socket_zep_register
...
socket_zep: register with netdev, provide EUI-64 as command line parameter
2021-02-20 20:32:01 +01:00
Benjamin Valentin
033c0110d0
cpu/native: flashpage: sector-slign the flashpage area
2021-02-18 14:22:11 +01:00
ee9d6c879a
cpu/native: add XFA support
2021-02-18 10:46:08 +01:00
Benjamin Valentin
17199dbb1c
socket_zep: allow to specify MAC address of ZEP device
...
Add a command-line parameter for setting the EUI-64 of a ZEP device.
This allows a native node to use a persistent ZEP address across reboots.
2021-02-16 18:57:27 +01:00
Benjamin Valentin
1acbd6e560
cpu/native: add periph/flashpage implementation
...
Add a simple RAM-backed flashpage implementation for native, to
allow for easier testing of flashpage based applications / features.
2021-02-05 23:31:46 +01:00
Benjamin Valentin
61bce4dc9c
socket_zep: get MAC address from EUI provider
2021-01-25 22:59:04 +01:00
Benjamin Valentin
d8918c24fa
socket_zep: register with netdev
2021-01-25 22:59:01 +01:00
Benjamin Valentin
ac9cd80aa7
cpu/native: clean up usage output
...
Remove newlines between block of arguments.
Add a newline at the end.
Makes usage output look tidier.
2021-01-25 22:58:38 +01:00
517fc585b1
cpu/native: Add dummy thread_arch.h header
2021-01-22 09:21:46 +01:00
Daniel Lockau
33afc0ddab
cpu/native/rtc: add rtc_set_time implementation
2020-12-15 12:52:35 +01:00
Benjamin Valentin
d7ed3418b5
cpu/native: pm: fix build with pm_layered
2020-12-08 18:24:02 +01:00