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

4686 Commits

Author SHA1 Message Date
benpicco
5f6065f567
Merge pull request #12338 from cladmi/pr/make/cortexm/do_not_set_cpu_model
makefiles/arch/cortexm.inc.mk: removing setting CPU_MODEL
2019-10-01 15:25:16 +02:00
Gaëtan Harter
e73b4d2d24
cpu/lpc1768: explictly define CPU_MODEL
Define CPU_MODEL as it required by cortexm.inc.mk
The default setting will be removed from cortexm.inc.mk.
2019-10-01 11:38:35 +02:00
Gunar Schorcht
5009959610
Merge pull request #12346 from benpicco/esp32-thin_archives
cpu/esp32: unconditionally disable thin archives
2019-10-01 10:34:04 +02:00
benpicco
52bf448a3b
Merge pull request #12035 from gschorcht/cpu/esp32/fix_periph_flash
cpu/esp32: fix and improve periph/flash
2019-10-01 10:22:06 +02:00
Benjamin Valentin
0ca2ce0214 cpu/esp32: unconditionally disable thin archives
Thin archives also cause a boot loop when using the flash module.
To prevent further surprises, disable thin archives unconditionally
until the cause for this behaviour is known.
2019-10-01 09:28:33 +02:00
benpicco
5105a2e54d
Merge pull request #12340 from cladmi/pr/makefiles/board_cpu_macros
makefiles: CFLAGS convert to the uppercase function instead of using the shell
2019-09-30 19:53:28 +02:00
Bas Stottelaar
4e6b46ca20 cpu/efm32: implement uart_mode 2019-09-30 18:12:15 +02:00
Gaëtan Harter
4b93f27d83
cpu: use makefiles/utils uppercase
Convert the variables to uppercase using the 'makefiles/utils' function.
2019-09-30 17:25:24 +02:00
Benjamin Valentin
bf1eca338f cpu/cc2538: fix spi_transfer_bytes()
Always wait for RNE before reading DR.
Fixes always reading in the !out_buf case.
2019-09-30 13:11:11 +02:00
Bas Stottelaar
b2769c0857 cpu: efm32: move LOW_POWER_ENABLED to efm32-features.mk 2019-09-30 00:03:15 +02:00
benpicco
1543a8c438
Merge pull request #12276 from kenrabold/pr-fe310_intr_cleanup
cpu/fe310: interrupt handling cleanup
2019-09-28 19:14:07 +02:00
kenrabold
1d6e37a7f7 cpu/fe310: interrupt handling cleanup
Cleanup of FE310 interrupt handler code
Optimization of intr context frame
Reduce size of intr stack
Added unhandled trap output
Fix PR #12237
2019-09-27 13:32:43 -07:00
benpicco
3a3267916e
Merge pull request #12313 from haukepetersen/fix_nrfble_featuredecl
cpu/nrf5x: decelare radio_nrfble feat for all nrfs
2019-09-27 11:17:36 +02:00
benpicco
efa41ad094
Merge pull request #12222 from benpicco/samd5x-clock
cpu/samd5x: allow more flexible selection of CLOCK_CORECLOCK
2019-09-27 11:07:54 +02:00
benpicco
3e538c042d
Merge pull request #12292 from benpicco/esp_wifi-workaround
cpu/esp32: disable thin archives if esp_wifi is used
2019-09-27 10:50:35 +02:00
Benjamin Valentin
7e5aa7e775 cpu/sam0_common: uart: fix baud rate calculation
In fractional mode, 3 bits are used to store the fractional part.
Therefore we must multiply / divide by 8 instead of 10 in order to
get the correct values.
2019-09-27 10:49:43 +02:00
Benjamin Valentin
736e5e5a35 cpu/samd5x: allow more flexible selection of CLOCK_CORECLOCK
There are some constraints to the oscillators on the samd5x.

 - DFLL is fixed to run at 48 MHz
 - DPLL can run at 96 to 200 MHz

Always use DFLL for frequencies <= 48 MHz.
For frequencies >= 96 MHz, use DPLL directly.
For frequencies < 96 MHz, clock DPLL at twice the desired frequency
and use a divider.
2019-09-27 10:49:43 +02:00
Hauke Petersen
982d730adf cpu/nrf5x: decelare radio_nrfble feat for all nrfs 2019-09-27 10:00:06 +02:00
a7f6508109 cpu/cortexm: don't disable IRQs in cpu_jump_to_image() 2019-09-26 23:38:43 +02:00
e1e01e2617
Merge pull request #11250 from dylad/pr/samr34_support
board: add support for SAMR34-XPRO
2019-09-26 11:27:22 +02:00
dylad
e189d085b0 cpu/sam0: add support for SAMR34 MCU 2019-09-26 10:48:03 +02:00
dylad
c9bd7deea0 cpu/sam0: add SAMR34 vendor files 2019-09-26 10:48:03 +02:00
Francois Berder
1673f890ec cpu: mips32r2_common: Use stdio_uart to handle UHI write syscalls
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-09-25 21:36:10 +01:00
Martine Lenders
57edabce96
Merge pull request #12269 from bergzand/pr/nrfusb/fix_control_write
nrfusb: Fix data stage handling of control writes
2019-09-25 18:08:08 +02:00
Gaëtan Harter
1e561e9f63 cpu/lpc2387: increase 'pthread_reaper' stacksize
At the time of configuration, the pthread-reaper uses '164' bytes of
stack when 'idle' stack is only '160'. By having double it gives some
margin.

ps
        pid | name                 | state    Q | pri | stack  ( used) | base addr  | current
          1 | idle                 | pending  Q |  15 |    160 (  128) | 0x4000007c | 0x4000009c
          2 | main                 | running  Q |   7 |   2560 ( 1232) | 0x4000011c | 0x4000095c
          3 | pthread-reaper       | bl rx    _ |   0 |    320 (  164) | 0x40000bac | 0x40000c48
            | SUM                  |            |     |   3040 ( 1524)
