Skip to content

Commit 0b38d24

Browse files
committed
Fix "EEPROM.h: No such file or directory" with ArduinoCore-mbed (fixes #31)
1 parent 556a006 commit 0b38d24

7 files changed

Lines changed: 36 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ jobs:
9797
softwareserial: true
9898
index_url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
9999

100+
- core: arduino:mbed_rp2040
101+
board: arduino:mbed_rp2040:pico
102+
eeprom: false
103+
softwareserial: false
104+
100105
steps:
101106
- name: Checkout
102107
uses: actions/checkout@v3

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
StreamUtils - Change log
22
========================
33

4+
HEAD
5+
----
6+
7+
* Fix "EEPROM.h: No such file or directory" with ArduinoCore-mbed (issue #31)
8+
49
1.7.2 (2023/03/04)
510
-----
611

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ It has been tested on the following cores:
381381
* [AVR](https://github.com/arduino/ArduinoCore-avr)
382382
* [ESP32](https://github.com/espressif/arduino-esp32)
383383
* [ESP8266](https://github.com/esp8266/Arduino)
384+
* [mbed](https://github.com/arduino/ArduinoCore-mbed)
384385
* [nRF52](https://github.com/adafruit/Adafruit_nRF52_Arduino)
385386
* [RP2040](https://github.com/earlephilhower/arduino-pico)
386387
* [SAMD](https://github.com/arduino/ArduinoCore-samd)

extras/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ endfunction()
2020
add_subdirectory(cores/avr)
2121
add_subdirectory(cores/esp32)
2222
add_subdirectory(cores/esp8266)
23+
add_subdirectory(cores/mbed)
2324
add_subdirectory(cores/nrf52)
2425
add_subdirectory(cores/rp2040)
2526
add_subdirectory(cores/samd)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# StreamUtils - github.com/bblanchon/ArduinoStreamUtils
2+
# Copyright Benoit Blanchon 2019-2023
3+
# MIT License
4+
5+
add_library(MbedRp2040Core INTERFACE)
6+
7+
target_include_directories(MbedRp2040Core
8+
INTERFACE
9+
${CMAKE_CURRENT_SOURCE_DIR}
10+
${CMAKE_CURRENT_SOURCE_DIR}/../coreapi
11+
)
12+
13+
target_compile_definitions(MbedRp2040Core
14+
INTERFACE
15+
ARDUINO_ARCH_RP2040
16+
ARDUINO_RASPBERRY_PI_PICO
17+
ARDUINO_ARCH_MBED_RP2040
18+
ARDUINO_ARCH_MBED
19+
)
20+
21+
add_streamutils_test(StreamUtilsTestMbedRp2040 MbedRp2040Core)

extras/test/cores/rp2040/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ target_include_directories(Rp2040Core
1616
target_compile_definitions(Rp2040Core
1717
PUBLIC
1818
ARDUINO_ARCH_RP2040
19+
ARDUINO_PICO_MAJOR=3
1920
)
2021

2122
add_streamutils_test(StreamUtilsTestRp2040 Rp2040Core)

src/StreamUtils/Configuration.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
#endif
3535

3636
#ifndef STREAMUTILS_ENABLE_EEPROM
37-
#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_ESP8266) || \
38-
defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_RP2040) || \
37+
#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_ESP8266) || \
38+
defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_PICO_MAJOR) || \
3939
defined(ARDUINO_ARCH_STM32) || defined(CORE_TEENSY)
4040
#define STREAMUTILS_ENABLE_EEPROM 1
4141
#else

0 commit comments

Comments
 (0)