Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
Update Packages' Patches
Browse files Browse the repository at this point in the history
  • Loading branch information
khoih-prog authored Apr 24, 2022
1 parent 61a85bf commit 832a11b
Show file tree
Hide file tree
Showing 20 changed files with 5,658 additions and 0 deletions.
1,730 changes: 1,730 additions & 0 deletions Packages_Patches/Fab_SAM_Arduino/hardware/hardware/1.6.18-alpha2/boards.txt

Large diffs are not rendered by default.

1,730 changes: 1,730 additions & 0 deletions Packages_Patches/Fab_SAM_Arduino/hardware/samd/1.6.18-alpha2/boards.txt

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions Packages_Patches/Seeeduino/hardware/rp2040/2.7.2/boards.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
menu.split=Flash split
Seeed_XIAO_RP2040.name=SEEED XIAO RP2040
Seeed_XIAO_RP2040.build.core=arduino
Seeed_XIAO_RP2040.build.crossprefix=arm-none-eabi-
Seeed_XIAO_RP2040.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/

# KH fix for Linux case-sensitive path
#Seeed_XIAO_RP2040.build.variant=SEEED_XIAO_RP2040
Seeed_XIAO_RP2040.build.variant=Seeed_XIAO_RP2040
######

Seeed_XIAO_RP2040.build.mcu=cortex-m0plus
Seeed_XIAO_RP2040.build.extra_flags=
Seeed_XIAO_RP2040.build.fpu=
Seeed_XIAO_RP2040.build.float-abi=
Seeed_XIAO_RP2040.build.architecture=cortex-m0plus
Seeed_XIAO_RP2040.build.board=SEEED_XIAO_RP2040
Seeed_XIAO_RP2040.build.ldscript=linker_script.ld
Seeed_XIAO_RP2040.compiler.mbed.arch.define=-DARDUINO_ARCH_RP2040
Seeed_XIAO_RP2040.compiler.mbed.defines={build.variant.path}/defines.txt
Seeed_XIAO_RP2040.compiler.mbed.ldflags={build.variant.path}/ldflags.txt
Seeed_XIAO_RP2040.compiler.mbed.cflags={build.variant.path}/cflags.txt
Seeed_XIAO_RP2040.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt
Seeed_XIAO_RP2040.compiler.mbed.includes={build.variant.path}/includes.txt
Seeed_XIAO_RP2040.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
Seeed_XIAO_RP2040.compiler.mbed="{build.variant.path}/libs/libmbed.a"
Seeed_XIAO_RP2040.vid.0=0x2886
Seeed_XIAO_RP2040.pid.0=0x8042
Seeed_XIAO_RP2040.upload_port.0.vid=0x2886
Seeed_XIAO_RP2040.upload_port.0.pid=0x8042
Seeed_XIAO_RP2040.upload.tool=picotool
Seeed_XIAO_RP2040.upload.tool.default=picotool
Seeed_XIAO_RP2040.upload.protocol=
Seeed_XIAO_RP2040.upload.transport=
Seeed_XIAO_RP2040.upload.use_1200bps_touch=true
Seeed_XIAO_RP2040.upload.wait_for_upload_port=false
Seeed_XIAO_RP2040.upload.native_usb=true
Seeed_XIAO_RP2040.upload.maximum_size=16777216
Seeed_XIAO_RP2040.upload.maximum_data_size=270336
Seeed_XIAO_RP2040.bootloader.tool=openocd
Seeed_XIAO_RP2040.bootloader.tool.default=openocd
Seeed_XIAO_RP2040.bootloader.config=-f target/rp2040.cfg
Seeed_XIAO_RP2040.bootloader.programmer=-f interface/cmsis-dap.cfg

##############################################################

