From a851a2d646f439f7126c232ba1524c55a8990872 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Fri, 9 Jan 2026 16:45:56 +0800 Subject: Remove _site from git. --- _site/log/arduino-due/connections.jpeg | Bin 29090 -> 0 bytes _site/log/arduino-due/index.html | 114 --------------------------------- _site/log/arduino-due/schematic.png | Bin 68688 -> 0 bytes _site/log/arduino-due/source.tar.gz | Bin 1174 -> 0 bytes 4 files changed, 114 deletions(-) delete mode 100644 _site/log/arduino-due/connections.jpeg delete mode 100644 _site/log/arduino-due/index.html delete mode 100644 _site/log/arduino-due/schematic.png delete mode 100644 _site/log/arduino-due/source.tar.gz (limited to '_site/log/arduino-due') diff --git a/_site/log/arduino-due/connections.jpeg b/_site/log/arduino-due/connections.jpeg deleted file mode 100644 index 081e6d4..0000000 Binary files a/_site/log/arduino-due/connections.jpeg and /dev/null differ diff --git a/_site/log/arduino-due/index.html b/_site/log/arduino-due/index.html deleted file mode 100644 index ed49e78..0000000 --- a/_site/log/arduino-due/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - ATSAM3X8E bare-metal notes - - - - - - - - - - - -
-
-
-

ATSAM3X8E BARE-METAL NOTES

-
16 SEPTEMBER 2024
-
-

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

- -

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:

- -
    -
  • 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:

- - - - - - -
- Pinout -

Wiring

-
- Circuit -

Arduino Due

-
- -

Remap memory:

- -
$ openocd -f openocd-due.cfg
-$ telnet localhost 4444
-  > halt
-  > at91sam3 gpnvm show
-  > at91sam3 gpnvm set 1
-  > at91sam3 gpnvm show
-
- -

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

- -

Compile and upload program:

- -
$ 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/arduino-due/schematic.png b/_site/log/arduino-due/schematic.png deleted file mode 100644 index 62ddadd..0000000 Binary files a/_site/log/arduino-due/schematic.png and /dev/null differ diff --git a/_site/log/arduino-due/source.tar.gz b/_site/log/arduino-due/source.tar.gz deleted file mode 100644 index 496567b..0000000 Binary files a/_site/log/arduino-due/source.tar.gz and /dev/null differ -- cgit v1.2.3