Skip to content

Commit

Permalink
V1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
felias-fogg committed Jan 26, 2022
1 parent f05752d commit 2252dd0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
12 changes: 9 additions & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,12 @@ Version 0.9.9 (14-Nov-21)

## Version 1.3.5 (23-Jan-22)

- Put unittest.ino back into main file (at the end)
- Created dw-link.h with all function declarations and included this into dw-link.ino
- Removed loop+setup and included main instead; now one has a perfectly valid C++ source code file
- put unittest.ino back into main file (at the end)
- created dw-link.h with all function declarations and included this into dw-link.ino
- removed loop+setup and included main instead; now one has a perfectly valid C++ source code file

## Version 1.3.6 (26-Jan-22)

- added init() to main: now dw-link starts up again and works
- minimized code of DWreadSramByte by calling DWreadSramBytes with length=1
- disabled millis-IRQ again (was still on by accident)
2 changes: 0 additions & 2 deletions docs/wishlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
verify/noverify". Could be on or off by default.
* implement simple ISP programmer (again)
* using unused serial interface on Arduino Mega and Leonardo boards
* only get PC & SP when stopped and show in T-record, this could speed up
conditional breakpoints ~~a lot~~ somewhat
18 changes: 15 additions & 3 deletions dw-link/dw-link.ino
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
// For the latter, I experienced non-deterministic failures of unit tests.
// So, it might be worthwhile to investigate both, but not now.

#define VERSION "1.3.5"
#define VERSION "1.3.6"

#ifndef NANOVERSION
#define NANOVERSION 3
Expand Down Expand Up @@ -524,6 +524,12 @@ void unblockIRQ(void)

/******************* main ******************************/
int main(void) {
// Arduino init
init();
#if defined(USBCON)
USBDevice.attach();
#endif

// setup
Serial.begin(INITIALBPS);
pinMode(SNSGND, INPUT_PULLUP);
Expand All @@ -539,7 +545,7 @@ int main(void) {
Serial1.begin(115200);
Serial.println(F("dw-link V" VERSION));
#endif
//TIMSK0 = 0; // no millis interrupts
TIMSK0 = 0; // no millis interrupts
ctx.hostbps = INITIALBPS;
ctx.von = false;
ctx.vhigh = false;
Expand All @@ -564,7 +570,7 @@ int main(void) {
#endif
DEBLN(F("Setup done"));

// main loop
// loop
while (1) {
monitorSystemLoadState();
configureSupply();
Expand Down Expand Up @@ -592,6 +598,7 @@ int main(void) {
}
}
}
return 0;
}

/****************** system state routines ***********************/
Expand Down Expand Up @@ -2939,6 +2946,10 @@ void DWwriteIOreg (byte ioreg, byte val)
// Read one byte from SRAM address space using an SRAM-based value for <addr>, not an I/O address
byte DWreadSramByte (unsigned int addr) {
byte res = 0;

#if 1
DWreadSramBytes(addr, &res, 1);
#else
unsigned int response;
byte rdSram[] = {0x66, // Set up for read/write
0xD0, mcu.stuckat1byte, 0x1E, // Set Start Reg number (r30)
Expand All @@ -2957,6 +2968,7 @@ byte DWreadSramByte (unsigned int addr) {
response = getResponse(&res,1);
unblockIRQ();
if (response != 1) reportFatalError(SRAM_READ_FATAL,true);
#endif
return res;
}

Expand Down

0 comments on commit 2252dd0

Please sign in to comment.