menu.split=Flash split
WIO_RP2040_MINI_DEV_BOARD.name=Wio RP2040 Mini Dev Board
WIO_RP2040_MINI_DEV_BOARD.build.core=arduino
WIO_RP2040_MINI_DEV_BOARD.build.crossprefix=arm-none-eabi-
WIO_RP2040_MINI_DEV_BOARD.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
WIO_RP2040_MINI_DEV_BOARD.build.variant=WIO_RP2040_MINI_DEV_BOARD
WIO_RP2040_MINI_DEV_BOARD.build.mcu=cortex-m0plus
WIO_RP2040_MINI_DEV_BOARD.build.extra_flags=
WIO_RP2040_MINI_DEV_BOARD.build.fpu=
WIO_RP2040_MINI_DEV_BOARD.build.float-abi=
WIO_RP2040_MINI_DEV_BOARD.build.architecture=cortex-m0plus
WIO_RP2040_MINI_DEV_BOARD.build.board=WIO_RP2040_MINI_DEV_BOARD
WIO_RP2040_MINI_DEV_BOARD.build.ldscript=linker_script.ld
WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.arch.define=-DARDUINO_ARCH_RP2040
WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.defines={build.variant.path}/defines.txt
WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.ldflags={build.variant.path}/ldflags.txt
WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.cflags={build.variant.path}/cflags.txt
WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt
WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.includes={build.variant.path}/includes.txt
WIO_RP2040_MINI_DEV_BOARD.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
WIO_RP2040_MINI_DEV_BOARD.compiler.mbed="{build.variant.path}/libs/libmbed.a"
WIO_RP2040_MINI_DEV_BOARD.vid.0=0x2886
WIO_RP2040_MINI_DEV_BOARD.pid.0=0x8043
WIO_RP2040_MINI_DEV_BOARD.upload_port.0.vid=0x2886
WIO_RP2040_MINI_DEV_BOARD.upload_port.0.pid=0x8043
WIO_RP2040_MINI_DEV_BOARD.upload.tool=picotool
WIO_RP2040_MINI_DEV_BOARD.upload.tool.default=picotool
WIO_RP2040_MINI_DEV_BOARD.upload.protocol=
WIO_RP2040_MINI_DEV_BOARD.upload.transport=
WIO_RP2040_MINI_DEV_BOARD.upload.use_1200bps_touch=true
WIO_RP2040_MINI_DEV_BOARD.upload.wait_for_upload_port=false
WIO_RP2040_MINI_DEV_BOARD.upload.native_usb=true
WIO_RP2040_MINI_DEV_BOARD.upload.maximum_size=16777216
WIO_RP2040_MINI_DEV_BOARD.upload.maximum_data_size=270336
WIO_RP2040_MINI_DEV_BOARD.bootloader.tool=openocd
WIO_RP2040_MINI_DEV_BOARD.bootloader.tool.default=openocd
WIO_RP2040_MINI_DEV_BOARD.bootloader.config=-f target/rp2040.cfg
WIO_RP2040_MINI_DEV_BOARD.bootloader.programmer=-f interface/cmsis-dap.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#pragma once
#include <macros.h>
#include <stdint.h>

#ifndef __PINS_ARDUINO__
#define __PINS_ARDUINO__

#ifdef __cplusplus
extern "C" unsigned int PINCOUNT_fn();
#endif

// Pin count
// ----
#define PINS_COUNT (PINCOUNT_fn())
#define NUM_DIGITAL_PINS (30u)
#define NUM_ANALOG_INPUTS (4u)
#define NUM_ANALOG_OUTPUTS (0u)

extern PinName digitalPinToPinName(pin_size_t P);

// LEDs
// ----
#define PIN_LED (25u)
#define LED_BUILTIN PIN_LED

// Digital pins
// ----
#define PIN_D0 (26u)
#define PIN_D1 (27u)
#define PIN_D2 (28u)
#define PIN_D3 (29u)
#define PIN_D4 (6u)
#define PIN_D5 (7u)
#define PIN_D6 (0u)
#define PIN_D7 (1u)
#define PIN_D8 (2u)
#define PIN_D9 (4u)
#define PIN_D10 (3u)

