Update to reflex new arduino-pico core v1.4.0

This commit is contained in:
Khoi Hoang
2021-05-18 13:31:14 -04:00
committed by GitHub
parent 240d9483ea
commit af9e9c86a6
+28 -7
View File
@@ -24,7 +24,9 @@
* [Manual Install](#manual-install)
* [VS Code & PlatformIO](#vs-code--platformio)
* [Packages' Patches](#packages-patches)
* [1. For RP2040-based boards](#1-for-rp2040-based-boards)
* [1. For RP2040-based boards using Earle Philhower arduino-pico core](#1-for-rp2040-based-boards-using-earle-philhower-arduino-pico-core)
* [1.1. To use BOARD_NAME](#11-to-use-board_name)
* [1.2. To avoid compile error relating to microsecondsToClockCycles](#12-to-avoid-compile-error-relating-to-microsecondstoclockcycles)
* [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error)
* [More useful Information](#more-useful-information)
* [Usage](#usage)
@@ -135,7 +137,7 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
## Prerequisites
1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
2. [`Earle Philhower's arduino-pico core v1.2.1+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
2. [`Earle Philhower's arduino-pico core v1.4.0+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
---
---
@@ -169,19 +171,38 @@ Another way to install is to:
### Packages' Patches
#### 1. For RP2040-based boards
***To be able to automatically detect and display BOARD_NAME on RP2040-based boards (RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040, GENERIC_RP2040, etc) boards***, you have to copy the file [RP2040 platform.txt](Packages_Patches/rp2040/hardware/rp2040/1.2.1) into rp2040 directory (~/.arduino15/packages/rp2040/hardware/rp2040/1.2.1).
#### 1. For RP2040-based boards using [Earle Philhower arduino-pico core](https://github.com/earlephilhower/arduino-pico)
Supposing the rp2040 core version is 1.2.1. This file must be copied into the directory:
#### 1.1 To use BOARD_NAME
- `~/.arduino15/packages/rp2040/hardware/rp2040/1.2.1/platform.txt`
**To be able to automatically detect and display BOARD_NAME on RP2040-based boards (RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040, GENERIC_RP2040, etc) boards**, you have to copy the file [RP2040 platform.txt](Packages_Patches/rp2040/hardware/rp2040/1.4.0) into rp2040 directory (~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0).
Supposing the rp2040 core version is 1.4.0. This file must be copied into the directory:
- `~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0/platform.txt`
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz
This file must be copied into the directory:
- `~/.arduino15/packages/rp2040/hardware/rp2040/x.yy.zz/platform.txt`
With core after v1.4.0, this step is not necessary anymore thanks to the PR [Add -DBOARD_NAME="{build.board}" #136](https://github.com/earlephilhower/arduino-pico/pull/136).
#### 1.2 To avoid compile error relating to microsecondsToClockCycles
Some libraries, such as [Adafruit DHT-sensor-library](https://github.com/adafruit/DHT-sensor-library), require the definition of microsecondsToClockCycles(). **To be able to compile and run on RP2040-based boards**, you have to copy the files in [**RP2040 Arduino.h**](Packages_Patches/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h) into rp2040 directory (~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0).
Supposing the rp2040 core version is 1.4.0. This file must be copied to replace:
- `~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h`
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz
This file must be copied to replace:
- `~/.arduino15/packages/rp2040/hardware/rp2040/x.yy.zz/cores/rp2040/Arduino.h`
With core after v1.4.0, this step is not necessary anymore thanks to the PR [Add defs for compatibility #142](https://github.com/earlephilhower/arduino-pico/pull/142).
---
---