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

43883 Commits

Author SHA1 Message Date
Gerson Fernando Budke
93aa10cc5c cpu/avr8_common: Rework avr8_state variable
The avr8_state variable uses bit operation to set/clear the state. This
rework avr8_state to use increment/decrement instead. It introduce the
use of General Purpose IO Register 1 (GPIOR1) when available.

This is a preparation for future scheduling and irq optimizations.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-07-05 19:01:14 +02:00
Gerson Fernando Budke
b7873015aa cpu/avr8_common: Split avr8_state
The avr8_state store state information used to determine scheduling
and uart irq. This move all uart irq states to avr8_state_uart
variable. It introduce the use of General Purpose IO Register 0
(GPIOR0) when available and now all uarts from xmega can be used.

This is a preparation for future scheduling and irq optimizations.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-07-05 19:01:13 +02:00
bors[bot]
3ec62a291a
Merge #19797
19797: Makefile.include: don't use target lstfile implicitly r=maribu a=gschorcht

### Contribution description

This PR reverts a part of PR #19745. It removes the `$(LSTFILE)` from the `BUILD_FILES` variable so that the `.lst` file isn't generated implicitly. If the `.lst` file is needed, it can be generated with `lstfile` target.

**Background**

The compilation time increased a lot with PR #19745. The reason is that the generation of the `.lst` file seems to be time-consuming. For example, on an Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz` with 8 cores and a SSD, it takes about 15 seconds for a complex application such as `tests/sys/usbus_msc` for a STM32F7 MCU.

Therefore, the compilation time for
```
BOARD=stm32f723e-disco make -j8 -C tests/sys/usbus_msc
```
increased from about 1 sec to about 16 seconds (all source files were already compiled).

Even for a small application
```
BOARD=stm32f723e-disco make -j8 -C tests/sys/shell
```
the compilation time increased from about 1 sec to about 10 seconds.

### Testing procedure

Green CI

### Issues/PRs references



Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-05 11:01:33 +00:00
Gunar Schorcht
1d96feb66e Makefile.include: don't use target lstfile implicitly 2023-07-05 11:27:28 +02:00
bors[bot]
9d596734a1
Merge #19752
19752: cpu/atmega_common: checking features instead of CPU models r=benpicco a=hugueslarrive

### Contribution description
Splitted from:
- #19740

### Testing procedure
Tested on atmega8 with:
- #19755