2019-09-25 16:17:01 +02:00
Benjamin Valentin
111fe80eb9 cpu/esp: disable thin archives if esp_wifi is used
For a yet unknown reason, both esp8266 and esp32 get stuck in a
reboot loop when thin archives are used.

As a workaround, disable thin archives for now if esp_wifi is used.

fixes #12258
2019-09-25 07:48:07 +02:00
Martine Lenders
1598c8c6f8
Merge pull request #11950 from gschorcht/cpu/esp32/periph-gpio_read-fix
cpu/esp32: fix of gpio_read for output ports
2019-09-24 20:20:40 +02:00
Francisco
5ab2db71a4
Merge pull request #12282 from LordTy/esp32_build_fix
cpu/esp32: Use awk/printf instead of echo -n when flashing esp32
2019-09-24 18:38:35 +02:00
benpicco
3833e42426
Merge pull request #12092 from cladmi/pr/cpu_model/minor_changes_included
boards with side-effect: move CPU/CPU_MODEL definition to Makefile.features
2019-09-24 18:36:58 +02:00
Gaëtan Harter
8cebed6792
boards/common/esp: harmonize CPU/CPU_MODEL to other boards
* CPU files should already have 'CPU' defined by the board.
* Do not conditionally define CPU as it is not needed.

This is part of cleanup prior to moving the CPU/CPU_MODEL to
Makefile.features.
2019-09-24 17:29:37 +02:00
Thomas Stilwell
70084ab6aa cpu/efm32/uart: enable pullup on RX pin 2019-09-24 16:44:15 +02:00
Tim Broenink
35aa642e8a cpu/common/esp32: use 'awk/printf' instead of 'echo'
- replaces 'echo -n' and 'awk' with 'printf' and 'awk'
  - replaces rest of 'echo' statements with printf
2019-09-24 15:34:54 +02:00
Vincent Dupont
1a44d327cb
Merge pull request #11989 from gschorcht/cpu/esp32/periph-can
cpu/esp32: reimplementation of module esp_can as module periph can
2019-09-23 16:52:05 +02:00
40619d18ca
cpu/nrf5x_common: implement periph_wdt driver 2019-09-20 20:45:42 +02:00
Gunar Schorcht
d5bf41dba1 cpu/esp32: doc update for periph_can 2019-09-20 19:39:23 +02:00
Gunar Schorcht
fc5692d67c cpu/esp32: driver for ESP32 CAN as periph_can 2019-09-20 19:39:23 +02:00
Gunar Schorcht
c498ebd388 cpu/esp32: default device config for periph_can 2019-09-20 19:35:02 +02:00
Gunar Schorcht
49ecce9b81 cpu/esp32: periph_can device/conf type definitions 2019-09-20 19:35:02 +02:00
Gunar Schorcht
e0f1ab0a16 cpu/esp32: module esp_can removed
CAN controller driver for ESP32 is no longer realized as separate module.
2019-09-20 19:35:02 +02:00
Benjamin Valentin
c9f8ff1cf1 sam0_common: add Watchdog implementation 2019-09-20 19:04:41 +02:00
8bb98ba151
cpu/stm32f7: add support for stm32f723 cpu line 2019-09-20 13:41:12 +02:00
Francisco
bd5ceb58e7
Merge pull request #11984 from aabadie/pr/boards/p-l496g-cell02
boards/p-l496g-cell02: add support
2019-09-20 11:28:54 +02:00
711854562b
Merge pull request #12236 from twostairs/cpu_stm32_common_periph_gpip-pd
cpu/stm32_common/periph/gpio: Pull-down on gpio_init_af
2019-09-18 20:02:40 +02:00
07b3bc6918
nrfusb: Fix data stage handling of control writes 2019-09-18 08:11:44 +02:00
benpicco
d5c272ed86
Merge pull request #12199 from smlng/fix_timer_returns
periph/timer: Fix return codes of timer API
2019-09-17 23:04:46 +02:00
Martine Lenders
98482b67c0
Merge pull request #12263 from benpicco/esp_now-fix
esp_now: fix unused variable warning
2019-09-17 21:59:01 +02:00
Benjamin Valentin
9129ea7399 esp_now: fix unused variable warning
esp_now_pkt_hdr_t *hdr is only used if gnrc_sixlowpan is used,
so move it into the according #ifdef

fixes #12257
2019-09-17 19:02:47 +02:00
benpicco
e214dcbd2c
Merge pull request #11986 from kaspar030/mips_remove_nomips16
cpu/mips32r2: remove nomips16 attribute from _mips_handle_exception
2019-09-17 16:54:03 +02:00
b415588677 cpu/mips32r2: remove nomips16 attribute from _mips_handle_exception
A note says "The nomips16 attribute should not really be needed,
it works around a toolchain issue in 2016.05-03."

In fact, in 2018.09-03, the attribute leads to this error:

```cpu/mips32r2_common/thread_arch.c:191:1: error: ‘_mips_handle_exception’ redeclared with conflicting ‘nomips16’ attributes```

This this commit removes the attribute.
2019-09-17 15:59:10 +02:00
9b4755c3ba
Merge pull request #12196 from kenrabold/pr_thread_yield_higher
cpu/fe310: fixes for SW interrupt latency issues
2019-09-17 14:25:10 +02:00
benpicco
5a01a762c2
Merge pull request #12227 from maribu/mips32r2-early-stdio
cpu/mips32r2_common: Added call to stdio_init()
2019-09-17 10:46:10 +02:00
Marian Buschsieweke
8fa0c04e23
Merge pull request #12229 from benpicco/lpc238-cleanup
cpu/lpc2387: clean up the platform
2019-09-16 22:06:59 +02:00
benpicco
1d90617386
Merge pull request #12252 from cladmi/pr/esp8266/revert_uncompatible_option
Revert "cpu/esp8266: update deprecated flash_size argument"
2019-09-16 20:48:46 +02:00
kenrabold
547ebd1b27 cpu/fe310: use WFI to wait for SW interrupt 2019-09-16 09:32:27 -07:00
071c2b2c5f
Merge pull request #12109 from nmeum/pr/riscv_context_switch
cpu/fe310: don't call thread_yield when sched_active_thread is invalid
2019-09-16 16:51:39 +02:00
Gaëtan Harter
15ea073f64
Revert "cpu/esp8266: update deprecated flash_size argument"
This reverts commit 422644bd3a.