static const uint8_t D0 = PIN_D0;
static const uint8_t D1 = PIN_D1;
static const uint8_t D2 = PIN_D2;
static const uint8_t D3 = PIN_D3;
static const uint8_t D4 = PIN_D4;
static const uint8_t D5 = PIN_D5;
static const uint8_t D6 = PIN_D6;
static const uint8_t D7 = PIN_D7;
static const uint8_t D8 = PIN_D8;
static const uint8_t D9 = PIN_D9;
static const uint8_t D10 = PIN_D10;


// Analog pins
// -----------
#define PIN_A0 (26u)
#define PIN_A1 (27u)
#define PIN_A2 (28u)
#define PIN_A3 (29u)

static const uint8_t A0 = PIN_A0;
static const uint8_t A1 = PIN_A1;
static const uint8_t A2 = PIN_A2;
static const uint8_t A3 = PIN_A3;

#define ADC_RESOLUTION 12

// Serial
#define PIN_SERIAL_TX (0ul)
#define PIN_SERIAL_RX (1ul)

// SPI
//#define PIN_SPI_MISO (16u)
//#define PIN_SPI_MOSI (19u)
//#define PIN_SPI_SCK (18u)
//#define PIN_SPI_SS (17u)
// KH fix wrong pin
#define PIN_SPI_MISO (D9)
#define PIN_SPI_MOSI (D10)
#define PIN_SPI_SCK (D8)
#define PIN_SPI_SS (D7)
//////

static const uint8_t SS = PIN_SPI_SS; // SPI Slave SS not used. Set here only for reference.
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;

// Wire
#define SDA (6u)
#define SCL (7u)

#define SERIAL_HOWMANY 1
#define SERIAL1_TX (digitalPinToPinName(PIN_SERIAL_TX))
#define SERIAL1_RX (digitalPinToPinName(PIN_SERIAL_RX))

#define SERIAL_CDC 1
#define HAS_UNIQUE_ISERIAL_DESCRIPTOR
#define BOARD_VENDORID 0x2886
#define BOARD_PRODUCTID 0x8042
#define BOARD_NAME "RaspberryPi Pico"

uint8_t getUniqueSerialNumber(uint8_t* name);
void _ontouch1200bps_();

#define SPI_HOWMANY (1)
#define SPI_MISO (digitalPinToPinName(PIN_SPI_MISO))
#define SPI_MOSI (digitalPinToPinName(PIN_SPI_MOSI))
#define SPI_SCK (digitalPinToPinName(PIN_SPI_SCK))

#define WIRE_HOWMANY (1)
#define I2C_SDA (digitalPinToPinName(SDA))
#define I2C_SCL (digitalPinToPinName(SCL))

#define digitalPinToPort(P) (digitalPinToPinName(P)/32)

#define SERIAL_PORT_USBVIRTUAL SerialUSB
#define SERIAL_PORT_MONITOR SerialUSB
#define SERIAL_PORT_HARDWARE Serial1
#define SERIAL_PORT_HARDWARE_OPEN Serial1

#define USB_MAX_POWER (500)

#endif //__PINS_ARDUINO__
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <inttypes.h>
#include <stdio.h> // for size_t
#include <stdarg.h> // for printf

#include "WString.h"
#include "Printable.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <inttypes.h>
#include <stdio.h> // for size_t
#include <stdarg.h> // for printf

#include "WString.h"
#include "Printable.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <inttypes.h>
#include <stdio.h> // for size_t
#include <stdarg.h> // for printf

#include "WString.h"
#include "Printable.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <inttypes.h>
#include <stdio.h> // for size_t
#include <stdarg.h> // for printf

#include "WString.h"
#include "Printable.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <inttypes.h>
#include <stdio.h> // for size_t
#include <stdarg.h> // for printf

#include "WString.h"
#include "Printable.h"
Expand Down
Loading

0 comments on commit 832a11b

Please sign in to comment.