Giter Site home page Giter Site logo

esp8266-arm-swd's People

Contributors

ierwinde avatar scanlime 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  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

esp8266-arm-swd's Issues

Flashing K20 (Teensy 3.1) MCU using your code

Hi,

thank you very much for making this public. I have built a custom Teensy reference board and wrote about it in my blog (http://www.appfruits.com/2015/03/building-your-own-custom-teensy/). While I actually really love the Teensy I would like to build a board without the boot loader MCU.

What I want to build is an ESP8266 which is able to download a firmware for the K20 MCU and flash it with SWD. I found your code which looks like to actually do that, but I don't get it working.

I am not sure which init function (there are a few like startup, begin, init) I need to use to get the K20 in the correct state. When beginning flashing I receive error message that flash is not ready for mass erasing. When I add a few delays I sometimes get an AP polling error.

Any help would be appreciated.

Thanks,
Phillip

Errors flashing STM32 using ARMDebug

Hello,

first of all: Thank you for this project! It has helped me a lot on my first deepdive into the world of microcontrollers.

I am trying to flash an STM32 ARM microcontroller from an ESP32 and your ARMDebug Class has gotten me quite far.
I can connect, unlock the flash, mass erase and I can programm individual parts of the flash.
But when I try to write a whole 32KB of Firmware the flash process fails after a while and I have not found a way to recover from that.

I was hoping that maybe you could give me a hint what I should be looking for in the documentation or to debug the code, even though this is not about the MC you are using in your project.

This is the main loop that writes to the flash:

  for (size_t i = 0; i < bufferSize; i +=4) {
    waitbusy();
    writePG1();
    uint32_t data = *((uint32_t*)(buffer + i));
    Serial.println(String(i) + " writing: 0x" + String(FLASH_OFFSET + i, HEX)+":0x"+String(data, HEX));
    memStore(FLASH_OFFSET + i, data);
    waitbusy();
    uint32_t temp;
    memLoad(FLASH_OFFSET + i, temp);
    if(temp!=data){
      handleFault();
      Serial.println(String(i) + " verify failed. expected: 0x" + String(data, HEX) + " read: " + String(temp,HEX) + " retrying");
      i-=4;
    }
  }

in the beginning the write and verify succeeds. After ~2000 operations I am occasionally getting parity errors:
PARITY ERROR during read (addr=0 APnDP=1 data=63000052)
ARMDebug: Error while waiting for memory port

those seem to be resolved by the retry mechanism.

But shortly after (~2500 operations in) I am endlessly getting errors like:
PROTOCOL ERROR response during read (ack=3 addr=c APnDP=0)
ARMDebug: Error while waiting for memory port

Retrying obviously does not solve the issue the STM has at that point.

Do you have any idea how I can find out whats blocking the flash operations at this point and how it can be resolved?

Best regards

Ier

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.