ESP32 update problems

Sysprogs forums Forums VisualGDB ESP32 update problems

This topic contains 13 replies, has 2 voices, and was last updated by  Frank 10 months, 3 weeks ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #9942

    Frank
    Participant

    I had a working project in VS, after the updated I had to fix a few errors before being able to build without errors. After fixing the errors, I am unable to flash the esp32 over jtag.

    I started a new clean msbuild project that builds and flashes ok but gives an error while running:

    I tried to make a new clean GNUMake project but that just creates build errors caused by undefined references to ethernet functions.
    I cannot remove ethernet framework since it is baked into the esp32 event default event handler.

    Any ideas?

    #9943

    support
    Keymaster

    Hi,

    If you are getting build errors, most likely the toolchain got corrupt, so removing and reinstalling it should help.

    FLASH reading errors are tougher and could indicate a dead chip. During our tests with ESP8266 three different boards routinely died under different circumstances, so we would suggest simply getting another one.

    #9953

    Frank
    Participant

    I can build, just had to fix a few things.
    The chip isn’t dead, I have programmed the chip over serial using a binary from an old project.

    My project wouldn’t program over jtag so I tried a clean project. In the clean project I can flash the chip through jtag but it goes into that guru meditation error.
    The chip and the debugger are working perfectly.

    I removed the esp32 toolchain and downloaded it again but with the same results.

    • This reply was modified 11 months, 1 week ago by  Frank.
    #9967

    support
    Keymaster

    Hi,

    Sorry about that. First of all please note that the ESP32 chip is very new and often behaves unpredictably, so this is to be expected.

    Our best advice here would be to try something very simple and see if this works. Does building and programming a basic “LEDBlink” project with VisualGDB work? If no, does flashing the same ELF file with esptool.py work?

    If you can confirm that the file built with VisualGDB does not work even when flashed with esptool, please ensure that you are using an unmodified toolchain from us and that the optimization is set to -Og, not -O0.

    #9975

    Frank
    Participant

    I already made a blink example, flashing works but running causes the following problem:

    I have a Virtual machine running with visualgdb before the update, there it works fine without a problem.
    Can I uninstall visualgdb and install a older version, and copy the esp32-bsp from my virtual machine?
    On the virtual machine I have a other problem though, but ill make another thread about that.

    #9979

    support
    Keymaster

    Hi,

    It could be caused by updating the ESP32 IDF then.

    You can try the older version by downloading the older toolchain from here: http://gnutoolchains.com/esp32/. There is no need to reinstall VisualGDB.

    #10035

    Frank
    Participant

    It was the -Og flag forgot it in the new project.
    But now that I have a working project and copied all my sources from my old project I’m presented with my first problem.
    I’m using a library. When I enable the library my flash grows from 10 to 15% and I’m unable to flash the device.

    I am able to flash the program without the library and I am able to flash it with the library over my usb-serial.
    But flashing with the library though the jtag debugger gives me this error:

    #10045

    support
    Keymaster

    Hi,

    Thanks, we can certainly investigate this. Please let us know whether you get an error during the FLASH programming or it succeeds, but then the firmware fails to start?

    If the programming succeeds, but the program does not start, please try reading the FLASH contents via esptool, then program the image via esptool and re-read the FLASH contents. Then please compare the FLASH contents after programming with VisualGDB and with esptool.py and let us know the difference.

    If the programming fails, please attach a screenshot showing the error so that we could know where exactly it happens.

    #10064

    Frank
    Participant

    this error occurs during the flashing of the device and does not succeed.

    Screenshot:
    https://1drv.ms/i/s!ArGQV6ObDq-t2SVmLSfc_BQhw0pq

    error message:

    visualgdb remote console output:
    http://pastebin.com/WNWrDye1

    • This reply was modified 11 months ago by  Frank.
    #10077

    support
    Keymaster

    Hi,

    Thanks for the detailed reply, this explains where the problem happens.

    Looks like the code responsible for erasing the FLASH memory does not work properly. Could you confirm that he same happens with a basic “LEDBlink” application that is artificially made larger by adding code like this:

    #10098

    Frank
    Participant

    The same does not happen when adding the code to “LEDBlink” example project.

    The same does however happen with the BLE Advertisement example project.

    #10114

    Frank
    Participant

    not working logs: http://pastebin.com/AUYRLb2g
    working logs: http://pastebin.com/AUYRLb2g
    diff: http://pastebin.com/AUYRLb2g

    it seems only cpu0 has halted in the notworking logs?

    I would really like to figure this one out, manually halting and programming is becoming a pain.

    #10128

    support
    Keymaster

    Hi,

    Thanks, we have managed to reproduce this and it simply looks like the FLASH erase takes longer than the default timeout of 5 seconds.

    Increasing the timeout to 10 seconds solved the problem in our setup. We will update the default timeout in the next toolchain release. As a workaround, please increase it manually by adding the following element to your .vgdbsettings file inside the DebugMethodProperties/Entries element:

    #10130

    Frank
    Participant

    Thanks!

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.