forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2269 from theacodes/add-winterbloom-sol
Add board configuration for Winterbloom Sol
- Loading branch information
Showing
6 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* This file is part of the MicroPython project, http://micropython.org/ | ||
* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
#include "boards/board.h" | ||
#include "mpconfigboard.h" | ||
|
||
void board_init(void) { | ||
} | ||
|
||
bool board_requests_safe_mode(void) { | ||
return false; | ||
} | ||
|
||
void reset_board(void) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#define MICROPY_HW_BOARD_NAME "Winterbloom Sol" | ||
#define MICROPY_HW_MCU_NAME "samd51j20" | ||
|
||
#define CIRCUITPY_MCU_FAMILY samd51 | ||
|
||
#define MICROPY_HW_LED_STATUS (&pin_PA23) | ||
#define MICROPY_HW_NEOPIXEL (&pin_PB03) | ||
|
||
// These are pins not to reset. | ||
// QSPI Data pins | ||
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11) | ||
// QSPI CS, QSPI SCK and NeoPixel pin | ||
#define MICROPY_PORT_B (PORT_PB03 | PORT_PB10 | PORT_PB11) | ||
#define MICROPY_PORT_C (0) | ||
#define MICROPY_PORT_D (0) | ||
|
||
#define AUTORESET_DELAY_MS 500 | ||
|
||
// If you change this, then make sure to update the linker scripts as well to | ||
// make sure you don't overwrite code | ||
#define CIRCUITPY_INTERNAL_NVM_SIZE 8192 | ||
|
||
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) | ||
|
||
#define BOARD_HAS_CRYSTAL 1 | ||
|
||
#define DEFAULT_SPI_BUS_SCK (&pin_PA17) | ||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB23) | ||
#define DEFAULT_SPI_BUS_MISO (&pin_PB22) | ||
|
||
// USB is always used internally so skip the pin objects for it. | ||
#define IGNORE_PIN_PA24 1 | ||
#define IGNORE_PIN_PA25 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
LD_FILE = boards/samd51x20-bootloader-external-flash.ld | ||
# Adafruit | ||
USB_VID = 0x239A | ||
# Allocated for Winterbloom Sol | ||
# https://github.com/adafruit/circuitpython/issues/2217 | ||
USB_PID = 0x8062 | ||
USB_PRODUCT = "Sol" | ||
USB_MANUFACTURER = "Winterbloom" | ||
|
||
CHIP_VARIANT = SAMD51J20A | ||
CHIP_FAMILY = samd51 | ||
|
||
QSPI_FLASH_FILESYSTEM = 1 | ||
EXTERNAL_FLASH_DEVICE_COUNT = 1 | ||
EXTERNAL_FLASH_DEVICES = W25Q32JV_IQ | ||
LONGINT_IMPL = MPZ | ||
|
||
# Disable modules that are unusable on this special-purpose board. | ||
CIRCUITPY_AUDIOBUSIO = 0 | ||
CIRCUITPY_AUDIOIO = 0 | ||
CIRCUITPY_BLEIO = 0 | ||
CIRCUITPY_DISPLAYIO = 0 | ||
CIRCUITPY_GAMEPAD = 0 | ||
CIRCUITPY_I2CSLAVE = 0 | ||
CIRCUITPY_NETWORK = 0 | ||
CIRCUITPY_TOUCHIO = 0 | ||
CIRCUITPY_PS2IO = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "shared-bindings/board/__init__.h" | ||
|
||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = { | ||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, | ||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) }, | ||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) }, | ||
{ MP_ROM_QSTR(MP_QSTR_DAC_CS), MP_ROM_PTR(&pin_PA18) }, | ||
{ MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_PA20) }, | ||
{ MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_PA21) }, | ||
{ MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_PA22) }, | ||
{ MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_PA23) }, | ||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB03) }, | ||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, | ||
}; | ||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters