This file contains hidden or 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
#!/bin/false | |
# -*- coding: utf8 -*- | |
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers | |
# | |
# Copyright (C) 2013 Gordon Williams <[email protected]> | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# |
This file contains hidden or 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
E.kickWatchdog(); | |
function KickWd(){ | |
if( (typeof(BTN1)=='undefined')||(!BTN1.read()) ) E.kickWatchdog(); | |
} | |
var wdint=setInterval(KickWd,2000); | |
E.enableWatchdog(15, false); | |
// MIT License (c) 2020 fanoush https://github.com/fanoush | |
// see full license text at https://choosealicense.com/licenses/mit/ | |
// SPI display driver below compiled with options LCD_BPP=12 |
This file contains hidden or 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
diff --git a/targetlibs/nrf5x_12/components/libraries/bootloader/dfu/nrf_dfu_utils.c b/targetlibs/nrf5x_12/components/libraries/bootloader/dfu/nrf_dfu_utils.c | |
index 6da88aa9..5ba66f3d 100644 | |
--- a/targetlibs/nrf5x_12/components/libraries/bootloader/dfu/nrf_dfu_utils.c | |
+++ b/targetlibs/nrf5x_12/components/libraries/bootloader/dfu/nrf_dfu_utils.c | |
@@ -461,10 +461,11 @@ uint32_t nrf_dfu_continue(uint32_t * p_enter_dfu_mode) | |
bool nrf_dfu_app_is_valid(void) | |
{ | |
NRF_LOG_INFO("Enter nrf_dfu_app_is_valid\r\n"); | |
- if (s_dfu_settings.bank_0.bank_code != NRF_DFU_BANK_VALID_APP && | |
+ if (s_dfu_settings.bank_0.bank_code != NRF_DFU_BANK_VALID_APP ^M |
This file contains hidden or 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
function KickWd(){ | |
if(!BTN1.read())E.kickWatchdog(); | |
} | |
var wdint=setInterval(KickWd,5000); // 5 secs | |
E.enableWatchdog(20, false); // 20 secs | |
E.kickWatchdog(); | |
/* | |
// MIT License (c) 2020 fanoush https://github.com/fanoush | |
// see full license text at https://choosealicense.com/licenses/mit/ | |
var SPI2 = E.compiledC(` |
This file contains hidden or 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
E.kickWatchdog(); | |
function KickWd(){ | |
if( (typeof(BTN1)=='undefined')||(!BTN1.read()) ) E.kickWatchdog(); | |
} | |
var wdint=setInterval(KickWd,2000); | |
E.enableWatchdog(15, false); | |
// set name to F10 | |
// NRF.setAdvertising({},{name:"F10 "+NRF.getAddress().split(':').slice(-2).join('')}); | |
var SPI2 = (function(){ | |
var bin=atob("AAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////8QtQNMfEQigGCAoYDjgBC92P///wdLe0QbiUOxBEoTaAAr/NAAIxNgA0p6RBOBcEcYMQJAxv///7L///8t6fBHkEYZTBlO//fl/xlK3/hkwAAjASUTYE/w/w5TYKlGI2AQMh9G/ykA6wMKwvgAoIu//zMxYMb4AOAAIYi//znM+ACQuPEADwbQKbkLS3tEHYEAIL3o8IfU+ACguvEAD/rQJ2AAKd7R8+cYMQJASDUCQDQ1AkAQMAJAUP///y3p8E+bsM3pARJQSnpEBkaS+ACQACgA8JGAACkA8I6ACfH/MwcrAPKJgAEjA/oJ8wE727IDkwR4Q3iXiETqAyQCmxxB02gA8QILpLILsT1KE2BP6kkD27IEkz1Le0QRqAWTCKvN6QYwT/AACEFGBZsCnbP4AqADmwGaI0BE+gn0MvgTwAObI0BE+gn0MvgTIASbHUTtsgctQNiksk/qLBNDVBMSAfECDkPqDBxDGAMxqvECCiMpg/gBwB/6ivoA+A4gCd0BIv/3W//Y8QEIC78HmAaYQUYAIbrxAA/L0R1Le0QBP9uIHkS/snN4NHhE6gMkApscQQbxAguksgAvttHJsTpG//c8/xNLe0TYaBCxDUsYYAAgG7C96PCP3kYIPR74ATvtssXxCAsD+gvzHEOksvN |
This file contains hidden or 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
// -- 1. copy paste methods for flash writing and verification below to Espruino WebIDE left side | |
E.setFlags({unsafeFlash:1}); | |
var fl=require("Flash"); | |
var ladd=0;var lpg=0;var nadd=0;// last address, last page addr, next addr | |
var flash=function(a,d){ | |
if (nadd>0 && nadd<a) console.log("Hole in data, got "+a.toString(16)+", expected "+nadd.toString(16)); | |
var p=fl.getPage(a).addr; | |
if (p>lpg) {fl.erasePage(p);lpg=p;console.log("Erasing page 0x"+p.toString(16));} | |
p=fl.getPage(a+d.length-1).addr; | |
if (p>lpg) {fl.erasePage(p);lpg=p;console.log("Erasing page 0x"+p.toString(16));} |
This file contains hidden or 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
diff --git a/targets/nrf5x/bluetooth.c b/targets/nrf5x/bluetooth.c | |
index e5aa77d5..5f15e041 100644 | |
--- a/targets/nrf5x/bluetooth.c | |
+++ b/targets/nrf5x/bluetooth.c | |
@@ -2489,6 +2489,7 @@ void jsble_restart_softdevice() { | |
jshUtilTimerDisable(); // don't want the util timer firing during this! | |
JsSysTime lastTime = jshGetSystemTime(); | |
jsble_kill(); | |
+ jsvUnLock(jspEvaluate("if(typeof(NRF.onRestart)=='function')NRF.onRestart();",true)); | |
jsble_init(); |
This file contains hidden or 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
E.kickWatchdog(); | |
function KickWd(){ | |
if( (typeof(BTN1)=='undefined')||(!BTN1.read()) ) E.kickWatchdog(); | |
} | |
var wdint=setInterval(KickWd,2000); | |
E.enableWatchdog(15, false); | |
/* | |
// MIT License (c) 2020 fanoush https://github.com/fanoush | |
// see full license text at https://choosealicense.com/licenses/mit/ | |
var SPI2 = E.compiledC(` |
This file contains hidden or 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
#Format=Hex | |
#Depth=256 | |
#Width=32 | |
#AddrRadix=3 | |
#DataRadix=3 | |
#Data | |
C88CFCFA | |
C08ED88E | |
00BCD08E | |
E7C033FC |
This file contains hidden or 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
diff -Naur Next186_SoC.orig/186Code/BIOS/bootload_BIOS_SD/bootstrap.asm Next186_SoC/186Code/BIOS/bootload_BIOS_SD/bootstrap.asm | |
--- Next186_SoC.orig/186Code/BIOS/bootload_BIOS_SD/bootstrap.asm 2016-09-26 14:42:28.401003600 +0200 | |
+++ Next186_SoC/186Code/BIOS/bootload_BIOS_SD/bootstrap.asm 2018-02-14 22:57:25.033245500 +0100 | |
@@ -95,32 +95,29 @@ | |
call sdinit_ | |
test ax, ax | |
jz short RS232 | |
- mov dx, ax | |
+ mov dx, ax ; first try to read bios from end of card | |
shr dx, 6 |