-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for the T-Echo w/ eInk display #254
Draft
mc-hamster
wants to merge
24
commits into
adafruit:master
Choose a base branch
from
meshtastic:adafruit-update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
9ccd333
add placeholder support for othernet PPR board
geeksville 718c310
Merge remote-tracking branch 'root/master'
geeksville 1d77daa
Place data from .uicrREGOUT0 into UICR.REGOUT0 flash word.
geeksville aba9b52
Update to lastest bootloader/tinyusb code, set regout0 to correct value
geeksville 0645700
Change SEGGER options to non blocking print.
geeksville da07b56
Do not merge: nasty hacks to make a prototype work
geeksville d6019de
Place data from .uicrREGOUT0 into UICR.REGOUT0 flash word.
geeksville 9478eb7
address comments from review (warn users, also support 833)
geeksville 778d229
Add support for RAK815 board from here:
geeksville 49865ce
Merge branch 'regout0'
geeksville 25e3f01
Fix RAK815 LEDs
geeksville 3987928
First attempt at TTGO eink bootloader
geeksville f6bfaac
Don't force CONFIG_GPIO_AS_PINRESET on all boards
geeksville 4f9022d
ttgo_eink bootloader is done (I think)
geeksville 69bd8eb
protect against buttons showing wrong values at power on
geeksville 4582f73
first cut of Othernet PPR1 bootloader
geeksville f38f8f4
Reenable using P0.18 as RESET on all boards
geeksville dd3e0e7
allow 200ms for caps to charge up to prevent false button readings
geeksville c01b9ea
Merge branch 'sd611'
geeksville b82b101
Merge branch 'master' of https://github.com/adafruit/Adafruit_nRF52_B…
mc-hamster 70aa829
Merge branch 'adafruit-master' into adafruit-update
mc-hamster d6fcd18
Merge branch 'adafruit:master' into adafruit-update
mc-hamster c58406b
Merge branch 'adafruit:master' into adafruit-update
mc-hamster 04cffee
Merge branch 'adafruit:master' into adafruit-update
mc-hamster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,22 @@ | ||
git submodule update --init --recursive | ||
|
||
npm install --global xpm | ||
xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest | ||
Installing globally in '/home/kevinh/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/9.2.1-1.1.1'... | ||
|
||
make BOARD=pca10056 all | ||
make BOARD=othernet_ppr all DEBUG=1 | ||
|
||
pip3 install --user adafruit-nrfutil | ||
|
||
# To program with jlink | ||
|
||
``` | ||
|
||
JLinkExe -device nrf52840_xxaa -if swd -speed 4000 -autoconnect 1 | ||
|
||
objdump -s ./_build/build-othernet_ppr/othernet_ppr_bootloader-0.3.2-108-g718c310-dirty_s140_6.1.1.hex | less | ||
|
||
|
||
nrfjprog -e -f nrf52; nrfjprog -f nrf52 --program ./_build/build-othernet_ppr/othernet_ppr_bootloader-0.3.2-*-dirty_s140_6.1.1.hex | ||
``` |
Submodule tinyusb
updated
1151 files
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
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,65 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2018 Ha Thach 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. | ||
*/ | ||
|
||
#ifndef PPR_H | ||
#define PPR_H | ||
|
||
/*------------------------------------------------------------------*/ | ||
/* LED | ||
*------------------------------------------------------------------*/ | ||
#define LEDS_NUMBER 2 | ||
#define LED_PRIMARY_PIN 0 | ||
#define LED_SECONDARY_PIN 1 | ||
#define LED_STATE_ON 1 | ||
|
||
/*------------------------------------------------------------------*/ | ||
/* BUTTON | ||
*------------------------------------------------------------------*/ | ||
#define BUTTONS_NUMBER 2 | ||
#define BUTTON_1 4 // center | ||
#define BUTTON_2 2 | ||
#define BUTTON_PULL \ | ||
NRF_GPIO_PIN_PULLUP // really should be NOPULL but the bootloader code only | ||
// checks for PULLUP vs PULLDOWN | ||
|
||
//--------------------------------------------------------------------+ | ||
// BLE OTA | ||
//--------------------------------------------------------------------+ | ||
#define BLEDIS_MANUFACTURER "Othernet" | ||
#define BLEDIS_MODEL "PPR" | ||
|
||
//--------------------------------------------------------------------+ | ||
// USB | ||
//--------------------------------------------------------------------+ | ||
|
||
#define USB_DESC_VID 0x239A | ||
#define USB_DESC_UF2_PID 0x0029 | ||
#define USB_DESC_CDC_ONLY_PID 0x0029 | ||
|
||
#define UF2_PRODUCT_NAME "Othernet PPR" | ||
#define UF2_VOLUME_LABEL "PPRBOOT " | ||
#define UF2_BOARD_ID "nRF52840-ppr-v1" | ||
#define UF2_INDEX_URL "https://www.meshtastic.org" | ||
|
||
#endif |
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 @@ | ||
MCU_SUB_VARIANT = nrf52840 |
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,22 @@ | ||
#include "boards.h" | ||
#include "uf2/configkeys.h" | ||
|
||
__attribute__((used, section(".bootloaderConfig"))) | ||
const uint32_t bootloaderConfig[] = | ||
{ | ||
/* CF2 START */ | ||
CFG_MAGIC0, CFG_MAGIC1, // magic | ||
5, 100, // used entries, total entries | ||
|
||
204, 0x100000, // FLASH_BYTES = 0x100000 | ||
205, 0x40000, // RAM_BYTES = 0x40000 | ||
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2 | ||
209, 0xada52840, // UF2_FAMILY = 0xada52840 | ||
210, 0x20, // PINS_PORT_SIZE = PA_32 | ||
|
||
0, 0, 0, 0, 0, 0, 0, 0 | ||
/* CF2 END */ | ||
}; | ||
|
||
__attribute__ ((section(".uicrREGOUT0"))) | ||
volatile uint32_t m_uicr_regout0 = 0xfffffff4; |
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,69 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2018 Ha Thach 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. | ||
*/ | ||
|
||
#ifndef OTHERNET_PPR1_H | ||
#define OTHERNET_PPR1_H | ||
|
||
/*------------------------------------------------------------------*/ | ||
/* LED | ||
*------------------------------------------------------------------*/ | ||
#define LEDS_NUMBER 2 | ||
#define LED_PRIMARY_PIN 25 // green | ||
#define LED_SECONDARY_PIN 11 // red | ||
#define LED_STATE_ON 1 | ||
|
||
/*------------------------------------------------------------------*/ | ||
/* BUTTON | ||
*------------------------------------------------------------------*/ | ||
#define BUTTONS_NUMBER 5 | ||
#define BUTTON_1 (2) | ||
#define BUTTON_2 (3) | ||
#define BUTTON_3 (4) | ||
#define BUTTON_4 (5) | ||
#define BUTTON_5 (6) | ||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP | ||
|
||
/// This is VUSB_EN, we need it forced high to power VBUS_nRF (hw bug) | ||
#define FORCE_HIGH 21 | ||
|
||
//--------------------------------------------------------------------+ | ||
// BLE OTA | ||
//--------------------------------------------------------------------+ | ||
#define BLEDIS_MANUFACTURER "othernet" | ||
#define BLEDIS_MODEL "ppr1" | ||
|
||
//--------------------------------------------------------------------+ | ||
// USB | ||
//--------------------------------------------------------------------+ | ||
|
||
#define USB_DESC_VID 0x239A | ||
#define USB_DESC_UF2_PID 0x0029 | ||
#define USB_DESC_CDC_ONLY_PID 0x0029 | ||
|
||
#define UF2_PRODUCT_NAME "PPR1" | ||
#define UF2_VOLUME_LABEL "PPR1Boot " | ||
#define UF2_BOARD_ID "othernet-ppr1" | ||
#define UF2_INDEX_URL "https://othernet.is/ppr1" | ||
|
||
#endif |
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 @@ | ||
MCU_SUB_VARIANT = nrf52833 |
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,22 @@ | ||
#include "boards.h" | ||
#include "uf2/configkeys.h" | ||
|
||
__attribute__((used, section(".bootloaderConfig"))) | ||
const uint32_t bootloaderConfig[] = | ||
{ | ||
/* CF2 START */ | ||
CFG_MAGIC0, CFG_MAGIC1, // magic | ||
5, 100, // used entries, total entries | ||
|
||
204, 0x80000, // FLASH_BYTES = 0x100000 | ||
205, 0x20000, // RAM_BYTES = 0x40000 | ||
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2 | ||
209, 0xada52840, // UF2_FAMILY = 0xada52840 | ||
210, 0x20, // PINS_PORT_SIZE = PA_32 | ||
|
||
0, 0, 0, 0, 0, 0, 0, 0 | ||
/* CF2 END */ | ||
}; | ||
|
||
// We want output pin voltages to be 3.3V | ||
__attribute__((section(".uicrREGOUT0"))) volatile uint32_t m_uicr_regout0 = 0xfffffff5; |
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,62 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2018 Ha Thach 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. | ||
*/ | ||
|
||
#ifndef _RAK815_H | ||
#define _RAK815_H | ||
|
||
/*------------------------------------------------------------------*/ | ||
/* LED | ||
*------------------------------------------------------------------*/ | ||
#define LEDS_NUMBER 2 | ||
#define LED_PRIMARY_PIN 25 | ||
#define LED_SECONDARY_PIN 26 | ||
#define LED_STATE_ON 1 | ||
|
||
/*------------------------------------------------------------------*/ | ||
/* BUTTON | ||
*------------------------------------------------------------------*/ | ||
#define BUTTONS_NUMBER 2 | ||
#define BUTTON_1 27 | ||
#define BUTTON_2 24 | ||
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP | ||
|
||
/*------------------------------------------------------------------*/ | ||
/* UART (only used by nRF52832) | ||
*------------------------------------------------------------------*/ | ||
#define RX_PIN_NUMBER 28 | ||
#define TX_PIN_NUMBER 29 | ||
#define CTS_PIN_NUMBER 0 | ||
#define RTS_PIN_NUMBER 0 | ||
#define HWFC false | ||
|
||
//--------------------------------------------------------------------+ | ||
// BLE OTA | ||
//--------------------------------------------------------------------+ | ||
#define BLEDIS_MANUFACTURER "RAK" | ||
#define BLEDIS_MODEL "RAK815" | ||
|
||
#define UF2_PRODUCT_NAME "RAK815" | ||
#define UF2_INDEX_URL "https://store.rakwireless.com/products/rak815-hybrid-location-tracker" | ||
|
||
#endif // _RAK815_H |
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,2 @@ | ||
# nrf52 is nrf52832 | ||
MCU_SUB_VARIANT = nrf52 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure you are making PR to this repo and not other fork ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good eye.
I started the PR as a draft to take advantage of the CI tests here but would eventually submit it here.
We’re running this through a few tests at the moment and will take it out of draft once we have confidence and I will write up the change description.
Thanks!