This one probably need to be tested on others cpu.
### Tests on 1284p:
#### tests/periph/adc
```
tests/periph/adc$ BOARD=atmega1284p make -j64 clean all | grep '^  ' && BOARD=atmega1284p AVRDUDE_PROGRAMMER='usbasp -F' make flash 2>&1 | grep -- 'of flash' && BOARD=atmega1284p PORT=/dev/ttyACM0 make term
   text	   data	    bss	    dec	    hex	filename
  10712	    304	   1021	  12037	   2f05	/home/hugues/github/cpu_atmega_common/RIOT/tests/periph/adc/bin/atmega1284p/tests_adc.elf
avrdude: 11016 bytes of flash written
avrdude: 11016 bytes of flash verified
/home/hugues/github/cpu_atmega_common/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "9600"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-06-22 18:44:54,846 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-06-22 18:44:55,848 # 

2023-06-22 18:44:55,848 # main(): This is RIOT! (Version: 2020.07-devel-15351-gc5f75c-cpu/atmega_common)
2023-06-22 18:44:55,848 # 
2023-06-22 18:44:55,849 # RIOT ADC peripheral driver test
2023-06-22 18:44:55,849 # 
2023-06-22 18:44:55,850 # This test will sample all available ADC lines once every 100ms with
2023-06-22 18:44:55,850 # a 10-bit resolution and print the sampled results to STDIO
2023-06-22 18:44:55,850 # 
2023-06-22 18:44:55,850 # 
2023-06-22 18:44:55,851 # Successfully initialized ADC_LINE(0)
2023-06-22 18:44:55,851 # Successfully initialized ADC_LINE(1)
2023-06-22 18:44:55,851 # Successfully initialized ADC_LINE(2)
2023-06-22 18:44:55,852 # Successfully initialized ADC_LINE(3)
2023-06-22 18:44:55,852 # Successfully initialized ADC_LINE(4)
2023-06-22 18:44:55,852 # Successfully initialized ADC_LINE(5)
2023-06-22 18:44:55,853 # Successfully initialized ADC_LINE(6)
2023-06-22 18:44:55,853 # Successfully initialized ADC_LINE(7)
2023-06-22 18:44:55,853 # ADC_LINE(0): 796
2023-06-22 18:44:55,854 # ADC_LINE(1): 599
2023-06-22 18:44:55,854 # ADC_LINE(2): 522
2023-06-22 18:44:55,854 # ADC_LINE(3): 485
2023-06-22 18:44:55,854 # ADC_LINE(4): 466
2023-06-22 18:44:55,854 # ADC_LINE(5): 466
2023-06-22 18:44:55,854 # ADC_LINE(6): 478
2023-06-22 18:44:55,855 # ADC_LINE(7): 501
2023-06-22 18:44:55,855 #  Exiting Pyterm
make: *** [/home/hugues/github/cpu_atmega_common/RIOT/tests/periph/adc/../../../Makefile.include:879: term] Interrompre
```
#### tests/periph/gpio
```
tests/periph/gpio$ BOARD=atmega1284p make -j64 clean all | grep '^  ' && BOARD=atmega1284p AVRDUDE_PROGRAMMER='usbasp -F' make flash 2>&1 | grep -- 'of flash' && BOARD=atmega1284p PORT=/dev/ttyACM0 make term
   text	   data	    bss	    dec	    hex	filename
  17828	   2112	   1095	  21035	   522b	/home/hugues/github/cpu_atmega_common/RIOT/tests/periph/gpio/bin/atmega1284p/tests_gpio.elf
avrdude: 19940 bytes of flash written
avrdude: 19940 bytes of flash verified
/home/hugues/github/cpu_atmega_common/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "9600"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-06-22 18:46:50,726 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-06-22 18:46:51,734 # This is RIOT! (Version: 2020.07-devel-15351-gc5f75c-cpu/atmega_common)
2023-06-22 18:46:51,734 # GPIO peripheral driver test
2023-06-22 18:46:51,734 # 
2023-06-22 18:46:51,735 # In this test, pins are specified by integer port and pin numbers.
2023-06-22 18:46:51,735 # So if your platform has a pin PA01, it will be port=0 and pin=1,
2023-06-22 18:46:51,736 # PC14 would be port=2 and pin=14 etc.
2023-06-22 18:46:51,736 # 
2023-06-22 18:46:51,736 # NOTE: make sure the values you use exist on your platform! The
2023-06-22 18:46:51,738 #       behavior for not existing ports/pins is not defined!
init_out 1 5
2023-06-22 18:47:50,380 # init_out 1 5
toggle 1 5
2023-06-22 18:48:09,425 # toggle 1 5
> toggle 1 5
2023-06-22 18:48:12,477 # toggle 1 5
> 2023-06-22 18:48:15,013 # Exiting Pyterm
```
#### tests/periph/i2c
```
tests/periph/i2c$ BOARD=atmega1284p make -j64 clean all | grep '^  ' && BOARD=atmega1284p AVRDUDE_PROGRAMMER='usbasp -F' make flash 2>&1 | grep -- 'of flash' && BOARD=atmega1284p PORT=/dev/ttyACM0 make term
   text	   data	    bss	    dec	    hex	filename
  18634	   1288	   1215	  21137	   5291	/home/hugues/github/cpu_atmega_common/RIOT/tests/periph/i2c/bin/atmega1284p/tests_i2c.elf
avrdude: 19922 bytes of flash written
avrdude: 19922 bytes of flash verified
/home/hugues/github/cpu_atmega_common/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "9600"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-06-22 18:50:37,434 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-06-22 18:50:38,437 # 
2023-06-22 18:50:38,438 # main(): This is RIOT! (Version: 2020.07-devel-15351-gc5f75c-cpu/atmega_common)
2023-06-22 18:50:38,438 # Start: Test for the low-level I2C driver
> i2c_scan 0
2023-06-22 18:51:37,661 # i2c_scan 0
2023-06-22 18:51:37,687 # Scanning I2C device 0...
2023-06-22 18:51:37,765 # addr not ack'ed = "-", addr ack'ed = "X", addr reserved = "R", error = "E"
2023-06-22 18:51:37,804 #      0 1 2 3 4 5 6 7 8 9 a b c d e f
2023-06-22 18:51:37,842 # 0x00 R R R R R R R R R R R R R R - -
2023-06-22 18:51:37,881 # 0x10 - - - - - - - - - - - - - - - -
2023-06-22 18:51:37,919 # 0x20 - - - - - - - - - - - - - - - -
2023-06-22 18:51:37,958 # 0x30 - - - - - - - - - - - - - - - -
2023-06-22 18:51:37,996 # 0x40 - - - - - - - - - - - - - - - -
2023-06-22 18:51:38,035 # 0x50 - - - - - - - - - - - - - - - -
2023-06-22 18:51:38,073 # 0x60 - - - - - - - - - - - - - - - -
2023-06-22 18:51:38,112 # 0x70 - - - - - - - - R R R R R R R R
> 2023-06-22 18:52:54,462 # Exiting Pyterm
```
#### tests/periph/pwm
```
tests/periph/pwm$ BOARD=atmega1284p make -j64 clean all | grep '^  ' && BOARD=atmega1284p AVRDUDE_PROGRAMMER='usbasp -F' make flash 2>&1 | grep -- 'of flash' && BOARD=atmega1284p PORT=/dev/ttyACM0 make term
   text	   data	    bss	    dec	    hex	filename
  15382	    896	   1093	  17371	   43db	/home/hugues/github/cpu_atmega_common/RIOT/tests/periph/pwm/bin/atmega1284p/tests_pwm.elf
avrdude: 16278 bytes of flash written
avrdude: 16278 bytes of flash verified
/home/hugues/github/cpu_atmega_common/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "9600"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-06-22 18:54:32,308 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-06-22 18:54:33,310 # 
2023-06-22 18:54:33,312 # main(): This is RIOT! (Version: 2020.07-devel-15351-gc5f75c-cpu/atmega_common)
2023-06-22 18:54:33,312 # PWM peripheral driver test
2023-06-22 18:54:33,313 # 
> osci
2023-06-22 18:54:39,105 # osci
2023-06-22 18:54:39,106 # 
2023-06-22 18:54:39,121 # RIOT PWM test
2023-06-22 18:54:39,177 # Connect an LED or scope to PWM pins to see something.
2023-06-22 18:54:39,178 # 
2023-06-22 18:54:39,216 # Available PWM device between 0 and 1
2023-06-22 18:54:39,244 # Initialized PWM_0 @ 488Hz.
2023-06-22 18:54:39,273 # Initialized PWM_1 @ 976Hz.
2023-06-22 18:54:39,274 # 
2023-06-22 18:54:39,313 # Letting the PWM pins oscillate now...
2023-06-22 18:54:45,655 # Exiting Pyterm
```
#### tests/periph/spi
```
tests/periph/spi$ BOARD=atmega1284p make -j64 clean all | grep '^  ' && BOARD=atmega1284p AVRDUDE_PROGRAMMER='usbasp -F' make flash 2>&1 | grep -- 'of flash' && BOARD=atmega1284p PORT=/dev/ttyACM0 make term
   text	   data	    bss	    dec	    hex	filename
  19240	   1402	   2317	  22959	   59af	/home/hugues/github/cpu_atmega_common/RIOT/tests/periph/spi/bin/atmega1284p/tests_spi.elf
avrdude: 20642 bytes of flash written
avrdude: 20642 bytes of flash verified
/home/hugues/github/cpu_atmega_common/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "9600"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-06-22 18:58:12,394 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-06-22 18:58:13,396 # 
2023-06-22 18:58:13,398 # main(): This is RIOT! (Version: 2020.07-devel-15351-gc5f75c-cpu/atmega_common)
2023-06-22 18:58:13,398 # Manual SPI peripheral driver test (see README.md)
2023-06-22 18:58:13,399 # There are 1 SPI devices configured for your platform.
init 0 0 4
2023-06-22 18:58:32,086 # init 0 0 4
2023-06-22 18:58:32,161 # Trying to initialize SPI_DEV(0): mode: 0, clk: 4, cs_port: 0, cs_pin: 0
2023-06-22 18:58:32,270 # (if below the program crashes with a failed assertion, then it means the configuration is not supported)
2023-06-22 18:58:32,280 # Success.
bench
2023-06-22 18:58:41,590 # bench
2023-06-22 18:58:41,644 # ### Running some benchmarks, all values in [us] ###
2023-06-22 18:58:41,682 # ### Test				Transfer time	user time
2023-06-22 18:58:41,683 # 
2023-06-22 18:58:41,755 #  1 - write 1000 times 1 byte:			28456	28640
2023-06-22 18:58:41,827 #  2 - write 1000 times 2 byte:			28184	28352
2023-06-22 18:58:42,454 #  3 - write 1000 times 100 byte:		579528	579704
2023-06-22 18:58:42,563 #  4 - write 1000 times 1 byte to register:	54080	54256
2023-06-22 18:58:42,674 #  5 - write 1000 times 2 byte to register:	56720	56888
2023-06-22 18:58:43,340 #  6 - write 1000 times 100 byte to register:	608152	608320
2023-06-22 18:58:43,412 #  7 - read 1000 times 2 byte:			28304	28480
2023-06-22 18:58:44,025 #  8 - read 1000 times 100 byte:		567408	567576
2023-06-22 18:58:44,138 #  9 - read 1000 times 2 byte from register:	56840	57016
2023-06-22 18:58:44,793 # 10 - read 1000 times 100 byte from register:	596024	596200
2023-06-22 18:58:44,868 # 11 - transfer 1000 times 2 byte:		28336	28512
2023-06-22 18:58:45,510 # 12 - transfer 1000 times 100 byte:		592128	592304
2023-06-22 18:58:45,625 # 13 - transfer 1000 times 2 byte to register:	56960	57136
2023-06-22 18:58:46,306 # 14 - transfer 1000 times 100 byte to register:620744	620920
2023-06-22 18:58:46,373 # 15 - acquire/release 1000 times:		20960	21136
2023-06-22 18:58:46,879 # -- - SUM:					3922824	3925440
2023-06-22 18:58:46,880 # 
2023-06-22 18:58:46,907 # ### All runs complete ###
> 2023-06-22 18:58:54,706 # Exiting Pyterm
```
I always wonder how fast it really goes:
- #16727
- #18374
#### tests/periph/timer
```
tests/periph/timer$ BOARD=atmega1284p make -j64 clean all | grep '^  ' && BOARD=atmega1284p AVRDUDE_PROGRAMMER='usbasp -F' make flash 2>&1 | grep -- 'of flash' && BOARD=atmega1284p PORT=/dev/ttyACM0 make term
   text	   data	    bss	    dec	    hex	filename
   8968	    274	   1032	  10274	   2822	/home/hugues/github/cpu_atmega_common/RIOT/tests/periph/timer/bin/atmega1284p/tests_timer.elf
avrdude: 9242 bytes of flash written
avrdude: 9242 bytes of flash verified
/home/hugues/github/cpu_atmega_common/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "9600"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-06-22 19:00:15,136 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-06-22 19:00:16,138 # 
2023-06-22 19:00:16,139 # Help: Press s to start test, r to print it is ready
s
2023-06-22 19:00:31,118 # START
2023-06-22 19:00:31,200 # main(): This is RIOT! (Version: 2020.07-devel-15351-gc5f75c-cpu/atmega_common)
2023-06-22 19:00:31,201 # 
2023-06-22 19:00:31,230 # Test for peripheral TIMERs
2023-06-22 19:00:31,231 # 
2023-06-22 19:00:31,251 # Available timers: 2
2023-06-22 19:00:31,252 # 
2023-06-22 19:00:31,270 # Testing TIMER_0:
2023-06-22 19:00:31,306 # TIMER_0: initialization successful
2023-06-22 19:00:31,324 # TIMER_0: stopped
2023-06-22 19:00:31,356 # TIMER_0: set channel 0 to 5000
2023-06-22 19:00:31,390 # TIMER_0: set channel 1 to 10000
2023-06-22 19:00:31,408 # TIMER_0: starting
2023-06-22 19:00:31,482 # TIMER_0: channel 0 fired at SW count     1247 - init:     1247
2023-06-22 19:00:31,547 # TIMER_0: channel 1 fired at SW count     2488 - diff:     1241
2023-06-22 19:00:31,551 # 
2023-06-22 19:00:31,568 # Testing TIMER_1:
2023-06-22 19:00:31,605 # TIMER_1: initialization successful
2023-06-22 19:00:31,622 # TIMER_1: stopped
2023-06-22 19:00:31,655 # TIMER_1: set channel 0 to 5000
2023-06-22 19:00:31,688 # TIMER_1: set channel 1 to 10000
2023-06-22 19:00:31,707 # TIMER_1: starting
2023-06-22 19:00:31,780 # TIMER_1: channel 0 fired at SW count     1247 - init:     1247
2023-06-22 19:00:31,846 # TIMER_1: channel 1 fired at SW count     2488 - diff:     1241
2023-06-22 19:00:31,849 # 
2023-06-22 19:00:31,864 # TEST SUCCEEDED
2023-06-22 19:00:31,939 # { "threads": [{ "name": "idle", "stack_size": 128, "stack_used": 86 }]}
2023-06-22 19:00:32,015 # { "threads": [{ "name": "main", "stack_size": 640, "stack_used": 120 }]}
2023-06-22 19:00:34,259 # Exiting Pyterm
```
#### tests/periph/uart
```
tests/periph/uart$ BOARD=atmega1284p make -j64 clean all | grep '^  ' && BOARD=atmega1284p AVRDUDE_PROGRAMMER='usbasp -F' make flash 2>&1 | grep -- 'of flash' && BOARD=atmega1284p PORT=/dev/ttyACM0 make term
   text	   data	    bss	    dec	    hex	filename
  15918	   1044	   2000	  18962	   4a12	/home/hugues/github/cpu_atmega_common/RIOT/tests/periph/uart/bin/atmega1284p/tests_uart.elf
avrdude: 16962 bytes of flash written
avrdude: 16962 bytes of flash verified
/home/hugues/github/cpu_atmega_common/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "9600"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2023-06-22 19:01:25,894 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2023-06-22 19:01:26,896 # 
2023-06-22 19:01:26,898 # main(): This is RIOT! (Version: 2020.07-devel-15351-gc5f75c-cpu/atmega_common)
2023-06-22 19:01:26,898 # 
2023-06-22 19:01:26,899 # Manual UART driver test application
2023-06-22 19:01:26,899 # ===================================
2023-06-22 19:01:26,900 # This application is intended for testing additional UART
2023-06-22 19:01:26,900 # interfaces, that might be defined for a board. The 'primary' UART
2023-06-22 19:01:26,901 # interface is tested implicitly, as it is running the shell...
2023-06-22 19:01:26,901 # 
2023-06-22 19:01:26,902 # When receiving data on one of the additional UART interfaces, this
2023-06-22 19:01:26,902 # data will be outputted via STDIO. So the easiest way to test an 
2023-06-22 19:01:26,903 # UART interface, is to simply connect the RX with the TX pin. Then 
2023-06-22 19:01:26,904 # you can send data on that interface and you should see the data 
2023-06-22 19:01:26,904 # being printed to STDOUT
2023-06-22 19:01:26,904 # 
2023-06-22 19:01:26,904 # NOTE: all strings need to be '\n' terminated!
2023-06-22 19:01:26,904 # 
2023-06-22 19:01:26,909 # UARD_DEV(0): test uart_poweron() and uart_poweroff()  ->  [OK]
2023-06-22 19:01:26,910 # 
2023-06-22 19:01:26,921 # UART INFO:
2023-06-22 19:01:26,958 # Available devices:               2
2023-06-22 19:01:27,004 # UART used for STDIO (the shell): UART_DEV(0)
2023-06-22 19:01:27,006 # 
init 1 9600
2023-06-22 19:01:50,464 # init 1 9600
send 1 ping
2023-06-22 19:04:12,912 # send 1 ping
2023-06-22 19:04:12,934 # UART_DEV(1) TX: ping
> 2023-06-22 19:04:12,973 # Success: UART_DEV(1) RX: [ping]\n
2023-06-22 19:04:23,894 # Exiting Pyterm
````

### Issues/PRs references

Depends on PR:
- #19751


Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-04 22:12:54 +00:00
Hugues Larrive
6336672c08 cpu/atmega_common: checking features instead of CPU models 2023-07-04 23:17:21 +02:00
bors[bot]
ddf1fe252d
Merge #19733 #19747 #19769 #19782
19733: cpu/msp430: reorganize code r=maribu a=maribu

### Contribution description

RIOT supports two distinct families of the MSP430: The [MSP430 x1xx] MCU family and the [MSP430 F2xx/G2xx] MCU family. For both incompatible MCU families the code was located in the msp430fxyz folder, resulting in case of the UART driver in particularly bizarre code looking roughly like this:

```C
#ifndef UART_USE_USCI
/* implementation of x1xx peripheral ... */
#else
/* implementation of F2xx/G2xx peripheral ... */
#endif
/* zero shared code between both variants */
```

This moves peripheral drivers shared between the two families to msp430_common and splits the SPI and UART driver into two MCU families.

In addition, it cleans up the `msp430_regs.h` by dropping most of it and using the macros and symbols provided by the vendor header files. There is little reason for us to maintain constants when TI is already doing that.

[MSP430 x1xx]: https://www.ti.com/lit/ug/slau049f/slau049f.pdf
[MSP430 F2xx/G2xx]: https://www.ti.com/lit/ug/slau144k/slau144k.pdf


19747: gnrc/ipv6/nib: reset rs_sent counter also for not-6LN interfaces r=maribu a=fabian18



19769: cpu/nrf53: add initial support with nRF5340DK-APP board r=maribu a=dylad

### Contribution description

This PR adds support for nRF5340 MCU and its associated Nordic development board, nRF5340DK.
This MCU provides a dual Cortex-M33, one application core running at up to 128MHz, and one network core running at up to 64MHz.
Peripherals are inherited from others Nordic MCUs families so it shouldn't be hard to add more of them in followup PRs.

For now, only the minimal set of peripherals is supported:
- GPIO / GPIO_IRQ
- UART
- TIMER

### Testing procedure
Build the usual test application for the supported peripherals and flash the board.
nRF5340DK provides two serial ports on its embedded debugger. RIOT's shell should be available on the first one (/dev/ttyACM0)


### Issues/PRs references
#18576
#19267 


19782: cpu/msp430: fix for ti's msp430-gcc-opensource package ld version r=maribu a=hugueslarrive

### Contribution description
My msp430 toolchain (https://www.ti.com/tool/MSP430-GCC-OPENSOURCE) was broken by #19484:
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
/opt/ti/msp430-gcc/bin/../lib/gcc/msp430-elf/9.3.1/../../../../msp430-elf/bin/ld: .rodata not found for insert
collect2: error: ld returned 1 exit status
make: *** [/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/../../Makefile.include:761 : /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf] Erreur 1
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version
GNU ld (Mitto Systems Limited - msp430-gcc 9.3.1.11) 2.34
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+'
9.3
1.11
2.34
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+$'
2.34
```


