|
35 | 35 | # D42(btn) GND
|
36 | 36 |
|
37 | 37 | # unfitted big flash-ish chip
|
38 |
| -# o D14 NC? |
| 38 | +# o D14 VCC |
39 | 39 | # D15 D17
|
40 | 40 | # D2 D19
|
41 | 41 | # GND D18
|
|
61 | 61 | 'espruino_page_link' : '',
|
62 | 62 | 'default_console' : "EV_BLUETOOTH",
|
63 | 63 | 'variables' : 5000, # How many variables are allocated for Espruino to use. RAM will be overflowed if this number is too high and code won't compile.
|
64 |
| - 'io_buffer_size' : 512, # How big is the input buffer (in 4 byte words). Default on nRF52 is 256 |
| 64 | + 'io_buffer_size' : 512, |
65 | 65 | 'bootloader' : 1,
|
66 | 66 | 'binary_name' : 'espruino_%v_dickens.hex',
|
67 | 67 | 'build' : {
|
68 | 68 | 'optimizeflags' : '-Os',
|
69 | 69 | 'libraries' : [
|
70 | 70 | 'BLUETOOTH',
|
71 | 71 | 'GRAPHICS',
|
72 |
| - 'LCD_SPI' |
| 72 | + 'LCD_SPI', |
| 73 | + 'JIT' |
73 | 74 | ],
|
74 | 75 | 'makefile' : [
|
75 | 76 | # 'DEFINES += -DNRF_LOG_ENABLED=1 -DNRF_LOG_FILTERS_ENABLED=0',
|
76 |
| - 'DEFINES += -DCONFIG_NFCT_PINS_AS_GPIOS', # Allow the reset pin to work |
| 77 | + 'DEFINES += -DCONFIG_NFCT_PINS_AS_GPIOS', # Allow us to use NFC pins as GPIO |
| 78 | + 'DEFINES += -DESPR_LSE_ENABLE=1', # Ensure low speed external osc enabled |
| 79 | + 'DEFINES += -DNRF_SDH_BLE_GATT_MAX_MTU_SIZE=131', # 23+x*27 rule as per https://devzone.nordicsemi.com/f/nordic-q-a/44825/ios-mtu-size-why-only-185-bytes |
| 80 | + 'LDFLAGS += -Xlinker --defsym=LD_APP_RAM_BASE=0x2ec0', # set RAM base to match MTU |
| 81 | +# 'DEFINES += -DESPR_REGOUT0_1_8V=1', # Leave REGOUT0 as 1.8v (not 3.3v) - seems to be what original watch firmware did |
| 82 | + 'DEFINES += -DESPR_DCDC_ENABLE=1', # Use DC/DC converter |
| 83 | + 'ESPR_BLUETOOTH_ANCS=1', # Enable ANCS (Apple notifications) support |
| 84 | + 'DEFINES += -DSPIFLASH_SLEEP_CMD', # SPI flash needs to be explicitly slept and woken up |
| 85 | + 'DEFINES += -DSPIFLASH_READ2X', # Read SPI flash at 2x speed using MISO and MOSI for IO |
| 86 | + 'DEFINES += -DESPR_USE_SPI3=1', # Use SPI3 (even though it has errata 195) as it's much faster |
| 87 | + 'DEFINES += -DESPR_BACKLIGHT_FADE=1', # Smoothly fade backlight on and off |
77 | 88 | 'DEFINES += -DNRF_BL_DFU_ENTER_METHOD_BUTTON=1 -DNRF_BL_DFU_ENTER_METHOD_BUTTON_PIN=29',
|
| 89 | + 'DEFINES += -DNRF_BOOTLOADER_NO_WRITE_PROTECT=1', # By default the bootloader protects flash. Avoid this (a patch for NRF_BOOTLOADER_NO_WRITE_PROTECT must be applied first) |
78 | 90 | 'DEFINES += -DBUTTONPRESS_TO_REBOOT_BOOTLOADER',
|
79 | 91 | 'DEFINES += -DESPR_BOOTLOADER_SPIFLASH', # Allow bootloader to flash direct from SPI flash
|
| 92 | + 'DEFINES += -DAPP_TIMER_OP_QUEUE_SIZE=6', # Bangle.js accelerometer poll handler needs something else in queue size |
80 | 93 |
|
81 | 94 | 'BOOTLOADER_SETTINGS_FAMILY = NRF52840',
|
82 | 95 | 'DFU_PRIVATE_KEY=targets/nrf5x_dfu/dfu_private_key.pem',
|
|
85 | 98 | 'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'"Dickens"\'',
|
86 | 99 | 'DEFINES+=-DCUSTOM_GETBATTERY=jswrap_banglejs_getBattery',
|
87 | 100 | 'DEFINES+=-DDUMP_IGNORE_VARIABLES=\'"g\\0"\'',
|
| 101 | + 'DEFINES+=-DESPR_GRAPHICS_INTERNAL=1', |
88 | 102 | 'DEFINES+=-DUSE_FONT_6X8 -DGRAPHICS_PALETTED_IMAGES -DESPR_GRAPHICS_12BIT -DGRAPHICS_ANTIALIAS',
|
89 | 103 | 'DEFINES+=-DNO_DUMP_HARDWARE_INITIALISATION', # don't dump hardware init - not used and saves 1k of flash
|
90 |
| - 'INCLUDE += -I$(ROOT)/libs/banglejs -I$(ROOT)/libs/misc', |
| 104 | + 'INCLUDE += -I$(ROOT)/libs/banglejs -I$(ROOT)/libs/dickens -I$(ROOT)/libs/misc', |
91 | 105 | 'WRAPPERSOURCES += libs/banglejs/jswrap_bangle.c',
|
| 106 | + 'WRAPPERSOURCES += libs/dickens/jswrap_dickens.c', |
92 | 107 | 'WRAPPERSOURCES += libs/graphics/jswrap_font_architekt10.c',
|
| 108 | + 'WRAPPERSOURCES += libs/graphics/jswrap_font_architekt12.c', |
93 | 109 | 'WRAPPERSOURCES += libs/graphics/jswrap_font_architekt15.c',
|
94 | 110 | 'WRAPPERSOURCES += libs/graphics/jswrap_font_architekt35.c',
|
95 | 111 | 'WRAPPERSOURCES += libs/graphics/jswrap_font_grotesk14.c',
|
| 112 | + 'WRAPPERSOURCES += libs/graphics/jswrap_font_grotesk16.c', |
| 113 | + 'WRAPPERSOURCES += libs/graphics/jswrap_font_grotesk20.c', |
| 114 | + 'SOURCES += libs/graphics/line_font.c', |
| 115 | + 'SOURCES += libs/misc/stepcount.c', |
96 | 116 | 'JSMODULESOURCES += libs/js/banglejs/locale.min.js',
|
97 | 117 | 'DEFINES += -DBANGLEJS',
|
| 118 | + 'DEFINES += -DESPR_NO_LOADING_SCREEN', # disable 'loading...' message when switching apps |
98 | 119 |
|
99 | 120 | 'NRF_SDK15=1'
|
100 | 121 | ]
|
|
115 | 136 | 'adc' : 1,
|
116 | 137 | 'dac' : 0,
|
117 | 138 | 'saved_code' : {
|
118 |
| -# 'address' : ((246 - 10) * 4096), # Bootloader takes pages 248-255, FS takes 246-247 |
119 |
| -# 'page_size' : 4096, |
120 |
| -# 'pages' : 10, |
121 |
| -# 'flash_available' : 1024 - ((31 + 8 + 2 + 10)*4) # Softdevice uses 31 pages of flash, bootloader 8, FS 2, code 10. Each page is 4 kb. |
| 139 | + # 'address' : ((246 - 10) * 4096), # Bootloader takes pages 248-255, FS takes 246-247 |
| 140 | + # 'page_size' : 4096, |
| 141 | + # 'pages' : 10, |
| 142 | + # 'flash_available' : 1024 - ((31 + 8 + 2 + 10)*4) # Softdevice uses 31 pages of flash, bootloader 8, FS 2, code 10. Each page is 4 kb. |
122 | 143 | 'address' : 0x60000000, # put this in external spiflash (see below)
|
123 | 144 | 'page_size' : 4096,
|
124 | 145 | 'pages' : 768, # 3MB of 4MB flash
|
|
143 | 164 | 'pin_mosi' : 'D5',
|
144 | 165 | 'pin_miso' : 'D27',
|
145 | 166 | 'pin_en' : 'D43',
|
146 |
| - 'pin_bl' : 'D33', # TESTED! |
| 167 | + 'pin_bl' : 'D33', # Also enables the power supply for the vibration motor |
147 | 168 | 'bitrate' : 32000000
|
148 | 169 | },
|
149 | 170 | 'BAT' : {
|
|
0 commit comments