The option is only supported after 2.6 which is currently not the
version given with 'esp' toolchain.
It was a bit too early to switch to the new version.
Version 2.7 also supports the old option with only a warning.
2019-09-16 16:08:35 +02:00
Benjamin Valentin
e3b0874305 cpu/lpc2387: clean up the platform
- move clock setup from boards/ to cpu/
 - reduce code duplication
2019-09-16 13:08:56 +02:00
Marius
e87529b4e4
Pull-up on RX pin 2019-09-15 23:55:39 +02:00
Marian Buschsieweke
95a2081cfa
Merge pull request #12225 from maribu/esp8266-early-stdio
cpu/esp8266: Moved stdio_init before periph_init
2019-09-14 12:34:45 +02:00
Marian Buschsieweke
baf911bd7d
cpu/esp8266: Moved stdio_init before periph_init
- This guarantees that DEBUG() is available early in boot process
- Forgotten in https://github.com/RIOT-OS/RIOT/pull/11367, this fixes broken stdio
2019-09-14 12:17:14 +02:00
Marian Buschsieweke
5fd6652865
cpu/mips32r2_common: Added call to stdio_init()
Fixed bug introduced in https://github.com/RIOT-OS/RIOT/pull/11367
2019-09-14 11:42:15 +02:00
Marian Buschsieweke
2750dc2000
cpu/esp32: Moved stdio_init() before periph_init()
- This guarantees that DEBUG() is available early in boot process
- Forgotten in https://github.com/RIOT-OS/RIOT/pull/11367, fixes broken stdio
2019-09-14 11:12:32 +02:00
aed12b4853
Merge pull request #11252 from fjmolinas/pr_wdg_stm32
cpu/stm32_common: add watchdog for stm32
2019-09-13 09:16:18 +02:00
Dylan Laduranty
88fe7afe2b
Merge pull request #12121 from benpicco/sam0-fix_exti
cpu/sam0_common/gpio: don't hard-code number of ports
2019-09-12 20:17:11 +02:00
Francisco Molina
f54c2dbbda cpu/stm32_common: add watchdog for stm32 2019-09-12 19:07:40 +02:00
Gunar Schorcht
4469dadb7f cpu/esp32: _esp_wifi_dev exposed for lwIP
To be able to access the single esp_wifi network device from lwIP adaptation layer, static keyword was removed from esp_wifi_dev variable.
2019-09-12 18:39:46 +02:00
benpicco
e589cfbf6c
Merge pull request #10760 from gschorcht/esp32_esp_eth_link_opt
cpu/esp32: support of NETOPT_LINK_CONNECTED in esp_eth_netdev
2019-09-12 18:14:44 +02:00
Benjamin Valentin
b1724a7d1b periph/rtc: normalize struct tm before usage
A naive implementation may set a RTC alarm in 30s by calling

	struct tm now;
	rtc_get_time(&now);
	now.tm_sec += 30;
	rtc_set_alarm(&now, _cb, NULL);

This works for RTC implementations that use a RTT internally and call
mktime() to convert the struct tm to a unix timestamp, as mktime() will
normalize the struct in the process.

Call rtc_tm_normalize() when the RTC uses separate registers for time / date
components to ensure it is normalized.

This also modifies tests/periph_rtc to exercise this case.
2019-09-12 11:32:31 +02:00
benpicco
729ba07e9a
Merge pull request #11229 from maribu/msp430_cleanup
cpu/msp430_common: Cleanup
2019-09-11 20:12:55 +02:00
benpicco
c12b88ef59
Merge pull request #12188 from jcarrano/sam0_rtt_fix_flags
cpu/sam0_common/../rtt: correcly clear flags.
2019-09-11 15:24:46 +02:00
Sebastian Meiling
ddd97001c1 cpu/lm4f120: fix uninit var in periph/timer 2019-09-11 14:15:51 +02:00
Sebastian Meiling
0629d076eb cpu/sam3: adapt timer to return 0 on success
Adapt periph/timer implementation of sam3 based MCUs
to return 0 on success for all functions.
2019-09-11 13:53:04 +02:00
Sebastian Meiling
49acf98841 cpu/sam0: adapt timer to return 0 on success
Adapt periph/timer implementation of sam0 based MCUs
to return 0 on success for all functions.
2019-09-11 13:52:28 +02:00
Sebastian Meiling
af529531a4 cpu/nrf5x: adapt timer to return 0 on success
Adapt periph/timer implementation of nrf5x based MCUs
to return 0 on success for all functions.
2019-09-11 13:51:53 +02:00
Sebastian Meiling
935bb51e14 cpu/native: adapt timer to return 0 on success
Adapt periph/timer implementation of native based MCUs
to return 0 on success for all functions.
2019-09-11 13:51:02 +02:00
Sebastian Meiling
22f4ec81b0 cpu/mips32r2: adapt timer to return 0 on success
Adapt periph/timer implementation of mips32r2 based MCUs
to return 0 on success for all functions.
2019-09-11 13:48:12 +02:00
Sebastian Meiling
ddcbfce391 cpu/lpc1768: adapt timer to return 0 on success
Adapt periph/timer implementation of lpc1768 based MCUs
to return 0 on success for all functions.
2019-09-11 13:47:32 +02:00
Sebastian Meiling
fd900357fc cpu/lm4f120: adapt timer to return 0 on success
Adapt periph/timer implementation of lm4f120 based MCUs
to return 0 on success for all functions.
2019-09-11 13:46:55 +02:00
Sebastian Meiling
84e6d1571a cpu/kinetis: adapt timer to return 0 on success
Adapt periph/timer implementation of kinetis based MCUs
to return 0 on success for all functions.
2019-09-11 13:46:15 +02:00
Sebastian Meiling
c4fcb241b1 cpu/cc26x0: adapt timer to return 0 on success
Adapt periph/timer implementation of cc26x0 based MCUs
to return 0 on success for all functions.
2019-09-11 13:45:29 +02:00
Sebastian Meiling
cabaaebff4 cpu/cc2538: adapt timer to return 0 on success
Adapt periph/timer implementation of cc2538 based MCUs
to return 0 on success for all functions.
2019-09-11 13:44:46 +02:00
Sebastian Meiling
1d24709674 cpu/atmega_common: adapt timer to return 0 on success
Adapt periph/timer implementation of atmega based MCUs
to return 0 on success for all functions.
2019-09-11 13:41:44 +02:00
Juan Carrano
f7279c84bb cpu/sam0_common: rtt: correcly clear flags.
The INTFLAGS register is cleared by writing a 1 to the corresponding interrupt
flag bit. From the samr21's manual:

> Writing a zero to this bit has no effect.
> Writing a one to this bit clears the Compare 0 interrupt flag.

This is a common pattern in flag registers.

This RTT driver is using or-equal to clear the flags, which means it can
possibly clear other interrupts. There's a small chance that one event is
missed if it happens very close to another event.

Credits to @benpicco, @dylad for pointing out missing fixes.
2019-09-11 12:55:10 +02:00
benpicco
b6fe0e25fe
Merge pull request #10020 from gebart/pr/kinetis-lptmr-reload
kinetis: lptmr reload instead of spinning
2019-09-11 10:12:58 +02:00
benpicco
6f63ef42a7
Merge pull request #11920 from maribu/lpc2387
cpu/lpc2387: Cleanup
2019-09-11 10:12:26 +02:00
benpicco
410e6edf58
Merge pull request #11882 from maribu/arm7_buildsystem
cpu/arm7_common: Moved compiler flags here
2019-09-11 10:12:14 +02:00
benpicco
85798e831b
Merge pull request #11887 from maribu/arm7_thread_yield_higher
cpu/arm7_common: Fix thread_yield_higher in ISR
2019-09-11 10:11:57 +02:00
Marian Buschsieweke
7092566f1f
cpu/arm7_common: Moved compiler flags here
- Moved compiler & linker flags from boards/common/msba2 to cpu/arm7_common
- Moved dependency to newlib nano to cpu/arm7_common
- Moved config to link in cpu/startup.o to cpu/arm7_common
2019-09-11 01:02:41 +02:00
Juan I Carrano
c50d8fada1
Merge pull request #11646 from cladmi/pr/esp/programmer_update
esp*: updates to the programmer configuration
2019-09-10 17:58:20 +02:00
Marian Buschsieweke
b87ab96d17
Merge pull request #10661 from miri64/gnrc_netif_hdr/enh/netif_setter
gnrc_netif_hdr: add setter for netif
2019-09-10 16:14:28 +02:00
Juan I Carrano
abc25f0715
Merge pull request #11452 from maribu/atmega_irq
cpu/atmega_common: Bugfixes in irq_arch.c
2019-09-10 13:39:53 +02:00
Martine Lenders
50a3238ee0 esp-now: use gnrc_netif_hdr_set_netif() 2019-09-10 12:37:32 +02:00
benpicco
3aa8bc0d70
Merge pull request #12150 from jcarrano/compress-debuginfo
toolchain/cflags: enable dwarf compression (save 50% HDD)
2019-09-10 10:31:45 +02:00
3d8c4d52d1
Merge pull request #12100 from OTAkeys/pr/fix_uart_poweroff
cpu/stm32_common/uart: fix rare uart failure
2019-09-10 10:25:46 +02:00
88e07c06d2
Merge pull request #11367 from maribu/arm_early_stdio
cpu: Moved stdio_init() prior to periph_init() for ARM targets
2019-09-09 16:52:30 +03:00
d08d6a409c
Merge pull request #12181 from fjmolinas/pr_stm32f7_lsi
cpu/stm32_common: fix STM32F7 LSI_CLOCK definition
2019-09-09 14:47:57 +02:00
Francisco Molina
516e62688a cpu/stm32_common: fix STM32F7 CLOCK_LSI definition 2019-09-09 10:11:57 +02:00
Francisco
6d800ed85a
Merge pull request #11366 from maribu/early_stdio_atmega
cpu/atmega_common: Moved atmega_stdio_init() to cpu_init()
2019-09-09 10:22:53 +03:00
Marian Buschsieweke
df27dbef7a
cpu: Moved stdio_init() into cpu_init()
- Removed stdio_init() from newlib's _init(), as this is too late in the boot
  process to allow DEBUG()ing during periph_init()
- Added stdio_init() to the various cpu_init() routines of the ARM CPUs just
  before periph_init()