### Testing procedure
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
   text	   data	    bss	    dec	    hex	filename
   8612	    722	    866	  10200	   27d8	/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
```


### Issues/PRs references
Introduced by #19484, highlighted in #16727.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-04 18:43:26 +00:00
Marian Buschsieweke
45b353c6ef
cpu/msp430: make use of vendor header files
The MSP430 vendor files already provide macros containing register
constants and symbols (provided via linker scripts) containing addresses
of peripheral registers. So lets make use of that rather than
maintaining a long list of constants.
2023-07-04 20:21:05 +02:00
Dylan Laduranty
9fd48a0d06 cpu/nrf53: enable CPUID periph
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 17:34:57 +02:00
Dylan Laduranty
5df8bf6fca cpu/nrfxx: move uart_conf_t struct to periph_cpu_common.h
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 17:18:18 +02:00
Dylan Laduranty
aadb19e935 boards/nrf5340dk-app: add initial Kconfig
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 17:17:39 +02:00
Dylan Laduranty
1664232325 cpu/nrf53: add initial Kconfig
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 17:17:23 +02:00
Dylan Laduranty
f084f6e335 boards/nrf5340dk-app: add initial support
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 17:16:50 +02:00
Dylan Laduranty
de6939aa43 cpu/nrf53: add initial support
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 17:14:06 +02:00
bors[bot]
852e9c5512
Merge #19770 #19773 #19774 #19775
19770: cpu/nrf5x_common: reset all available CC channels r=maribu a=dylad

### Contribution description

Properly reset all CC channels of a given timer at initialization (except the last one which seems to be used for capture only in the driver).
The issue with the previous code was that some CCs were not clear on some nRF52 MCUs.
For instance, nRF52840 has 4 CCs for its two first timers, then 6 CCs for all others.
nRF9160 and nRF5340 also have 6 CCs for all its timer peripherals.
Thus, loop through the reported number of channels and clear the associated register instead of hardcoding the first 3 CC channels.


### Testing procedure
CI should be enough I think.

### Issues/PRs references
None.



19773: cpu/nrf{52,9160}: remove duplicate sevonpend bit r=maribu a=dylad

### Contribution description
This PR removes duplicate calls of `SCB_SCR_SEVONPEND` bit in nRF52 and nRF9160.
This call is already done [here](7c320055a1/cpu/cortexm_common/cortexm_init.c (L60)) 

### Testing procedure
Flash a nRF52 or nRF9160-based board and check that the board is still alive.


### Issues/PRs references
None. I notice this duplicate call when porting nRF53.


19774: boards/frdm-k22f: fixes long lines in periph_conf.h r=maribu a=hugueslarrive



19775: boards/frdm-k64f: fixes long lines and comma separated by whitespaces… r=maribu a=hugueslarrive

… warnings



Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: dylad <dylan.laduranty@mesotic.com>
Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-04 12:27:54 +00:00
bors[bot]
e0361abb3a
Merge #19771
19771: boards/nrf9160dk: use all available CC timer channels r=dylad a=dylad

### Contribution description
`nRF9160` has 6 CC per timer.
You can `grep -ra "CC_NUM" cpu/nrf9160 ` to check it.
So let's use all available CC.

### Testing procedure
You can run `tests/periph/timer` to see the new CC.


### Issues/PRs references
None.


Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 12:03:43 +00:00
Dylan Laduranty
ff076fa54e boards/nrf9160dk: use all available CC timer channels
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 13:58:23 +02:00
bors[bot]
2e5b2adac6
Merge #19793
19793: boards/sipeed-longan-nano: fix TFT display config and documentation r=maribu a=gschorcht

### Contribution description

This PR fixes the configuration of the TFT Display of Sipeed Longan Nano boards and improves the documentation regarding the use of the TFT Display.

### Testing procedure

```
CFLAGS='-DCONFIG_SIPEED_LONGAN_NANO_WITH_TFT=1' BOARD=sipeed-longan-nano make -C tests/drivers/st7735/ flash
```
should work with this PR.

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-04 10:46:04 +00:00
Gunar Schorcht
199376651f boards/sipeed-longan-nano: fix TFT display config and documentation 2023-07-04 12:12:50 +02:00
bors[bot]
db9971de72
Merge #19783
19783: tests/core: remove Makefile.sys_common copy past mistake r=maribu a=hugueslarrive



Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-03 13:54:41 +00:00
bors[bot]
2dd65304a3
Merge #19790
19790: boards: fix documentation for GD32V boards r=dylad a=gschorcht

### Contribution description

With the support of the USB OTG interface, both the flash method and the stdio interface module used were changed for the GD32V boards. However, the documentation was not updated. With this PR, the documentation is updated accordingly.

### Testing procedure

Green CI

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-03 13:08:53 +00:00
Gunar Schorcht
7687c49120 boards/sipeed-longan-nano: documentation fix 2023-07-03 11:49:15 +02:00
Gunar Schorcht
e26f08d179 boards/seeedsudio-gd32: documentation fix 2023-07-03 11:48:39 +02:00
bors[bot]
92529a8d14
Merge #19785
19785: cpu/esp8266: fix region overflow with '*periph' directory in app path r=gschorcht a=hugueslarrive

### Contribution description
This pull request addresses an issue where a region overflow occurs during the generation of the `.elf` file when the application path contains a directory named '*periph'. The problem arises due to an incorrect section mapping in the `esp8266.riot-os.ld` linker script.

The issue was causing the compilation of all tests which were moved to the `tests/periph` directory by PR #19552 to fail on the ESP8266 architecture.

To resolve the issue, the `esp8266.riot-os.ld` script has been modified. The section mapping for the `*periph` directory has been changed to `*esp_common_periph`, ensuring that the correct sections are included in the final binary.

### Testing procedure
To verify the effectiveness of this fix, the following testing procedure was performed:
1. Checked out the `master` branch of the RIOT repository
2. Cleaned and built the `blinky` example for the `esp8266-esp-12x` board:
- **Expected Result**: The build process completes successfully without any region overflow errors. The resulting `blinky.elf` file is generated.
```
hugues@p700:~/github/riot_small_fixes/RIOT$ BOARD=esp8266-esp-12x make -j64 -C examples/blinky clean all | grep -v make
rm -rf /home/hugues/github/riot_small_fixes/RIOT/examples/blinky/bin/esp8266-esp-12x/pkg-build/esp8266_sdk
Building application "blinky" for "esp8266-esp-12x" with MCU "esp8266".

