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

38 Commits

Author SHA1 Message Date
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Gunar Schorcht
26030e28af boards: remove extern mtd_dev_t* Declarations 2023-12-07 15:32:49 +01: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
Gunar Schorcht
967ec447ae boards/common/esp*: set MTD offset for SD Cards to 1
Since the default MTD device `MTD_0` is the internal flash on ESP32x SoCs, SD card devices have to start at `MTD_1`.
2023-02-06 23:35:34 +01:00
Benjamin Valentin
5d111e71aa boards: drop board_init() from board.h 2022-02-25 15:08:58 +01:00
Francisco Molina
464d941a3e boards: drop empty custom board_init & empty board.c 2022-02-22 18:27:37 +01:00
Benjamin Valentin
468ea89953 boards: drop LED init
This is handled by periph_init_leds now
2022-02-18 14:35:43 +01:00
Gunar Schorcht
aeb5d1197c boards/esp8266: common periph features moved to cpu/esp_common 2021-12-23 10:33:57 +01:00
Leandro Lanzieri
4be55b7a49
boards/common/esp8266: model Kconfig 2021-12-10 18:54:07 +01:00
benpicco
7a413558db
Merge pull request #16305 from iosabi/esp_rts_dtr
boards/common/esp8266: Set RTS and DTR to 0 on pyterm.
2021-10-18 16:42:55 +02:00
Gunar Schorcht
54c049fe0c boards/esp_common: fix refs to CPU doc section 2021-10-13 17:37:16 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
iosabi
52107b2416 esp8266: Support UART1 and other UART0 pins.
The esp8266 CPU has actually two hardware UART peripherals. UART0 is
used by the boot ROM for flashing and serial output during boot,
typically at a baudrate of 74880 bps until the bootloader or application
sets the more standard 115200 baudrate. This UART0 device has two
possible pins for TXD, GPIO1 and GPIO2, which are both set to TXD by the
boot ROM. esp8266 modules will typically have GPIO1 labeled as the TX
pin, but it is possible to use GPIO2 for that purpose even while
flashing the device with esptool.py.

The second device, UART1, also has two options for TXD, GPIO2 and GPIO7,
and only one option for RXD, GPIO8. However, GPIO7 and GPIO8 are used
by the flash internally so those options are not very useful unless
maybe while running from IRAM with the flash disabled, for example for
a debugger over UART1.

This patch allows boards to override UART{0,1}_{R,T}XD in their
periph_conf.h to configure the uart selection. Defining UART1_TX will
make the UART_DEV(1) device available.

Tested with:

```CFLAGS='-DUART1_TXD=GPIO2' make -C tests/periph_uart BOARD=esp8266-esp-12x flash term```

* Connected one USB-UART to the standard GPIO1 and GPIO3 for flashing
  and console. After flashing we see the manual test output at 115200
  bps

* Connected a second USB-UART with RX to GPIO2 running at 74880.

Then run on the first console:
```
> init 1 74880
> send 1 hello
```

The word "hello" appears on the second UART connection.

Note that GPIO2 is used during boot for UART0's TX until the application
or bootloader set it to a regular GPIO, so some boot ROM messages at
74880 bps are visible. After running `init 1 74880` it is set to UART1's
TX.
2021-05-02 12:27:27 +00:00
iosabi
73fab03e31 boards/common/esp8266: Set RTS and DTR to 0 on pyterm.
When flashing the ESP8266 with the flash tool it is possible to connect
RTS to the reset line and DTR to GPIO0 to automatically reboot the
device into flash mode and then reboot the device again into normal
mode.

pyterm leaves these two signals unset unless we specify a --set-rts=0 or
1, and the value of these lines would depend on the UART driver.

This patch explicitly sets RTS and DTR to 0 (high level) in the
Makefile.include config so `make term` releases the reset line,
otherwise the device may be left in reset mode after pyterm starts.
2021-04-10 22:50:35 +02:00
4c290e1f92
boards: remove include of serial.inc.mk 2020-12-02 09:20:57 +01:00
d527ab6994
cpu: boards: esp: use common esptool makefile 2020-12-01 10:36:42 +01:00
Leandro Lanzieri
85b674dfc6
boards/common/esp8266: Add Kconfig symbols 2020-07-07 16:27:43 +02:00
Leandro Lanzieri
7a2e4c819d
cpu/esp8266: Add Kconfig symbols 2020-07-07 16:27:43 +02:00
Benjamin Valentin
5da1a9e577 cpu/esp*: use TIMER_CHANNEL_NUMOF 2020-06-24 00:45:35 +02:00
Leandro Lanzieri
194b8a7aca
boards/esp8266: Move common modules to common Makefile.dep 2020-03-24 09:21:22 +01:00
Gunar Schorcht
d251ffd205 boards/esp8266: enable arduino feature 2020-02-21 09:09:34 +01:00
Francois Berder
b4ab22673e boards: Use ARRAY_SIZE for setting UART_NUMOF, SPI_NUMOF, I2C_NUMOF
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2020-02-09 20:55:46 +00:00
Hyungsin
6eed5b9d43 remove XTIMER_OVERHEAD 2020-01-10 13:22:11 -08:00
Gunar Schorcht
555a7040db cpu/esp8266: reset tool to allow automatic tests 2019-11-14 13:58:48 +01:00
Gunar Schorcht
e5b7645b0b boards/esp32: changes for RTOS SDK 2019-11-14 13:58:25 +01:00
Gunar Schorcht
7d9a3a79a2 boards/esp8266: changes for RTOS SDK 2019-11-14 13:58:25 +01:00
Francisco Molina
1ae0873769 boards: change PORT used for flash/debug/reset to PROG_DEV 2019-10-24 12:58:12 +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
49d61bbe6e
boards/common/esp: move CPU/CPU_MODEL definiton to Makefile.features
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
2019-09-24 17:29:37 +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
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
90e136405e
boards/common/esp: deduplicate common esp boards group definitions 2019-08-05 16:57:36 +02:00
Gaëtan Harter
4a085270ea
boards/esp*: use PORT in RESET_FLAGS
This allows selecting the correct device when multiple boards are connected.
2019-06-14 15:58:36 +02:00
Gaëtan Harter
1d8de6b24d
boards/esp*: update RESET and RESET_FLAGS
Update to use RESET and RESET_FLAGS variables set conditionally.
2019-06-14 15:58:36 +02:00
Sebastian Meiling
8766f8bf28 make: allow override of RESET for boards/common/esp8266 2019-06-06 16:26:58 +02:00
Gaëtan Harter
b88d1887c8
boards/tools: remove exporting RESET/RESET_FLAGS
RESET and RESET_FLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.

This will also prevent evaluating 'PORT' for RESET_FLAGS when not needed.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `24 insertions(+), 24 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
2019-05-28 09:56:14 +02:00
Gunar Schorcht
fa0b4b801f cpu/esp8266: doc fixes 2019-01-09 16:55:21 +01:00
Schorcht
bc1906ef42 boards: add common esp8266 based sources 2018-09-05 02:39:50 +02:00