Coder Social home page Coder Social logo

adafruit_nrf51822_flasher's People

Contributors

hathach avatar microbuilder avatar

Stargazers

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

Watchers

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

adafruit_nrf51822_flasher's Issues

Flashing problem with Rasp 2 GPIO

I try to flash a firmware for Adafruit Bluefruit LE UART Friend module
https://www.adafruit.com/product/2479
I made the connection same as instruction.
SWD (BLE) connect to PIN24(GPIO)
SWC (BLE) connect to PIN25(GPIO)
FCR (Factory Reset - BLE) connect to PIN18(GPIO)
GND (BLE) connect to GND (GPIO)

The comment I use
sudo python flash.py --jtag=rpigpio --board=blefriend32 --softdevice=8.0.0 --bootloader=2 --firmware=0.6.5

But no luck, the flash was failed
Here is the log.txt

BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
swd
0
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 1001 kHz
Info : SWD IDCODE 0x0004d414
Error: Target not examined yet
in procedure 'reset'
in procedure 'ocd_bouncer'

Could you please help me to find the problems?
Thank you very much.

Question: How to generate signature.hex

Hello. I was wondering if there's a guide for generating the signature.hex file for custom firmware. I'd like to build some of my own stuff for the blefruit using s120/s130 etc.

Or, is it possible to flash it with the RBL MK20usb? I'm considering trying it but I don't know if I need to change the bootloader or something along those lines in order to get the RBL style drag and drop/arduino programming methods to work.

Thanks!

Add BLESNIFFER as a board target?

It might be useful to add BLESNIFFER as a board to flash devices with the sniffer firmware since this would allow customers to debrick their own boards? Perhaps we can just ignore the other fields if BLESNIFFER is provided as the board type?

sudo python flash.py --jtag=rpigpio --board=blesniffer

When flashing the sniffer, the board should be erased first since no bootloader or SD are required.

Faulty chips pass undetected

Hello, I'm writing this after one of the two Bluefruit LE UART Friends came completely dead.

What:
Me and my team are trying to setup a wireless link using two of such modules to achieve remote sensing for an exam project and bla bla bla...

I know they can't work in central mode and we should have chosen something else, but we were in a tremendous hurry. Long story short, I'm re-flashing them with a spare ST-LINKv2 I own and the setup is working perfectly with one of the modules.

Once happy with some tests, I moved on to setup the second one, just to find out this module showed no sign of life, no blinks, no signal... just dead. So I promptly cranked up openocd, searching for some signs on the chip's ECG...

Insight:
OpenOCD started without complaining and I could reset init the chip succesfully.
Then I issued an nrf51 mass_erase command, getting back an error about an unrecognized device of HWID 0x000000d6.

Left in despair, I tried to flash my firmware anyway... no error, none at all, and my problem was solved! But that quirk left me wondering about future failure possibilities...
Fast-forwarding all my searches, turns out 0x00d6 is not a valid Hardware ID among nRF51822s (the other one being a proper 0x0083, as of src/flash/nor/nrf5.c from the OpenOCD source code)

I suppose the flashings went okay just because ihex files contain addresses from a well set up toolchain already and do not need extra info like the chip ID.

TL;DR
As you say in the tutorial page, nRF51822 Flasher is a tool you use in production, so a proper check at this stage

flash_status = subprocess.call(openocd_cmd + ' -c init -c "reset init" -c halt -c "nrf51 mass_erase"' +
' -c "program ' + softdevice_hex + ' verify"' +
' -c "program ' + bootloader_hex + ' verify"' +
' -c "program ' + firmware_hex + ' verify"' +
' -c "program ' + signature_hex + ' verify"' +
' -c reset -c exit', shell=True if platform.system() != 'Windows' else False)

may help you spotting failed chips long before they go on a trip around the world.

Maybe just manually re-flashing would do for some customers, but a bad factory-written register suggests there's more trouble to come...

Hope this can help!

Original Source And Build Method

This is a great project and has been very helpful. But OpenOCD is open source and you have not indicated how to rebuild that source from scratch. This is not a distribution of source, but of binaries.

I don't care about GPL requirements, but I really need the source, with the revision history(git), and the method used to build this, so I can fix issues that come up.

Can you please provide?

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.