esptool.py v2.4.0
   text	   data	    bss	    dec	    hex	filename
 278112	   5228	  28640	 311980	  4c2ac	/home/hugues/github/riot_small_fixes/RIOT/examples/blinky/bin/esp8266-esp-12x/blinky.elf
esptool.py v2.4.0
Parsing CSV input...
```
3. Created a directory named `somethingperiph` and copied the `blinky` example into it:
```
mkdir somethingperiph && cp -a examples/blinky/ somethingperiph
```
4. Cleaned and attempted to build the `blinky` example in the `somethingperiph` directory:
- **Expected Result**: The build process fails with a linker error, indicating a region overflow issue.
```
hugues@p700:~/github/riot_small_fixes/RIOT$ BOARD=esp8266-esp-12x make -j64 -C somethingperiph/blinky clean all | grep -v make
Building application "blinky" for "esp8266-esp-12x" with MCU "esp8266".
rm -rf /home/hugues/github/riot_small_fixes/RIOT/somethingperiph/blinky/bin/esp8266-esp-12x/pkg-build/esp8266_sdk

esptool.py v2.4.0
/home/hugues/esp/xtensa-esp8266-elf/bin/../lib/gcc/xtensa-esp8266-elf/5.2.0/../../../../xtensa-esp8266-elf/bin/ld: /home/hugues/github/riot_small_fixes/RIOT/somethingperiph/blinky/bin/esp8266-esp-12x/blinky.elf section `.text' will not fit in region `iram1_0_seg'
/home/hugues/esp/xtensa-esp8266-elf/bin/../lib/gcc/xtensa-esp8266-elf/5.2.0/../../../../xtensa-esp8266-elf/bin/ld: region `iram1_0_seg' overflowed by 24372 bytes
collect2: error: ld returned 1 exit status
make: *** [/home/hugues/github/riot_small_fixes/RIOT/somethingperiph/blinky/../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/somethingperiph/blinky/bin/esp8266-esp-12x/blinky.elf] Erreur 1
```
5. Checked out this PR's branch
6. Cleaned and attempted to build the `blinky` example in the `somethingperiph` directory again:
- **Expected Result**: The build process completes successfully without any region overflow errors. The resulting `blinky.elf` file is generated.
```
hugues@p700:~/github/riot_small_fixes/RIOT$ BOARD=esp8266-esp-12x make -j64 -C somethingperiph/blinky clean all | grep -v make
Building application "blinky" for "esp8266-esp-12x" with MCU "esp8266".
rm -rf /home/hugues/github/riot_small_fixes/RIOT/somethingperiph/blinky/bin/esp8266-esp-12x/pkg-build/esp8266_sdk

esptool.py v2.4.0
   text	   data	    bss	    dec	    hex	filename
 278080	   5228	  28640	 311948	  4c28c	/home/hugues/github/riot_small_fixes/RIOT/somethingperiph/blinky/bin/esp8266-esp-12x/blinky.elf
esptool.py v2.4.0
Parsing CSV input...
```
7. Verified the size of the `blinky.elf` file:
- **Expected Result**: The size of the `blinky.elf` file is similar to the size obtained in step 2, indicating a successful build. However, a slight difference in size was observed due to the linker script modification.