2019-09-06 16:54:23 +02:00
bcdec16b03
Merge pull request #12178 from bergzand/pr/nrfusb/check_rev
nrfusb: Check chip revision before enabling
2019-09-06 10:32:43 +02:00
a5c594ae5f
nrfusb: Check chip revision before enabling
Engineering sample A doesn't have a functional USB peripheral (errata
issue 94). This commit adds an assertion check for this revision to
prevent some developer headaches.
2019-09-06 10:00:32 +02:00
benpicco
999fffdc59
Merge pull request #11997 from gschorcht/cpu/esp32/esp_wifi/cleanups
cpu/esp32: esp_wifi improvements and cleanups
2019-09-05 13:51:10 +02:00
Gunar Schorcht
b3737715e5
Merge pull request #12170 from benpicco/esp32-fix_doc
cpu/esp32: fix documentation about toolchain installation
2019-09-05 12:58:32 +02:00
Gunar Schorcht
6d77529c83 cpu/esp32: cleaning up left overs in esp_wifi 2019-09-05 12:49:43 +02:00
Gunar Schorcht
3d5ef14650 cpu/esp32: local buffer in send of esp_wifi
Instead of having a send buffer as member `esp_wifi` netdev, a local variable is used now as send buffer. This avoids the need for a locking mechanism and reduces the risk of deadlocks.
2019-09-05 12:49:43 +02:00
Gunar Schorcht
74cbc410b7 cpu/esp32: ringbuffer introduced in esp_wifi
Receive call back function `_esp_wifi_rx_cb` is called from WiFi hardware driver with a pointer to a frame buffer that is allocated in the WiFi hardware driver. This frame buffer was freed immediately after copying its content to a single local receive buffer of the `esp_wifi` netdev. The local receive buffer remained occupied until the protocol stack had processed it. Further incoming packets were dropped.  However, very often a number of subsequent WiFi frames are received at the same time before the first one is processed completely. Having the single local receive buffer to hold only one received frame, led to a number of lost packets, even at low network load. Therefore, a ringbuffer of rx_buf elements was introduced which doesn't store the frames directly but only references to the frame buffers allocated in WiFi hardware driver. Since there is enough memory to hold several frames, the frames buffers allocated in WiFi hardware driver aren't freed immediatly any longer but are kept until the frame is processed by the protocol stack. This results in a much less loss rate of packets.
2019-09-05 12:49:02 +02:00
Gunar Schorcht
0e4ab63735 cpu/esp32: uniform debug output in esp_wifi 2019-09-05 12:49:02 +02:00
Gunar Schorcht
1ed09492a4 cpu/esp32: param checks replaced by asserts in esp_wifi 2019-09-05 12:49:02 +02:00
Gunar Schorcht
28ce17e64c cpu/esp32: event handling changed in esp_wifi
Events of different type can be pending at the same time. Therefore it is not possible to use ascending identifiers for the presence of a pending event. Rather, each event type has to be represented by one bit. Thes bits ORed identify all types of pending events. In the esp_wifi_isr function all pending events are then handled in one call. Otherwise, some events might be lost.
2019-09-05 12:49:02 +02:00
Gunar Schorcht
5cc990fb7c cpu/esp32: cleanup of includes in esp_wifi 2019-09-05 12:49:02 +02:00
benpicco
dbd97b7588
Merge pull request #11947 from gschorcht/cpu/esp32/freertos-critcial-sections
cpu/esp32: critcial section handling changed in FreeRTOS adaptation layer
2019-09-05 12:40:45 +02:00
Sebastian Meiling
c4dbdb7626
Merge pull request #12134 from gschorcht/cpu/esp/fix_i2c_ack_err_errno
cpu/esp*: fix of the error code for I2C address ACK errors
2019-09-05 12:23:24 +03:00
Gunar Schorcht
cb8b1b12c1 cpu/esp32: fix errno for I2C addr ack error
fixup! cpu/esp32: fix errno for I2C addr ack error
2019-09-05 10:35:02 +02:00
Gunar Schorcht
dfef2ce638 cpu/fe310: changes for common heap command 2019-09-05 09:20:55 +02:00
Gunar Schorcht
a9db53e04a cpu/msp430_common: changes for heap command 2019-09-05 09:20:55 +02:00
Gunar Schorcht
a63c0dda9c cpu/mips32r2_common: changes for heap command 2019-09-05 09:20:55 +02:00
Gunar Schorcht
4b009649c6 cpu/atmega_common: changes for common heap command 2019-09-05 09:20:55 +02:00
Gunar Schorcht
e9e6b7f31a cpu/esp32: changes for common heap command 2019-09-05 09:20:55 +02:00
Gunar Schorcht
056a223c33 cpu/esp8266: changes for common heap command 2019-09-05 09:20:55 +02:00
Benjamin Valentin
7fc7272394 cpu/esp32: fix documentation about toolchain installation
Checking out the submodules first and then the commit makes a mess.
Doing it the other way round results in a working toolchain.
2019-09-05 01:01:09 +02:00
Gaëtan Harter
422644bd3a
cpu/esp8266: update deprecated flash_size argument
Using flash size in megabits is deprecated by esptool.
Use the new megabyte notation.

    WARNING: Flash size arguments in megabits like '8m' are deprecated.
    Please use the equivalent size '1MB'.
    Megabit arguments may be removed in a future release.
    esptool.py v2.6
