Sparkfun edge bootloader problem... not working

993 Views Asked by At

Hi I've been going through a sparkfun edge person-detection programming tutorial in here. (The code given in the github link was deprecated so I used the codes inside the tensorflow_lite library. They had example codes in there already)

The tutorial seemed to be quite clear and easy, however I'm always getting this error when I try to upload the sketch.

Artemis SVL Bootloader
Script version 1.7

Phase:  Setup
    Cleared startup blip
Failed to enter bootload phase

Phase:  Setup
    Cleared startup blip
Failed to enter bootload phase

Phase:  Setup
    Cleared startup blip
Failed to enter bootload phase
Target failed to enter bootload mode. Verify the right COM port is selected and that your board has the SVL bootloader.

Then I've realized that even a plain(the initial sketch you get when you make a new sketch) sketch wouldn't get uploaded spitting out exactly the same error message.

My setup:

  • new Macbook Pro (and also Gentoo linux on my desktop and windows10 in virtualBox)
  • Sparkfun serial basic breakout (default jumped to 3v3)
  • FTDI 3v3 serial cable

The setups that I have Tried: \

  • Linux x86_64 (Gentoo Linux) -> also reinstalled the CH341SER driver.

  • Mac os Catalina(10.15.6) -> again also reinstalled the CH340 driver according to this stackoverflow answer

  • Windows10 (in a virtualBox on the Gentoo Linux Destktop)

  • I've tried using not only the latest libraries and apollo3 board manager(1.1.2), but also earlier ones(1.0.30 and below).

  • Tried changing the baud rate to every possible rate given as an option.

  • I tried using the Ambiq Secure Bootloader instead of SVL and when I do it spits out this message.(Bellow error message was in Linux, but got same error in Mac OS as well)

Connecting over serial port /dev/ttyUSB0...
Sending Hello.
No response for command 0x00000000
Failed to respond
Fail
Sending Hello.
No response for command 0x00000000
Failed to respond
Fail
Sending Hello.
No response for command 0x00000000
Failed to respond
Fail
Tries = 3
Upload failed
  • also tried resetting the board(so that led light wouldn't blink anymore) before uploading the sketch file.

Could the board may have been faulty from the beginning? The default micro speech inference seems to work as it reacts to "yes" and "no". Googling couldn't help me with this problem... I've been trying to make this work for days now... Do you think there is any other possibilities to fix the problem?

2

There are 2 best solutions below

0
On

Try reducing the serial speed from 921600 to 115200. Worked for me on arduino as well as in the SDK.

make BOARD=$YOUR_BOARD bootload_svl COM_PORT=/dev/ttyUSB0 SVL_UPLOAD_BAUD=115200
Makefile:112: Using BOARD=redboard_artemis_atp at ../../../../redboard_artemis_atp
Makefile:121: warning: you have not defined PYTHON3. assuming it is accessible by 'python3'
Makefile:125: defaulting to 115200 baud for ASB
Makefile:134: warning: you have not defined SDKPATH so will continue assuming that the SDK root is at ../../../../..
Makefile:142: warning: you have not defined COMMONPATH so will continue assuming that the COMMON root is at ../../../../common
Makefile:163: warning: you have not defined PROJECTPATH so will continue assuming that the PROJECT root is at ..
Makefile:170: CONFIG=../gcc/redboard_artemis_atp/bin
python3 ../../../../common/tools_sfe/svl/svl.py /dev/ttyUSB0 -f ../gcc/redboard_artemis_atp/bin/blinky_svl.bin -b 115200 -v


Artemis SVL Bootloader
Script version 1.7

Phase:  Setup
    Cleared startup blip
    Got SVL Bootloader Version: 3
    Sending 'enter bootloader' command

Phase:  Bootload
    have 4824 bytes to send in 3 frames
    Sending frame #1, length: 2048
    Sending frame #2, length: 2048
    Sending frame #3, length: 728

    Upload complete

    Nominal bootload bps: 9724.7

enter image description here

0
On

The Edge board as shipped from SparkFun does not have the SVL bootloader. Your first error messages indicate trying to use the SVL loader to flash the code. This should not happen when you have the Edge selected as your board in Arduino unless you manually changed the 'bootloader' option in the tools menu.

You should also be weary of what baud rate your Ambiq Secure Bootloader is set to use. You say you bought the board last week - all boards sold via SparkFun.com are set to 921600 baud for the ASB bootloader. Ensure the correct option is selected in the Arduino tools menu.

When you do use the ASB bootloader (default for Edge) you must force the board into bootloading mode with Button 14. The board will go into bootload mode when button 14 is pressed while the board is reset. The upload tools will reset the board automatically, so you must be sure to hold Button 14 when uploading with the ASB. You optionally can do a manual cycle (hold 14, press reset, keep holding 14 while upload) in case the board has a lot of serial traffic.

Once that is working you may also upgrade to the SVL (doing so requires flashing an image using the ASB). When using the SVL do not use the reset bootload sequence.