8. Cleaned and attempted to build the `blinky` example in the `examples` directory again:
- **Expected Result**: The size of the `blinky.elf` file is similar to the size obtained in step 6.
```
hugues@p700:~/github/riot_small_fixes/RIOT$ BOARD=esp8266-esp-12x make -j64 -C examples/blinky clean all | grep -v make
Building application "blinky" for "esp8266-esp-12x" with MCU "esp8266".
rm -rf /home/hugues/github/riot_small_fixes/RIOT/examples/blinky/bin/esp8266-esp-12x/pkg-build/esp8266_sdk

esptool.py v2.4.0
   text	   data	    bss	    dec	    hex	filename
 278080	   5228	  28640	 311948	  4c28c	/home/hugues/github/riot_small_fixes/RIOT/examples/blinky/bin/esp8266-esp-12x/blinky.elf
esptool.py v2.4.0
Parsing CSV input...
```
The tests confirm that this pull request resolves the region overflow issue when the application path contains a directory named '*periph'. Additionally, all relevant tests in the `tests/periph` directory successfully compile again on the ESP8266 architecture:
```
hugues@p700:~/github/riot_small_fixes/RIOT$ for p in tests/periph/*; do BOARD=esp8266-esp-12x make -j64 -C $p clean all 2>&1 | grep elf; done
 279368	   5200	  28728	 313296	  4c7d0	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/adc/bin/esp8266-esp-12x/tests_adc.elf
 277492	   5192	  28672	 311356	  4c03c	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/cpuid/bin/esp8266-esp-12x/tests_cpuid.elf
 289044	   5264	  28856	 323164	  4ee5c	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/gpio/bin/esp8266-esp-12x/tests_gpio.elf
 288884	   5288	  29160	 323332	  4ef04	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/gpio_arduino/bin/esp8266-esp-12x/tests_gpio_arduino.elf
 279520	   5252	  28712	 313484	  4c88c	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/hwrng/bin/esp8266-esp-12x/tests_hwrng.elf
 292312	   5268	  28872	 326452	  4fb34	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/i2c/bin/esp8266-esp-12x/tests_i2c.elf
 284064	   5208	  28720	 317992	  4da28	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/pm/bin/esp8266-esp-12x/tests_pm.elf
 285800	   5248	  28856	 319904	  4e1a0	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/pwm/bin/esp8266-esp-12x/tests_pwm.elf
 281756	   5252	  28768	 315776	  4d180	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtc/bin/esp8266-esp-12x/tests_rtc.elf
 278832	   5192	  28704	 312728	  4c598	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtt/bin/esp8266-esp-12x/tests_rtt.elf
 280552	   5252	  28736	 314540	  4ccac	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtt_min/bin/esp8266-esp-12x/tests_rtt_min.elf
 294164	   5296	  30104	 329564	  5075c	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/spi/bin/esp8266-esp-12x/tests_spi.elf
 279440	   5192	  28800	 313432	  4c858	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/timer/bin/esp8266-esp-12x/tests_timer.elf
 278884	   5192	  28712	 312788	  4c5d4	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/timer_short_relative_set/bin/esp8266-esp-12x/tests_timer_short_relative_set.elf
 286756	   5248	  31920	 323924	  4f154	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/uart/bin/esp8266-esp-12x/tests_uart.elf
 275572	   5184	  28800	 309556	  4b934	/home/hugues/github/riot_small_fixes/RIOT/tests/periph/uart_mode/bin/esp8266-esp-12x/tests_uart_mode.elf
hugues@p700:~/github/riot_small_fixes/RIOT$ git checkout master
Basculement sur la branche 'master'
Votre branche est à jour avec 'origin/master'.
hugues@p700:~/github/riot_small_fixes/RIOT$ for p in tests/periph/*; do BOARD=esp8266-esp-12x make -j64 -C $p clean all 2>&1 | grep Erreur; done
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/adc/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/adc/bin/esp8266-esp-12x/tests_adc.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/cpuid/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/cpuid/bin/esp8266-esp-12x/tests_cpuid.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/gpio/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/gpio/bin/esp8266-esp-12x/tests_gpio.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/gpio_arduino/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/gpio_arduino/bin/esp8266-esp-12x/tests_gpio_arduino.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/hwrng/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/hwrng/bin/esp8266-esp-12x/tests_hwrng.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/i2c/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/i2c/bin/esp8266-esp-12x/tests_i2c.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/pm/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/pm/bin/esp8266-esp-12x/tests_pm.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/pwm/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/pwm/bin/esp8266-esp-12x/tests_pwm.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtc/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtc/bin/esp8266-esp-12x/tests_rtc.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtt/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtt/bin/esp8266-esp-12x/tests_rtt.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtt_min/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/rtt_min/bin/esp8266-esp-12x/tests_rtt_min.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/spi/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/spi/bin/esp8266-esp-12x/tests_spi.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/timer/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/timer/bin/esp8266-esp-12x/tests_timer.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/timer_short_relative_set/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/timer_short_relative_set/bin/esp8266-esp-12x/tests_timer_short_relative_set.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/uart/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/uart/bin/esp8266-esp-12x/tests_uart.elf] Erreur 1
make: *** [/home/hugues/github/riot_small_fixes/RIOT/tests/periph/uart_mode/../../../Makefile.include:761 : /home/hugues/github/riot_small_fixes/RIOT/tests/periph/uart_mode/bin/esp8266-esp-12x/tests_uart_mode.elf] Erreur 1
```