2019-09-04 15:07:37 +02:00
Gunar Schorcht
37ecb4fc5d cpu/esp8266: periph/uart FIFO resized to 1 byte
UART FIFO must contain only 1 byte when newlib's `printf` function is used. Otherwise, outputs that are still not sent over UART are lost when `printf` is called asynchronousely.
2019-09-04 14:58:59 +02:00
Gunar Schorcht
7fe1056aa7 cpu/esp8266: enable newlib with nano-formatted-io 2019-09-04 14:41:31 +02:00
Gunar Schorcht
646a173738 cpu/esp8266: fix unresolved symbols
To avoid unresolved symbols for unused functions during linking, compiler option `-ffunction-sections` is used now. Linker option `--warn-unresolved-symbols` is removed to get errors if required symbols cannot be resolved.
2019-09-04 14:41:31 +02:00
Gunar Schorcht
69a5cc753d cpu/esp8266: use always newlib stdio functions
The modules `newlib, `newlib_syscalls_default` and `stdio_uart` are now used by default for output to the UART interface. This also reduces the dependency rules.
2019-09-04 14:41:31 +02:00
Gunar Schorcht
ae8afaf42e cpu/esp8266: remove overridden stdio functions
The overridden stdio functions `puts`, `putchar` and `printf` were removed. Instead, the corresponding newlib functions are always used. Using the newlib functions fixes output conflicts when using `f *` functions like `fprintf`,` fputs`, ... with `stdout` as the file parameter.
2019-09-04 14:41:31 +02:00
Gunar Schorcht
98dfdef276
Merge pull request #12135 from benpicco/libb2-fix
pkg/libb2: rename config.h to avoid conflicts in the global namespace, set HAVE_ALIGNED_ACCESS_REQUIRED based on CPU (fixes build on esp8266)
2019-09-04 14:39:07 +02:00
Benjamin Valentin
7047a200af cpu/native: advertise support for unaligned memory access
On Linux, even if the architecture does not support it, the kernel will
catch the fault and emulate the unaligned accesss.
2019-09-04 14:15:52 +02:00
benpicco
1ffe2e5e30
Merge pull request #11512 from skullbox305/cpu-nrf5x
cpu/nrf52: i2c bugfix
2019-09-03 18:43:38 +02:00
Juan Carrano
63c475cd4d toolchain/cflags: enable dwarf compression.
Use the -gz option to compress ELF sections containing DWARF information.
This saves around 50% of disk space, without any side effects.

See https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Debugging-Options.html#Debugging-Options
for more infomation on this option.

Some platforms have an outdated toolchain that does not support -gz so
the flag is blacklisted there. Even then, the results are quite impressive.

I used @cladmi's `buildtest` branch (https://github.com/cladmi/RIOT/tree/wip/du/buildtest)
with this change and compiled the `examples/default` application:

```
$ BUILD_IN_DOCKER=1 DOCKER="sudo docker" make -C examples/default buildtest-indocker
```

The size was obtained with:

```
$ find output -name "*.bin.bindirsize" -type f -exec tail  -n1 '{}' \; | cut -f 1 | awk '{s+=$1} END {printf "%.0f", s}'
```

Results:

- Vanilla: 10328112 KB (~10GB).
- with -gz: 4982788 KB (~5GB).

This was inspired by #8496.
2019-09-02 14:43:26 +02:00
Gunar Schorcht
8c8306e1ca cpu/esp8266: fix errno for I2C addr ack error 2019-08-31 12:09:09 +02:00
benpicco
2101458900
Merge pull request #11911 from maribu/arm7_common-irq
cpu/arm7_common: Cleaned up IRQ code
2019-08-30 19:17:09 +02:00
Toon Stegen
95b61a1970 cpu/stm32_common/uart: fix typos in rts/cts pins 2019-08-30 14:17:14 +02:00
Gaëtan Harter
e4331e8391
cpu/arch: blacklist incompatible CFLAGS
Blacklist incompatible CFLAGS that are currently "optionally" included
in 'cflags.inc.mk'.

This prepares for the migration to 'OPTIONAL_CFLAGS'.
2019-08-29 17:43:54 +02:00
Benjamin Valentin
ba8dfc8341 cpu/sam0_common/gpio: don't hard-code number of ports
_exti() always assumes only 2 ports, so it will always fail when using
e.g. port C or port D on same54.

Instead, determine the number of ports from the dimensions of the exti_config
array.
2019-08-29 15:27:42 +02:00
Martine Lenders
92a8e5d0ee
nrfmin_gnrc: use gnrc_netif_hdr_set_netif() 2019-08-29 14:51:44 +02:00
Kevin "Tristate Tom" Weiss
969e3b3e95
Merge pull request #12098 from cladmi/pr/export/remove_local_export_compilation_variables
make: do not locally export compilation variables
2019-08-29 14:32:22 +02:00
Martine Lenders
b83c7dd61d
Merge pull request #11927 from maribu/arduino-leonardo
cpu/atmega32u4: Fixed external interrupts; boards/arduino-leonardo: Fixed dependency tracking
2019-08-29 12:12:56 +02:00
Gaëtan Harter
1be5b7b10b
cpu: do not locally export compilation variables
These are already exported by `makefiles/vars.inc.mk`.
It is a prerequisite to allow handling compilation without global exports.
2019-08-29 10:35:53 +02:00
Sören Tempel
0e724e3d5d cpu/fe310: don't call thread_yield when sched_active_thread is invalid
As the comment above cpu_switch_context_exit notes:

	sched_active_thread is not valid when cpu_switch_context_exit() is called.

Unfortunately, thread_yield(), which is called directly by
cpu_switch_context_exit(), uses sched_active_thread possibly resulting
in a null pointer dereference.

Solution: Trigger a software interrupt to perform a context switch and
let sched_run() determine the next valid thread from there.
2019-08-28 18:09:05 +02:00
Toon Stegen
3f74a8a7b4 cpu/stm32_common/uart: init rts at right time
once hardware flow control is enabled, rts should only be initialized
after the uart is enabled by setting the UE flag. This is stated in the
stm32f4 errata.
2019-08-27 19:15:47 +02:00
Toon Stegen
ac1d1ffda2 cpu/stm32_common: enable/disable uart peripheral
in uart_poweroff the peripheral should be disabled through the register
instead of just disabling the peripheral clock. In uart_poweron the
peripheral should be enabled after enabling the clock.

Not explicitely disabling the peripheral causes some bad signals on the
uart line sometimes.
2019-08-27 19:09:36 +02:00
Gaëtan Harter
3010d1cef4
cpu/arm7_common: remove deprecated CFLAGS_BASIC
Nothing declares this anymore
2019-08-27 17:06:52 +02:00
Marian Buschsieweke
1a51b01db9
cpu/cc2538/periph/i2c: Made cppcheck happy 2019-08-27 13:59:23 +02:00
Juan I Carrano
5ece3dc323
Merge pull request #12050 from gschorcht/cpu/esp32/fix_ctor_initialization
cpu/esp32: fix of global ctor initialization
2019-08-27 11:38:00 +02:00
Gunar Schorcht
7b160a7dd3 cpu/esp32: workaround for static object init 2019-08-27 09:41:41 +02:00
Marian Buschsieweke
dd56b3bb71
cpu/sam0_common: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Marian Buschsieweke
b604934189
cpu/stm32_common: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Marian Buschsieweke
0863410c09
cpu/nrf52: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Marian Buschsieweke
01f77433a8
cpu/nrf51: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Marian Buschsieweke
a4810f3276
cpu/esp32: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Marian Buschsieweke
cc0fb9836e
cpu/cc26x0: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Marian Buschsieweke
530cf801fe
cpu/esp8266: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Marian Buschsieweke
6b7d27ece9
cpu/kinetis: Updated i2c_release() 2019-08-22 12:03:08 +02:00
Marian Buschsieweke
6917934946
cpu/cc2538: Updated i2c_release() 2019-08-22 12:03:07 +02:00
Marian Buschsieweke
450b251823
cpu/efm32: Updated i2c_release() 2019-08-22 12:03:07 +02:00
Marian Buschsieweke
454d25ae68
cpu/atmega_common: Updated i2c_release() 2019-08-22 12:03:07 +02:00
Gunar Schorcht
328813ce12 cpu/esp32: fix of ctor and newlib initialization
Module `newlib` is now used by default. Therefore, the separation of initialization of ctors and the newlibc is not needed any longer. Instead of calling `do_global_ctors` and `_init` separately, `__libc_init_array` is called. Explicit function `do_global_ctors` is removed.
2019-08-21 16:31:06 +02:00
Gunar Schorcht
5fc015e31b cpu/esp32: fix periph_flash param checks for mtd 2019-08-21 01:16:47 +02:00
Peter Kietzmann
f0272ed262
Merge pull request #12005 from haukepetersen/fix_nrfmin_doc
cpu/nrf5x: fix bitrate doc for nrfmin driver
2019-08-20 08:31:29 +02:00
Gunar Schorcht
c6d33cf5de cpu/esp32: erase improvement for periph_flash
Performance of erasing the whole flash is drastically improved by erasing blocks of 64 kbyte, if possible, instead of erasing sectors of 4 kByte.
2019-08-20 01:56:38 +02:00
Gunar Schorcht
1c60e175ca cpu/esp32: fix periph_flash timing problems
While deleting multiple sectors in flash, interrupts were disabled over the whole time. Thus, deleting the entire flash led to the triggering of the watchdog timer and thus to a restart. Therefore, the interrupts and the cache are disabled only for the time of deleting a single sector. The same problem occurred for read and write large data sets.
2019-08-20 01:51:05 +02:00
Gunar Schorcht
bf331bd54b cpu/esp32: use printf/puts from newlib
Initializing the stdio file descriptors in global reent structure with newlib fake stdio file descriptors led to the problem that newlib stdio functions printf and puts were not working since they can't operate on these fake stdio file descriptors. Therefore, this initialization was removed. Now, the real stdio file descriptors as created automatically by newlib are used. Specific functions `printf`, `puts`, `getchar`and `putchar` are not required any longer and are removed now.
2019-08-19 15:14:32 +02:00
Gunar Schorcht
87cd181f56 cpu/esp32: use always newlib_syscalls_default
Modules newlib and newlib_syscalls_default are now used by default. Conditional compilations for MODULE_NEWLIB_SYSCALLS_DEFAULT as well as alternative code are removed completely.
2019-08-19 15:13:53 +02:00
Gunar Schorcht
6a378f71a0 cpu/esp32: fixes printf and puts
printf and puts used ets_printf before. Unfortunately, ets_printf adds an additional \r for each \n which is not consistent with other RIOT platforms. As a result some automatic tests failed. Therefore, both functions write now character-wise directly to the UART interface.
2019-08-17 11:34:20 +02:00
MrKevinWeiss
b0c05431f7 cpu/stm32: Fix 16 bit reg endianess for i2c_1
Since i2c_1 i2c_write_regs is cpu specific reg endianess must be swapped there
Change reg from little endian to big endian
2019-08-16 15:04:13 +02:00
MrKevinWeiss
fb38cf37fd cpu/stm32: Fix read bytes flag for i2c_2
This commit stops a repeated start read which causes slave bus lockup
When trying to do a repeaded start i2c_read_bytes it returns -EOPNOTSUPP error
2019-08-14 16:32:28 +02:00
Hauke Petersen
cc5f2cae20 cpu/nrf5x: fix bitrate doc for nrfmin driver 2019-08-14 11:15:08 +02:00
Gunar Schorcht
f52162bcb0 cpu/atmega_common: wrappers to avoid preemtion
Memory management function like `malloc`, `calloc`, `realloc` and `free` must not be preempted when they operate on allocator structures. To avoid such a preemption, wrappers around these functions are used which simply disable all interrupts for the time of their execution.
2019-08-12 23:22:23 +02:00
Gunar Schorcht
8c5de9b714 cpu/esp32: module riot_freertos is always required 2019-08-12 16:51:50 +02:00
Gunar Schorcht
d2de4858e2 cpu/esp32: compile riot_freertos only if required 2019-08-12 16:51:50 +02:00
Gunar Schorcht
1b041083ab cpu/esp32: change of critical section handling in freertos
Using a mutex for critical section handling with portENTER_CRITICAL and portEXIT_CRITICAL does not work for RIOT, as this function can also be called in the interrupt context. Therefore, the given mutex is not used. Instead, the basic default FreeRTOS mechanism for critical sections is used by simply disabling interrupts. Since context switches for the ESP32 are also based on interrupts, there is no possibility that another thread will enter the critical section once the interrupts are disabled.
2019-08-12 16:51:50 +02:00
Gunar Schorcht
26b71a3f14 cpu/esp32: removes additional spaces in freertos 2019-08-12 16:51:50 +02:00
fabian18
2c001f5a6c drivers/include/periph/eeprom: Changed uint8_t* to void* in API 2019-08-09 17:27:32 +02:00
Juan I Carrano
e806d4bcbd
Merge pull request #11985 from fjmolinas/pr_k64f_hwrng
cpu/kinetis: enable HWRNG for k64f
2019-08-09 16:45:52 +02:00
Francisco Molina
0ce2081817 cpu/kinetis: re-enable HWRNG for k64f
- Fix SCGx used for RNGA since RNGA is not mapped
  to SCG3 for K64F.
2019-08-09 15:47:13 +02:00
9cf8da0287
Merge pull request #11899 from fjmolinas/pr_stm32f7_riotboot_requirements
cpu/stm32f7: add riotboot requirements
2019-08-09 15:36:50 +02:00
6f14de38c5
Merge pull request #11900 from fjmolinas/pr_stm32f2_riotboot_requirements
cpu/stm32f2: add riotboot requirements
2019-08-09 11:06:49 +02:00
1f5761ccfa
cpu/stm32l4: add support for stm32l496ag 2019-08-08 22:20:22 +02:00
2ef1a86722
cpu/stm32l4: add missing PORT_I enum 2019-08-08 22:20:21 +02:00
Martine Lenders
3bfa03dcc9
Merge pull request #11981 from aabadie/pr/cpu/atmega_common_array_size
cpu/atmega_common/gpio: use ARRAY_SIZE macro
2019-08-08 19:13:05 +02:00
f802bbb5ae
Merge pull request #11682 from fjmolinas/pr_stm32f4_riotboot
cpu/stm32f4: add riotboot requirements
2019-08-08 18:05:36 +02:00
3e519e164b
cpu/atmega_common/gpio: use ARRAY_SIZE macro 2019-08-08 17:52:51 +02:00
Francisco Molina
dc958b3b38 stm32f7/Makefile.include: add riotboot requirements
- stm32f7 use sectors instead of pages, they go either from 16KB to
  128KB, or from 32KB to 25KB. Smaller sectors are at the begining of
  the flash. Slots must start at the begining of a sector to not overlap.
- Minimum required RIOBOOT_HDR_LEN or stm32f7 is 0x200
  to respect vector table alignment
- Add CPU_FLASH_BASE
2019-08-07 18:37:07 +02:00
Francisco Molina
f5b8355140 stm32f2/Makefile.include: add riotboot requirements
- stm32f2 uses sectors instead of pages, they go from 16KB to
  128KB. Smaller sectors are at the begining of the flash. Slots
  must start at the begining of a sector to not overlap.
- Minimum required RIOBOOT_HDR_LEN or stm32f2 is 0x200
  to respect vector table alignment
2019-08-07 18:34:48 +02:00
fjmolinas
c67dfd9918 stm32f4/Makefile.include: add riotboot requirements
- Stm32f4 use sectors instead of pages. They go from 16 KB to 128KB.
  The bootloader will use the first sector(16Kb). Slots must start
  at the begining of a sector to not overlap.
- Minimum required RIOBOOT_HDR_LEN or stm32f4 is 0x200
  to respect vector table alignment
2019-08-07 18:29:51 +02:00
Peter Kietzmann
1e7a468ecb
Merge pull request #11972 from dylad/pr/saml1x/fix_adc
cpu/saml1x: fix adc resolution issue
2019-08-07 14:06:40 +02:00
a6685b0b48
Merge pull request #11956 from fjmolinas/pr_nrf5x_flashpage_raw
cpu/nrf5x_common: add flashpage_raw_support
2019-08-07 09:23:57 +02:00
Martine Lenders
1dc6bded04
Merge pull request #11946 from gschorcht/cpu/esp32/lwip_netdev
cpu/esp32: lwIP netdev
2019-08-07 08:10:03 +02:00
Benjamin Valentin
b8c4ab5b69 cpu: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +02:00
Benjamin Valentin
8af04cd939 boards: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +02:00
Gunar Schorcht
73552b2c11 cpu/esp32: _esp_wifi_dev exposed for lwIP
To be able to access the single esp_wifi network device from lwIP adaptation layer, static keyword was removed from esp_wifi_dev variable.
2019-08-06 19:12:29 +02:00
Gunar Schorcht
33a6f42fa5 cpu/esp32: lwIP Ethernet address option length
The option value length of Ethernet addresses can be more than 6 byte in lwIP. Therefore, the max_len parameter is check to be greater than or equal to ETHERNET_ADDR_LEN.
2019-08-06 19:12:29 +02:00
MichelRottleuthner
900fdcf783
Merge pull request #11971 from gschorcht/cpu/esp32/make/fix-conditional-linker-options
cpu/esp32: fix of conditional linker options for esp_idf_heap
2019-08-06 19:11:10 +02:00
dylad
f92eb109e7 cpu/saml1x: fix adc resolution issue 2019-08-06 19:08:39 +02:00
Gunar Schorcht
b2b17c5912 cpu/esp32: fix conditional linker options for esp_idf_heap
Module esp_idf_heap is enabled in cpu/esp32/Makefile.dep depending on other modules. Since cpu/esp32/Makefile.dep is read after cpu/esp32/Makefile.include, the conditional  definition of the linker options for the wrapper functions had to be moved from cpu/esp32/Makefile.include to cpu/esp32/Makefile.dep.
2019-08-06 18:17:59 +02:00
653c23ea31
Merge pull request #11963 from fjmolinas/pr_efm32_flashpage_raw
cpu/efm32: add flashpage_raw
2019-08-06 16:29:15 +02:00
MichelRottleuthner
8589382899
Merge pull request #11967 from gschorcht/cpu/esp32/make/fix-undefined-symbols
cpu/esp32: cleanup to fix undefined symbols
2019-08-06 15:36:58 +02:00
Gunar Schorcht
e4198542d1 cpu/esp32: fix multiple definitions with esp_idf_heap
If module esp_idf_heap is used, the memory management functions _malloc_r, _realloc_r, _calloc_r and _free_r have to be overridden by wrapper functions to use the heap_* functions of module _esp_idf_heap. However, this can lead to multiple symbol errors for these functions for some applications. To solve this symbol conflict, _malloc_r, _realloc_r, _calloc_r and _free_r functions are renamed to __wrap_* and the linker options are extended by -Wl,-wrap option when module esp_idf_heap is used.
2019-08-06 14:21:17 +02:00
Martine Lenders
d13d49d11f
Merge pull request #11814 from aabadie/pr/doc/remove_duplicate_group_define
doc: remove duplicate definitions of Doxygen groups
2019-08-06 09:50:59 +02:00