From a6440c00abbc30230f8a59c737e4ec55cb82a350 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Mon, 5 Jan 2026 17:39:10 +0800 Subject: Fix Arduino Due post, ol list css. --- _site/log/arduino-due/index.html | 71 +++++++++++--------------------- _site/log/e-reader/index.html | 11 ++--- _site/log/neo4j-a-star-search/index.html | 4 +- 3 files changed, 33 insertions(+), 53 deletions(-) (limited to '_site/log') diff --git a/_site/log/arduino-due/index.html b/_site/log/arduino-due/index.html index d9cc946..ed49e78 100644 --- a/_site/log/arduino-due/index.html +++ b/_site/log/arduino-due/index.html @@ -3,7 +3,7 @@ - Bare-metal ATSAM3X8E + ATSAM3X8E bare-metal notes @@ -37,17 +37,26 @@
-

BARE-METAL ATSAM3X8E

+

ATSAM3X8E BARE-METAL NOTES

16 SEPTEMBER 2024

-

Notes on programming bare-metal ATSAM3X8E chips (Arduino Due) using Serial Wire -Debug (SwD) protocol.

+

Bypassing ATSAM3X8E (Due) bootloader via Serial Wire Debug (SWD).

-

Toolchain

+

Toolchain: ST-LINK/V2 programmer, OpenOCD, ARM GNU Compiler Toolchain.

-

ST-LINK/V2 programmer, OpenOCD, ARM GNU Compiler Toolchain.

+

ARM chips boot into 0x00000. GPNVM bits map one of ROM, flash0, flash1 to +0x00000:

-

Electrical connections

+
    +
  • GPNVM1=0 → ROM (default).
  • +
  • GPNVM1=1 and GPNVM2=0 → flash0.
  • +
  • GPNVM1=1 and GPNVM2=1 → flash1.
  • +
+ +

By default, control jumps to Atmel’s SAM-BA bootloader in ROM. To bypass, set +GPNVM1=1 and place vector table at 0x80000 (flash0).

+ +

Connect ST-LINK/v2 to Arduino Due’s DEBUG port:

@@ -62,20 +71,7 @@ Debug (SwD) protocol.

-

Arduino Due exposes the ATSAM3X8E’s SWD interface via its DEBUG port. The -ST-LINK/v2 programmer connects to that to communicate with the chip.

- -

Upload procedure

- -

Build. Magic is in the script.ld linker script.

- -
$ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -T script.ld \
-    -nostartfiles \
-    -nostdlib \
-    -o a.elf main.c
-
- -

Upload using OpenOCD:

+

Remap memory:

$ openocd -f openocd-due.cfg
 $ telnet localhost 4444
@@ -83,35 +79,18 @@ $ telnet localhost 4444
   > at91sam3 gpnvm show
   > at91sam3 gpnvm set 1
   > at91sam3 gpnvm show
-$ openocd -f openocd-due.cfg -c "program a.elf verify reset exit"
 
-

First command starts OpenOCD. Telnet session halts chip, checks GPNVM bit. If -unset (returns 0), set to 1 and verify. Final command uploads program. See -OpenOCD manual AT91SAM3 flash driver section for full command list.

+

Full command list is in OpenOCD manual AT91SAM3 (flash driver section).

-

GPNVM bits

+

Compile and upload program:

-

ARM chips boot into address 0x00000. ATSAM3X8E has ROM and dual-banked flash -(flash0/flash1) at different addresses. GPNVM bits control which maps to -0x00000.

- -

GPNVM1 cleared (default): boots from ROM (Atmel SAM-BA bootloader). GPNVM1=1, -GPNVM2=0: flash0 (0x80000) maps to 0x00000. Both cleared: flash1 maps to -0x00000.

- -

Program goes in flash0, so set GPNVM1=1 to boot our code instead of bootloader.

- -

Linker script notes

- -

Vector table must be at first flash address–required for ARM chips unless -relocated using VTOR register.

- -

First vector table entry: stack pointer. Initialize to highest memory location -(ATSAM3X8E has descending stack).

- -

Second entry: reset vector. Place initialization code here (zero memory, set -registers) before jumping to main().

+
$ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -T script.ld \
+    -nostartfiles \
+    -nostdlib \
+    -o a.elf main.c
+$ openocd -f openocd-due.cfg -c "program a.elf verify reset exit"
+

Commit: 3184969

diff --git a/_site/log/e-reader/index.html b/_site/log/e-reader/index.html index 41f58ff..33c08d2 100644 --- a/_site/log/e-reader/index.html +++ b/_site/log/e-reader/index.html @@ -3,7 +3,7 @@ - ESP32 prototype e-reader + 512 KB e-reader @@ -37,7 +37,7 @@
-

ESP32 PROTOTYPE E-READER

+

512 KB E-READER

24 OCTOBER 2023

First project with e-paper displays and ESP32.

@@ -49,9 +49,10 @@

ESP-WROOM-32, 7.5” Waveshare e-paper display, three-button interface (prev/next/sleep).

-

Memory: 512KB SRAM + 4MB flash–insufficient for local library. Streams via -HTTP Range requests over WiFi. Reading progress saved to RTC memory; persists -through deep sleep.

+

Memory: 512KB SRAM + 4MB flash. Internal 4 MB flash unsuitable for storing +books due to P/E cycle limits. HTTP Range requests for on-demand bitmap +streaming. Progress saved to RTC memory to survive deep sleep without flash +wear.

EBM format: Raw bitmap sequence. 1 byte = 8 pixels, 1 page = 48 KB (display resolution), headerless. Optimized for HTTP Range requests:

diff --git a/_site/log/neo4j-a-star-search/index.html b/_site/log/neo4j-a-star-search/index.html index c8c4ce6..152531d 100644 --- a/_site/log/neo4j-a-star-search/index.html +++ b/_site/log/neo4j-a-star-search/index.html @@ -3,7 +3,7 @@ - Neo4j shortest path optimization + Neo4J path traversal: A* optimization @@ -37,7 +37,7 @@
-

NEO4J SHORTEST PATH OPTIMIZATION

+

NEO4J PATH TRAVERSAL: A* OPTIMIZATION

06 MARCH 2018

Work project. Marine vessel tracking with Neo4J hit a limit. Need to store -- cgit v1.2.3