### Issues/PRs references
Highlighted in #16727, appeared whith project tree as a side effect from #19552 but pre-existing.


Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-02 14:49:30 +00:00
Hugues Larrive
2d660faf74 cpu/esp8266: fix region overflow with '*periph' directory in app path 2023-07-02 12:21:16 +02:00
Hugues Larrive
9acb5ffc0b tests/core: remove Makefile.sys_common copy past mistake 2023-07-01 19:05:54 +02:00
Hugues Larrive
453b08fe5a cpu/msp430: fix for ti's msp430-gcc-opensource package ld version 2023-07-01 12:29:19 +02:00
bors[bot]
6fc006421b
Merge #19779
19779: cpu/atmega_common: make vera++ happy r=maribu a=maribu

### Contribution description

Vera++ doesn't like `#error` preprocessor directives without a quoted string afterwards (and also my syntax highlighter doesn't like this as well). So let's add the quotes to have the tools not spooked out.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-30 08:37:31 +00:00
Marian Buschsieweke
87e3a611fe
cpu/atmega_common: make vera++ happy
Vera++ doesn't like `#error` preprocessor directives without a quoted
string afterwards (and also my syntax highlighter doesn't like this as
well). So let's add the quotes to have the tools not spooked out.
2023-06-29 22:27:59 +02:00
bors[bot]
c2df430deb
Merge #19745
19745: Makefile.include: Generate lst file using objdump r=maribu a=nandojve

