diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-01-05 17:39:10 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-01-05 18:49:38 +0800 |
| commit | a6440c00abbc30230f8a59c737e4ec55cb82a350 (patch) | |
| tree | 8f7da5640298a84eb202f995caa888bed0012180 | |
| parent | b10690f16d2b310221ffa7995e779f09d146f7f8 (diff) | |
| download | www-a6440c00abbc30230f8a59c737e4ec55cb82a350.tar.gz | |
Fix Arduino Due post, ol list css.
| -rw-r--r-- | _log/arduino-due.md | 70 | ||||
| -rw-r--r-- | _log/e-reader.md | 9 | ||||
| -rw-r--r-- | _log/neo4j-a-star-search.md | 2 | ||||
| -rw-r--r-- | _site/assets/css/skeleton.css | 2 | ||||
| -rw-r--r-- | _site/feed.xml | 2 | ||||
| -rw-r--r-- | _site/index.html | 6 | ||||
| -rw-r--r-- | _site/log/arduino-due/index.html | 71 | ||||
| -rw-r--r-- | _site/log/e-reader/index.html | 11 | ||||
| -rw-r--r-- | _site/log/neo4j-a-star-search/index.html | 4 | ||||
| -rw-r--r-- | _site/posts.xml | 2 | ||||
| -rw-r--r-- | _site/projects/index.html | 4 | ||||
| -rw-r--r-- | assets/css/skeleton.css | 2 |
12 files changed, 73 insertions, 112 deletions
diff --git a/_log/arduino-due.md b/_log/arduino-due.md index a0bfe4a..e24666c 100644 --- a/_log/arduino-due.md +++ b/_log/arduino-due.md @@ -1,17 +1,24 @@ --- -title: Bare-metal ATSAM3X8E +title: ATSAM3X8E bare-metal notes date: 2024-09-16 layout: post --- -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: <table style="border: none; width: 100%;"> <tr style="border: none;"> @@ -26,22 +33,7 @@ ST-LINK/V2 programmer, OpenOCD, ARM GNU Compiler Toolchain. </tr> </table> -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 @@ -50,35 +42,19 @@ $ 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](https://git.asciimx.com/bare-metal-arduino-due/commit/?id=318496925ca76668dd9d63c3d060376f489276f8) diff --git a/_log/e-reader.md b/_log/e-reader.md index 87417f7..69b1e96 100644 --- a/_log/e-reader.md +++ b/_log/e-reader.md @@ -1,5 +1,5 @@ --- -title: ESP32 prototype e-reader +title: 512 KB e-reader date: 2023-10-24 layout: post project: true @@ -15,9 +15,10 @@ First project with e-paper displays and ESP32. 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/_log/neo4j-a-star-search.md b/_log/neo4j-a-star-search.md index fe6f33f..de0ef25 100644 --- a/_log/neo4j-a-star-search.md +++ b/_log/neo4j-a-star-search.md @@ -1,5 +1,5 @@ --- -title: Neo4j shortest path optimization +title: 'Neo4J path traversal: A* optimization' date: 2018-03-06 layout: post --- diff --git a/_site/assets/css/skeleton.css b/_site/assets/css/skeleton.css index 90239a6..87b0050 100644 --- a/_site/assets/css/skeleton.css +++ b/_site/assets/css/skeleton.css @@ -291,6 +291,8 @@ ol ul { li { margin-bottom: 0.6rem; } +ol { + margin-left: 1.8em; } /* Code –––––––––––––––––––––––––––––––––––––––––––––––––– */ diff --git a/_site/feed.xml b/_site/feed.xml index 50fefd9..5d9d93f 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2026-01-05T16:42:22+08:00</updated><id>http://localhost:4000/feed.xml</id><title type="html">ASCIIMX | Log</title><author><name>W. D. Sadeep Madurange</name></author><entry><title type="html">Search engine (Perl + FastCGI + SA)</title><link href="http://localhost:4000/log/site-search/" rel="alternate" type="text/html" title="Search engine (Perl + FastCGI + SA)" /><published>2026-01-03T00:00:00+08:00</published><updated>2026-01-03T00:00:00+08:00</updated><id>http://localhost:4000/log/site-search</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Article count on the website is growing. Need a way to search.]]></summary></entry><entry><title type="html">Matrix Rain: 2025 refactor</title><link href="http://localhost:4000/log/matrix-digital-rain/" rel="alternate" type="text/html" title="Matrix Rain: 2025 refactor" /><published>2025-12-21T00:00:00+08:00</published><updated>2025-12-21T00:00:00+08:00</updated><id>http://localhost:4000/log/matrix-digital-rain</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[The 2022 version worked but had some loose ends. Unicode support was inflexible–couldn’t mix ASCII with Katakana; Phosphor decay was stored in a separate array when it should’ve been packed with RGB; Code was harder to read than it needed to be.]]></summary></entry><entry><title type="html">Fingerprint door lock (LP)</title><link href="http://localhost:4000/log/fpm-door-lock-lp/" rel="alternate" type="text/html" title="Fingerprint door lock (LP)" /><published>2025-08-18T00:00:00+08:00</published><updated>2025-08-18T00:00:00+08:00</updated><id>http://localhost:4000/log/fpm-door-lock-lp</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Second iteration of the RF door lock. Old version worked but drew too much quiescent current. Sensor and servo pulled 13.8mA and 4.6mA idle. Linear regulators were a disaster. Battery didn’t last 24 hours.]]></summary></entry><entry><title type="html">High-side MOSFET switching</title><link href="http://localhost:4000/log/mosfet-switches/" rel="alternate" type="text/html" title="High-side MOSFET switching" /><published>2025-06-22T00:00:00+08:00</published><updated>2025-06-22T00:00:00+08:00</updated><id>http://localhost:4000/log/mosfet-switches</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Needed low-power switching for the fingerprint door lock. Servo and FPM draw high quiescent current–had to cut power electronically during sleep. MOSFETs can do this.]]></summary></entry><entry><title type="html">ATmega328P at 3.3V and 5V</title><link href="http://localhost:4000/log/arduino-uno/" rel="alternate" type="text/html" title="ATmega328P at 3.3V and 5V" /><published>2025-06-10T00:00:00+08:00</published><updated>2025-06-10T00:00:00+08:00</updated><id>http://localhost:4000/log/arduino-uno</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Quick reference for wiring ATmega328P ICs at 5V and 3.3V. 5V uses 16MHz crystal, 3.3V uses 8MHz.]]></summary></entry><entry><title type="html">Fingerprint door lock (RF)</title><link href="http://localhost:4000/log/fpm-door-lock-rf/" rel="alternate" type="text/html" title="Fingerprint door lock (RF)" /><published>2025-06-05T00:00:00+08:00</published><updated>2025-06-05T00:00:00+08:00</updated><id>http://localhost:4000/log/fpm-door-lock-rf</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Wanted to unlock door with fingerprint, wirelessly to avoid drilling.]]></summary></entry><entry><title type="html">Bumblebee: browser automation</title><link href="http://localhost:4000/log/bumblebee/" rel="alternate" type="text/html" title="Bumblebee: browser automation" /><published>2025-04-02T00:00:00+08:00</published><updated>2025-04-02T00:00:00+08:00</updated><id>http://localhost:4000/log/bumblebee</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Built with Andy Zhang for an employer. Tool to automate web scraping script generation.]]></summary></entry><entry><title type="html">Bare-metal ATSAM3X8E</title><link href="http://localhost:4000/log/arduino-due/" rel="alternate" type="text/html" title="Bare-metal ATSAM3X8E" /><published>2024-09-16T00:00:00+08:00</published><updated>2024-09-16T00:00:00+08:00</updated><id>http://localhost:4000/log/arduino-due</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Notes on programming bare-metal ATSAM3X8E chips (Arduino Due) using Serial Wire Debug (SwD) protocol.]]></summary></entry><entry><title type="html">Etlas: e-paper dashboard</title><link href="http://localhost:4000/log/etlas/" rel="alternate" type="text/html" title="Etlas: e-paper dashboard" /><published>2024-09-05T00:00:00+08:00</published><updated>2024-09-05T00:00:00+08:00</updated><id>http://localhost:4000/log/etlas</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Repurposed e-reader prototype into something for regular use. News, stocks, weather dashboard. ESP32 NodeMCU D1 + 7.5” Waveshare e-paper + DHT22 sensor.]]></summary></entry><entry><title type="html">ESP32 prototype e-reader</title><link href="http://localhost:4000/log/e-reader/" rel="alternate" type="text/html" title="ESP32 prototype e-reader" /><published>2023-10-24T00:00:00+08:00</published><updated>2023-10-24T00:00:00+08:00</updated><id>http://localhost:4000/log/e-reader</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[First project with e-paper displays and ESP32.]]></summary></entry></feed>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2026-01-05T18:48:39+08:00</updated><id>http://localhost:4000/feed.xml</id><title type="html">ASCIIMX | Log</title><author><name>W. D. Sadeep Madurange</name></author><entry><title type="html">Search engine (Perl + FastCGI + SA)</title><link href="http://localhost:4000/log/site-search/" rel="alternate" type="text/html" title="Search engine (Perl + FastCGI + SA)" /><published>2026-01-03T00:00:00+08:00</published><updated>2026-01-03T00:00:00+08:00</updated><id>http://localhost:4000/log/site-search</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Article count on the website is growing. Need a way to search.]]></summary></entry><entry><title type="html">Matrix Rain: 2025 refactor</title><link href="http://localhost:4000/log/matrix-digital-rain/" rel="alternate" type="text/html" title="Matrix Rain: 2025 refactor" /><published>2025-12-21T00:00:00+08:00</published><updated>2025-12-21T00:00:00+08:00</updated><id>http://localhost:4000/log/matrix-digital-rain</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[The 2022 version worked but had some loose ends. Unicode support was inflexible–couldn’t mix ASCII with Katakana; Phosphor decay was stored in a separate array when it should’ve been packed with RGB; Code was harder to read than it needed to be.]]></summary></entry><entry><title type="html">Fingerprint door lock (LP)</title><link href="http://localhost:4000/log/fpm-door-lock-lp/" rel="alternate" type="text/html" title="Fingerprint door lock (LP)" /><published>2025-08-18T00:00:00+08:00</published><updated>2025-08-18T00:00:00+08:00</updated><id>http://localhost:4000/log/fpm-door-lock-lp</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Second iteration of the RF door lock. Old version worked but drew too much quiescent current. Sensor and servo pulled 13.8mA and 4.6mA idle. Linear regulators were a disaster. Battery didn’t last 24 hours.]]></summary></entry><entry><title type="html">High-side MOSFET switching</title><link href="http://localhost:4000/log/mosfet-switches/" rel="alternate" type="text/html" title="High-side MOSFET switching" /><published>2025-06-22T00:00:00+08:00</published><updated>2025-06-22T00:00:00+08:00</updated><id>http://localhost:4000/log/mosfet-switches</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Needed low-power switching for the fingerprint door lock. Servo and FPM draw high quiescent current–had to cut power electronically during sleep. MOSFETs can do this.]]></summary></entry><entry><title type="html">ATmega328P at 3.3V and 5V</title><link href="http://localhost:4000/log/arduino-uno/" rel="alternate" type="text/html" title="ATmega328P at 3.3V and 5V" /><published>2025-06-10T00:00:00+08:00</published><updated>2025-06-10T00:00:00+08:00</updated><id>http://localhost:4000/log/arduino-uno</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Quick reference for wiring ATmega328P ICs at 5V and 3.3V. 5V uses 16MHz crystal, 3.3V uses 8MHz.]]></summary></entry><entry><title type="html">Fingerprint door lock (RF)</title><link href="http://localhost:4000/log/fpm-door-lock-rf/" rel="alternate" type="text/html" title="Fingerprint door lock (RF)" /><published>2025-06-05T00:00:00+08:00</published><updated>2025-06-05T00:00:00+08:00</updated><id>http://localhost:4000/log/fpm-door-lock-rf</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Wanted to unlock door with fingerprint, wirelessly to avoid drilling.]]></summary></entry><entry><title type="html">Bumblebee: browser automation</title><link href="http://localhost:4000/log/bumblebee/" rel="alternate" type="text/html" title="Bumblebee: browser automation" /><published>2025-04-02T00:00:00+08:00</published><updated>2025-04-02T00:00:00+08:00</updated><id>http://localhost:4000/log/bumblebee</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Built with Andy Zhang for an employer. Tool to automate web scraping script generation.]]></summary></entry><entry><title type="html">ATSAM3X8E bare-metal notes</title><link href="http://localhost:4000/log/arduino-due/" rel="alternate" type="text/html" title="ATSAM3X8E bare-metal notes" /><published>2024-09-16T00:00:00+08:00</published><updated>2024-09-16T00:00:00+08:00</updated><id>http://localhost:4000/log/arduino-due</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Bypassing ATSAM3X8E (Due) bootloader via Serial Wire Debug (SWD).]]></summary></entry><entry><title type="html">Etlas: e-paper dashboard</title><link href="http://localhost:4000/log/etlas/" rel="alternate" type="text/html" title="Etlas: e-paper dashboard" /><published>2024-09-05T00:00:00+08:00</published><updated>2024-09-05T00:00:00+08:00</updated><id>http://localhost:4000/log/etlas</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[Repurposed e-reader prototype into something for regular use. News, stocks, weather dashboard. ESP32 NodeMCU D1 + 7.5” Waveshare e-paper + DHT22 sensor.]]></summary></entry><entry><title type="html">512 KB e-reader</title><link href="http://localhost:4000/log/e-reader/" rel="alternate" type="text/html" title="512 KB e-reader" /><published>2023-10-24T00:00:00+08:00</published><updated>2023-10-24T00:00:00+08:00</updated><id>http://localhost:4000/log/e-reader</id><author><name>W. D. Sadeep Madurange</name></author><summary type="html"><![CDATA[First project with e-paper displays and ESP32.]]></summary></entry></feed>
\ No newline at end of file diff --git a/_site/index.html b/_site/index.html index cce84be..5b62029 100644 --- a/_site/index.html +++ b/_site/index.html @@ -149,7 +149,7 @@ <tr> <td class="posts-td posts-td-link"> - <a href="/log/arduino-due/" class="link-decor-none">Bare-metal ATSAM3X8E</a> + <a href="/log/arduino-due/" class="link-decor-none">ATSAM3X8E bare-metal notes</a> </td> <td class="posts-td posts-td-time"> <span class="post-meta"> @@ -175,7 +175,7 @@ <tr> <td class="posts-td posts-td-link"> - <a href="/log/e-reader/" class="link-decor-none">ESP32 prototype e-reader</a> + <a href="/log/e-reader/" class="link-decor-none">512 KB e-reader</a> </td> <td class="posts-td posts-td-time"> <span class="post-meta"> @@ -188,7 +188,7 @@ <tr> <td class="posts-td posts-td-link"> - <a href="/log/neo4j-a-star-search/" class="link-decor-none">Neo4j shortest path optimization</a> + <a href="/log/neo4j-a-star-search/" class="link-decor-none">Neo4J path traversal: A* optimization</a> </td> <td class="posts-td posts-td-time"> <span class="post-meta"> 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 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Bare-metal ATSAM3X8E</title> + <title>ATSAM3X8E bare-metal notes</title> <link rel="stylesheet" href="/assets/css/main.css"> <link rel="stylesheet" href="/assets/css/skeleton.css"> </head> @@ -37,17 +37,26 @@ <main> <div class="container"> <div class="container-2"> - <h2 class="center" id="title">BARE-METAL ATSAM3X8E</h2> + <h2 class="center" id="title">ATSAM3X8E BARE-METAL NOTES</h2> <h5 class="center">16 SEPTEMBER 2024</h5> <br> - <div class="twocol justify"><p>Notes on programming bare-metal ATSAM3X8E chips (Arduino Due) using Serial Wire -Debug (SwD) protocol.</p> + <div class="twocol justify"><p>Bypassing ATSAM3X8E (Due) bootloader via Serial Wire Debug (SWD).</p> -<h2 id="toolchain">Toolchain</h2> +<p>Toolchain: ST-LINK/V2 programmer, OpenOCD, ARM GNU Compiler Toolchain.</p> -<p>ST-LINK/V2 programmer, OpenOCD, ARM GNU Compiler Toolchain.</p> +<p>ARM chips boot into 0x00000. GPNVM bits map one of ROM, flash0, flash1 to +0x00000:</p> -<h2 id="electrical-connections">Electrical connections</h2> +<ul> + <li>GPNVM1=0 → ROM (default).</li> + <li>GPNVM1=1 and GPNVM2=0 → flash0.</li> + <li>GPNVM1=1 and GPNVM2=1 → flash1.</li> +</ul> + +<p>By default, control jumps to Atmel’s SAM-BA bootloader in ROM. To bypass, set +GPNVM1=1 and place vector table at 0x80000 (flash0).</p> + +<p>Connect ST-LINK/v2 to Arduino Due’s DEBUG port:</p> <table style="border: none; width: 100%;"> <tr style="border: none;"> @@ -62,20 +71,7 @@ Debug (SwD) protocol.</p> </tr> </table> -<p>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.</p> - -<h2 id="upload-procedure">Upload procedure</h2> - -<p>Build. Magic is in the script.ld linker script.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -T script.ld \ - -nostartfiles \ - -nostdlib \ - -o a.elf main.c -</code></pre></div></div> - -<p>Upload using OpenOCD:</p> +<p>Remap memory:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ 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" </code></pre></div></div> -<p>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.</p> +<p>Full command list is in OpenOCD manual AT91SAM3 (flash driver section).</p> -<h2 id="gpnvm-bits">GPNVM bits</h2> +<p>Compile and upload program:</p> -<p>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.</p> - -<p>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.</p> - -<p>Program goes in flash0, so set GPNVM1=1 to boot our code instead of bootloader.</p> - -<h2 id="linker-script-notes">Linker script notes</h2> - -<p>Vector table must be at first flash address–required for ARM chips unless -relocated using VTOR register.</p> - -<p>First vector table entry: stack pointer. Initialize to highest memory location -(ATSAM3X8E has descending stack).</p> - -<p>Second entry: reset vector. Place initialization code here (zero memory, set -registers) before jumping to main().</p> +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ 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" +</code></pre></div></div> <p>Commit: <a href="https://git.asciimx.com/bare-metal-arduino-due/commit/?id=318496925ca76668dd9d63c3d060376f489276f8">3184969</a></p> 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 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>ESP32 prototype e-reader</title> + <title>512 KB e-reader</title> <link rel="stylesheet" href="/assets/css/main.css"> <link rel="stylesheet" href="/assets/css/skeleton.css"> </head> @@ -37,7 +37,7 @@ <main> <div class="container"> <div class="container-2"> - <h2 class="center" id="title">ESP32 PROTOTYPE E-READER</h2> + <h2 class="center" id="title">512 KB E-READER</h2> <h5 class="center">24 OCTOBER 2023</h5> <br> <div class="twocol justify"><p>First project with e-paper displays and ESP32.</p> @@ -49,9 +49,10 @@ <p>ESP-WROOM-32, 7.5” Waveshare e-paper display, three-button interface (prev/next/sleep).</p> -<p>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.</p> +<p>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.</p> <p>EBM format: Raw bitmap sequence. 1 byte = 8 pixels, 1 page = 48 KB (display resolution), headerless. Optimized for HTTP Range requests:</p> 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 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Neo4j shortest path optimization</title> + <title>Neo4J path traversal: A* optimization</title> <link rel="stylesheet" href="/assets/css/main.css"> <link rel="stylesheet" href="/assets/css/skeleton.css"> </head> @@ -37,7 +37,7 @@ <main> <div class="container"> <div class="container-2"> - <h2 class="center" id="title">NEO4J SHORTEST PATH OPTIMIZATION</h2> + <h2 class="center" id="title">NEO4J PATH TRAVERSAL: A* OPTIMIZATION</h2> <h5 class="center">06 MARCH 2018</h5> <br> <div class="twocol justify"><p>Work project. Marine vessel tracking with Neo4J hit a limit. Need to store diff --git a/_site/posts.xml b/_site/posts.xml index 75c68d1..2b2377d 100644 --- a/_site/posts.xml +++ b/_site/posts.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="http://localhost:4000/posts.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2026-01-05T16:42:22+08:00</updated><id>http://localhost:4000/posts.xml</id><title type="html">ASCIIMX</title><author><name>W. D. Sadeep Madurange</name></author></feed>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="http://localhost:4000/posts.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2026-01-05T18:48:39+08:00</updated><id>http://localhost:4000/posts.xml</id><title type="html">ASCIIMX</title><author><name>W. D. Sadeep Madurange</name></author></feed>
\ No newline at end of file diff --git a/_site/projects/index.html b/_site/projects/index.html index 6e6c5be..c87b2d7 100644 --- a/_site/projects/index.html +++ b/_site/projects/index.html @@ -103,8 +103,8 @@ <td class="project-item"> <a href="../log/e-reader" class="link-decor-none"> - <img src="../log/e-reader/thumb_sm.png" alt="ESP32 prototype e-reader"> - <h5>ESP32 prototype e-reader</h5> + <img src="../log/e-reader/thumb_sm.png" alt="512 KB e-reader"> + <h5>512 KB e-reader</h5> </a> </td> diff --git a/assets/css/skeleton.css b/assets/css/skeleton.css index 90239a6..87b0050 100644 --- a/assets/css/skeleton.css +++ b/assets/css/skeleton.css @@ -291,6 +291,8 @@ ol ul { li { margin-bottom: 0.6rem; } +ol { + margin-left: 1.8em; } /* Code –––––––––––––––––––––––––––––––––––––––––––––––––– */ |
