GithubHelp home page GithubHelp logo

countmurphy / doorwaytoheaven Goto Github PK

View Code? Open in Web Editor NEW
12.0 5.0 3.0 7.6 MB

A gate to other worlds

License: MIT License

CMake 0.23% Batchfile 0.04% Shell 0.01% C 72.23% Assembly 1.97% C++ 25.51%

doorwaytoheaven's Introduction

Gate Badge

gate

This is the Stargate badge for DEF con 27. Building the source and flashing instructions located in the Read Me file under software

built with:

  • kicad
  • GCC
  • ZPM
  • Love <3

doorwaytoheaven's People

Contributors

countmurphy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

doorwaytoheaven's Issues

what am I doing wrong?

First of all, I wanted to let you know this is a kick ass badge. I love it, and it has inspired me to give openocd / gdb / JTAG / ARM micro programming another shot.

I'm still learning how to use all these (new to me) tools and since you made it look so easy to use openocd to upload new firmware to my badge at Defcon, I figured I would try to replicate it!

The first problem I encountered was with step 2 of your build instructions readme: cd "laser-tag software"
Can I assume that is supposed to be a cd back to DoorwayToHeaven/software/? That is what I ended up trying, and it seemed to spit out valid bin, hex, elf and map files for both release and debug. I then attempted to follow the instructions to load (both debug and release) Stargate.elf with openocd / gdb.

Everything seemed to work (no obvious errors, see outputs below) but the result is the badge now does nothing, no reaction to button press, even after removing and replacing batteries. Is the code in this master branch the same as the binary you loaded up at Defcon? Can you provide me with a "known working" compiled firmware I can try and test if the problem is with my SWD setup?

I am using a slightly different SWD programmer than you are, a FT2232H Mini Module.

Here is my openocd config "stargate.cfg" file:

$ cat stargate.cfg 
interface ftdi
transport select swd
ftdi_vid_pid 0x0403 0x6010
ftdi_channel 0
ftdi_layout_init 0x0018 0x05fb
ftdi_layout_signal SWD_EN -data 0
ftdi_layout_signal nSRST -data 0x0010
#-------------------------------------
set CHIPNAME kl27
source [find target/klx.cfg]
$_TARGETNAME configure -event reset-init {
    adapter_khz 1000
}
#reset_config srst_only

Console #1

$ sudo /usr/local/bin/openocd -f stargate.cfg
Open On-Chip Debugger 0.10.0+dev-00924-g16496488 (2019-08-18-20:51)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
Info : add flash_bank kinetis kl27.pflash
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x0bc11477
Info : MDM: Chip is unsecured. Continuing.
Info : kl27.cpu: hardware has 2 breakpoints, 2 watchpoints
Info : kl27.cpu: external reset detected
Info : Listening on port 3333 for gdb connections

Console #2

$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> reset halt
MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000514 msp: 0x20006000
> 

Console #3

$ arm-none-eabi-gdb -x gdb.init release/Stargate.elf 
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/me/Downloads/DoorwayToHeaven/software/release/Stargate.elf...done.
The target architecture is assumed to be arm
0x00000514 in Reset_Handler ()
(gdb) load
Loading section .interrupts, size 0xc0 lma 0x0
Loading section .flash_config, size 0x10 lma 0x400
Loading section .text, size 0x5c68 lma 0x410
Loading section .ARM, size 0x8 lma 0x6078
Loading section .init_array, size 0x4 lma 0x6080
Loading section .fini_array, size 0x4 lma 0x6084
Loading section .data, size 0x1dc lma 0x6088
Start address 0x514, load size 24356
Transfer rate: 28 KB/sec, 3044 bytes/write.
(gdb) monitor reset
MDM: Chip is unsecured. Continuing.
(gdb) 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.