### Contribution description

The MAP file does not provide all information necessary to do a full analize of generated code. This automatically generate the LST file with all relavant C and ASM code to help inspect code generated.

### Testing procedure

This was tested using AVR and Cortex-M toolchains.

Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-06-29 16:21:49 +00:00
Gerson Fernando Budke
ae61702ffe Makefile.include: Generate lst file using objdump
The MAP file does not provide all information necessary to do a full
analize of generated code. This automatically generate the LST file
with all relavant C and ASM code to help inspect code generated.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-06-29 17:29:33 +02:00
Hugues Larrive
d339437225 boards/frdm-k64f: fixes long lines and comma separated by whitespaces warnings 2023-06-29 15:33:18 +02:00
Hugues Larrive
fcc7ce5749 boards/frdm-k22f: fixes long lines in periph_conf.h 2023-06-29 15:02:02 +02:00
bors[bot]
755442fe27
Merge #19712
19712: cpu/riscv: Add PMP driver r=MrKevinWeiss a=Teufelchen1

### Contribution description

Hi! 🐘 

this adds a basic RISC-V physical memory protection (PMP) driver to RIOT. Well, 'driver' might be a stretched, feels more like a little utility :)

EDIT: Also added  a no-execute RAM option for the hifive & a corresponding test

Since I only have an Hifive rev b, it's only enabled on this board / cpu. I also tested the code on an ESP32-C but the feature can't be enabled there, as `cpu/riscv_common/` is not used by the ESP32...

### Testing procedure

* Grab a hifive rev b
* go to `examples/hello-world`
* Add `USEMODULES += periph_pmp` to the `Makefile`
* Include `pmp.h` in `main.c`
* Add code e.g. `print_pmpcfg(0);`
* compile & flash & term 

You should see something like this:
```
# Hello World!
# You are running RIOT on a(n) hifive1b board.
# This board features a(n) fe310 MCU.
# pmp00cfg: - R-X OFF   0x00000000 - 0x00000000
```



Co-authored-by: Teufelchen1 <bennet.blischke@outlook.com>
2023-06-29 09:57:31 +00:00
bors[bot]
7c320055a1
Merge #19772
19772: cpu/avr8_common: fix typo in a comment r=maribu a=maribu



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-29 05:35:45 +00:00
Marian Buschsieweke
a6f48d84a0
cpu/avr8_common: fix typo in a comment 2023-06-28 22:36:21 +02:00
dylad
1e0b58a5a4 cpu/nrf9160: remove duplicate set of SEVONPEND bit
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2023-06-28 18:42:30 +02:00
dylad
3cb9c1a6f2 cpu/nrf52: remove duplicate set of SEVONPEND bit
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2023-06-28 18:42:16 +02:00
Dylan Laduranty
a73ddbd045 cpu/nrf5x_common: reset all available CC channels
Except the last channel used for capture

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-06-28 16:40:15 +02:00
bors[bot]
d339984c66
Merge #19766
19766: core/lib: make the use of DEBUG_BREAKPOINT on assert optional r=gschorcht a=gschorcht

### Contribution description

This PR makes the use of `DEBUG_BREAKPOINT` on failed assertion optional.

The behavior of `assert` has been changed with PR #19368. Instead of printing some useful information, either a breakpoint is inserted and the execution of the MCU stops in debugger or a endless while loop is executed.

Before PR #19368 the user got on failed assertion:
```
Starting ESP32x with ID: 7cdfa1e36a34
ESP-IDF SDK Version v4.4.1-0-g1329b19fe49
...
*** RIOT kernel panic:
FAILED ASSERTION.

*** halted.
```
This was very helpful during development, especially to identify quickly the cause of problems with `DEBUG_ASSERT_VERBOSE` enabled, e.g. when misconfiguration led to failed assertions.

With PR #19368 the user gets an address in best case (or even `0` on platforms like ESP32), in worst case the MCU seems to stuck, e.g.
```
Starting ESP32x with ID: 7cdfa1e36a34
ESP-IDF SDK Version v4.4.1-0-g1329b19fe49
...
0
```
The problem with the new behavior is that
- a user doesn't get a quick indication of what happened
- there is not always an easy way to attach a debugger

This PR therefore makes the use of `DEBUG_BREAKPOINT` optional using `DEBUG_ASSERT_BREAKPOINT` define.

### Testing procedure

Add `assert(0)` in `examples/hello-world/main.c` and compile with and w/o `CFLAGS='-DDEBUG_ASSERT_BREAKPOINT'`.

With `DEBUG_ASSERT_BREAKPOINT` the execution should stop in `assert_failue`. Without `DEBUG_ASSERT_BREAKPOINT`, the information as generated before PR #19368 and the execution should stop in `panic_arch`.

### Issues/PRs references



Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-06-28 13:21:56 +00:00
Teufelchen1
0e839654e8 cpu/riscv: Add PMP driver 2023-06-28 11:55:34 +02:00
Gunar Schorcht
6eb358bfee tests/sys/sema_inv: boards with insufficient RAM 2023-06-28 11:39:08 +02:00
bors[bot]
117c577bf6
Merge #19767 #19768
19767: boards: Fix I2C Arduino mapping r=chrysn a=maribu

### Contribution description

The correct macro name is `ARDUINO_I2C_UNO` for Arduino UNO compatible I2C bus location, or `ARDUINO_I2C_NANO` for Arduino Nano compatible I2C bus location.


19768: sys/arduino: move pseudo modules to makefiles r=chrysn a=maribu

### Contribution description

This allows using the arduino_pwm feature (which is translated into a module) without the arduino module; e.g. for only using the Arduino I/O mapping but not the Arduino API.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-28 07:41:50 +00:00
Marian Buschsieweke
a461cd8b94
sys/arduino: move pseudo modules to makefiles
This allows using the arduino_pwm feature (which is translated into a
module) without the arduino module; e.g. for only using the Arduino
I/O mapping but not the Arduino API.
2023-06-28 09:09:31 +02:00
Marian Buschsieweke
4f0f1be1d2
boards: Fix I2C Arduino mapping
The correct macro name is `ARDUINO_I2C_UNO` for Arduino UNO compatible
I2C bus location, or `ARDUINO_I2C_NANO` for Arduino Nano compatible
I2C bus location.
2023-06-28 09:05:23 +02:00
Gunar Schorcht
c9a9a5901b core/lib: do not use DEBUG_BREAKPOINT by default 2023-06-27 17:04:27 +02:00
bors[bot]
b209fdd76c
Merge #19759
19759: boards,sys/arduino: major clean up r=maribu a=maribu

### Contribution description

- Rename all `arduino_pinmap.h` to `arduino_iomap.h`
    - An empty `arduino_pinmap.h` that just includes `arduino_iomap.h` is provided for backward compatibility
    - Move all info from `arduino_board.h` into the new file as trivial macros, so that they can also be used outside of sketches
    - The new name reflects the fact not just pin mappings, but also other I/O features such as PWMs are mapped
- Drop all `arduino_board.h`
    - `arduino_board.h` and `arduino_iomap.h` now provide the exact same information, just in a different format
    - a generic `arduino_board.h` is provided instead that just uses the info in `arduinio_iomap.h` and provides them in the format the code in `sys/arduino` expects it
- Add fine grained features to indicate for mappings
    - availability of mappings for analog pins, DAC pins, PWM pins, UART devices, SPI/I2C buses to the corresponding RIOT identification can now be expressed:
        - `arduino_pins`: `ARDUINO_PIN_0` etc. are available
        - `arduino_analog`: `ARDUINO_A0` etc. are available
        - `arduino_pwm`: `ARDUINO_PIN_13_PWM_DEV` etc. are available
        - `arduino_dac`: `ARDUINO_DAC0` etc. are available
        - `arduino_uart`: `ARDUINO_UART_D0D1` or similar are available
        - `arduino_spi`: `ARDUINO_SPI_ISP` or similar are available
        - `arduino_i2c`: `ARDUINO_I2C_UNO` or similar are available
    - mechanical/electrical compatibility with specific form factors can now be expressed as features:
        - `aruino_shield_nano`: Arduino NANO compatible headers
        - `aruino_shield_uno`: Arduino UNO compatible headers
        - `aruino_shield_mega`: Arduino MEGA compatible headers
        - `aruino_shield_isp`: ISP header is available

This provides the groundwork to implement shield support as modules that can rely on the I/O mappings, rather than having to provide a configuration per board.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-26 18:19:29 +00:00
Marian Buschsieweke
efb3a32a8d
dist/tools/doccheck: update exclude patterns 2023-06-26 17:24:07 +02:00
Marian Buschsieweke
043e8cc88e
boards,sys/arduino: major clean up
- Rename all `arduino_pinmap.h` to `arduino_iomap.h`
    - An empty `arduino_pinmap.h` that just includes `arduino_iomap.h`
      is provided for backward compatibility
    - Move all info from `arduino_board.h` into the new file as trivial
      macros, so that they can also be used outside of sketches
    - The new name reflects the fact not just pin mappings, but also
      other I/O features such as PWMs are mapped
- Drop all `arduino_board.h`
    - `arduino_board.h` and `arduino_iomap.h` now provide the exact
      same information, just in a different format
    - a generic `arduino_board.h` is provided instead that just
      uses the info in `arduinio_iomap.h` and provides them in the
      format the code in `sys/arduino` expects it
- Add fine grained features to indicate for mappings
    - availability of mappings for analog pins, DAC pins, PWM pins,
      UART devices, SPI/I2C buses to the corresponding RIOT
      identification can now be expressed:
        - `arduino_pins`: `ARDUINO_PIN_0` etc. are available
        - `arduino_analog`: `ARDUINO_A0` etc. are available
        - `arduino_pwm`: `ARDUINO_PIN_13_PWM_DEV` etc. are available
        - `arduino_dac`: `ARDUINO_DAC0` etc. are available
        - `arduino_uart`: `ARDUINO_UART_D0D1` or similar are available
        - `arduino_spi`: `ARDUINO_SPI_ISP` or similar are available
        - `arduino_i2c`: `ARDUINO_I2C_UNO` or similar are available
    - mechanical/electrical compatibility with specific form factors
      can now be expressed as features:
        - `aruino_shield_nano`: Arduino NANO compatible headers
        - `aruino_shield_uno`: Arduino UNO compatible headers
        - `aruino_shield_mega`: Arduino MEGA compatible headers
        - `aruino_shield_isp`: ISP header is available

This provides the groundwork to implement shield support as modules
that can rely on the I/O mappings, rather than having to provide a
configuration per board.
2023-06-26 17:24:07 +02:00
bors[bot]
abc0a09828
Merge #19761
19761: buildsystem: only expose CPU_RAM_BASE & SIZE when known r=maribu a=maribu

### Contribution description

This gets rid of the following ugly warnings:

    /bin/sh: 1: arithmetic expression: expecting primary: ""


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-26 10:12:37 +00:00