Comments: Using SparkFun Edge Board with Ambiq Apollo3 SDK

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Looking for technical assistance? Try checking out the Edge Troubleshooting thread on the SparkFun Forums to post a question and for the most up-to-date information.

  • Hello, I tried to do the exemple make bootload with ubuntu 19.04 and the 18.4 but it is not working, but it work with windows. Here the error I get :

    ../../../../../tools/apollo3_scripts/create_cust_image_blob.py --bin bin/example1_edge_test.bin --load-address 0xC000 --magic-num 0xCB -o bin/main_nonsecure_ota --version 0x0 Header Size = 0x80 original app_size 0x487c ( 18556 ) load_address 0xc000 ( 49152 ) app_size 0x487c ( 18556 ) w0 = 0xcb0048fc Security Value 0x10 w2 = 0x10008080 addrWord = 0xc000 versionKeyWord = 0x0 child0/feature = 0xffffffff child1 = 0xffffffff crc = 0x6addcfd1 Writing to file bin/main_nonsecure_ota.bin ../../../../../tools/apollo3_scripts/create_cust_wireupdate_blob.py --load-address 0x20000 --bin bin/main_nonsecure_ota.bin -i 6 -o bin/main_nonsecure_wire --options 0x1 Header Size = 0x60 app_size 0x48fc ( 18684 ) Writing to file bin/main_nonsecure_wire.bin Image from 0x0 to 0x48fc will be loaded at 0x20000 ../../../bsp/tools/uart_wired_update_sparkfun.py -b 921600 /dev/ttyUSB0 -r 1 -f bin/main_nonsecure_wire.bin -i 6 Connecting with Corvette over serial port /dev/ttyUSB0... Sending Hello. No response for command 0x00000000 received bytes 48 ['0x86', '0xd5', '0xa4', '0x80', '0x5', '0x83', '0x80', '0xc0', '0x84', '0x82', '0x80', '0x87', '0x80', '0x81', '0x80', '0xff', '0x5c', '0xe9', '0xff', '0x25', '0x80', '0x20', '0x80', '0x83', '0xfc', '0xb2', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff'] Traceback (most recent call last): File "../../../bsp/tools/uart_wired_update_sparkfun.py", line 341, in <module> main() File "../../../bsp/tools/uart_wired_update_sparkfun.py", line 42, in main connect_device(ser) File "../../../bsp/tools/uart_wired_update_sparkfun.py", line 61, in connect_device response = send_command(hello, 88, ser) File "../../../bsp/tools/uart_wired_update_sparkfun.py", line 238, in send_command raise NoResponseError main.NoResponseError make: *** [Makefile:197: bootload] Error 1

    Does someone have an idea ? Thanks

    • Have you looked in the forums? There is an extensive thread on this subject there :) (See top-voted post for links)

      • I did but I find nothing that solve my issue

        • Hi there, if you can't find a topic relating to your issue on that thread, you will need to post a new topic regarding your issue.

          I'm not very familiar with the Edge board in particular, but it does sound like your issue might be related to this forum thread. Otherwise, post a new topic and our technical support team will do what they can to assist. The engineer on the Edge board does monitor that forum topic as well.

  • Many thanks for help Liquid. I have it up and running now.

  • Hello, i am trying to setup the build environment. I have git bash installed, I have python 3.7 installed, GNU Tools ARM Embedded for windows 7 and later installed, these are in my path as well. I have AmbiqSuite installed in D drive and under that i have boards folder where i have place SparkFun_Edge_BSP (which i have renamed from SparkFun_Edge_BSP-master) . I am trying to make example1_edge_test. I am getting the following error. $ make C:/Users/DigitalDesigner/AppData/Roaming/GNU MCU Eclipse/Build Tools/2.12-20190422-1053/bin/make -C ../../../bsp make[1]: Entering directory 'D:/AmbiqSuite-Rel2.0.0/boards/SparkFun_Edge_BSP/bsp' make[1]: *** No rule to make target 'config.ini', needed by 'buildproj'. Stop. make[1]: Leaving directory 'D:/AmbiqSuite-Rel2.0.0/boards/SparkFun_Edge_BSP/bsp' make: *** [Makefile:187: ../../../bsp/gcc/bin/libam_bsp.a] Error 2 Looking for advice

    • You may need to generate the BSP library archives. Try navigating to {SDK_ROOT}/boards/SparkFun_Edge_BSP/bsp/gcc and running make. This should generate the necessary libraries. Then you can try making the example again. HTH

  • hi, I try to test the first example but it did work, I have this:

    Connecting with Corvette over serial port COM4... Sending Hello. No response for command 0x00000000 Traceback (most recent call last): File "C:\Users\tharmika\AmbiqSuite-Rel2.0.0_XKzAWog\AmbiqSuite-Rel2.0.0\boards\SparkFun_Edge_BSP-master\bsp\tools\uart_wired_update_sparkfun.py", line 341, in <module> main() File "C:\Users\tharmika\AmbiqSuite-Rel2.0.0_XKzAWog\AmbiqSuite-Rel2.0.0\boards\SparkFun_Edge_BSP-master\bsp\tools\uart_wired_update_sparkfun.py", line 42, in main connect_device(ser) File "C:\Users\tharmika\AmbiqSuite-Rel2.0.0_XKzAWog\AmbiqSuite-Rel2.0.0\boards\SparkFun_Edge_BSP-master\bsp\tools\uart_wired_update_sparkfun.py", line 61, in connect_device response = send_command(hello, 88, ser) File "C:\Users\tharmika\AmbiqSuite-Rel2.0.0_XKzAWog\AmbiqSuite-Rel2.0.0\boards\SparkFun_Edge_BSP-master\bsp\tools\uart_wired_update_sparkfun.py", line 238, in send_command raise NoResponseError main.NoResponseError make: *** [Makefile:197: bootload] Error 1

    I am sure my devise is in COM 4. Does anyone have an idea?

    • Hmm. It appears you are using windows which is surprising because the driver issues (also on the SparkFun forums for Edge board)have mostly appeared on Mac and Linux.

      Some things to check are that you're using the correct baud rate (115200 if you got your board at the TensorFlow conference and 921600 otherwise) and that you're following the proper bootloading button sequence. That is:

      • Hold down button 14
      • While holding button 14 press and release the reset button
      • While holding button 14 run 'make bootload' on the computer
      • When prompted with 'done, sending reset command' press reset to begin the application

      If those steps don't work out please check out the resources in the SparkFun Forums for Edge

  • Setup on windows Git-bash can have issues running Python (https://stackoverflow.com/questions/32597209/python-not-working-in-the-command-line-of-git-bash/49384676).

    The simplest way to deal with this, the renaming to Python 3 and ensuring that the right version of bash gets invoked is probably to configure a .bashrc in ~ (%USERHOME%). I use something like this (I have a specific Anaconda environment for Edge).

    alias python='winpty /c/apps/Anaconda3-51/envs/edge/python.exe'
    alias python3='winpty /c/apps/Anaconda3-51/envs/edge/python.exe'
    alias bash='winpty /c/Program Files/Git/git-bash.exe'
    

  • I am working on Ubuntu 18.04LTS, and following is error message with $make bootload for the first example. In short, the board is not responding at the start of flshaing. karama0 addressed in his/her comment that it might ,be an issue of ch341 device driver. I am working on Anaconda 3 python 3.7.3, pyserial 3.4. Any other flashing tool I can try? I was able to upload program with Arudino IDE to ESP32 and ESP8266 so it's not easy to spot what is wrong with ch341Nte ... Note: I just renamed the flashing program and changed bps to the default. So please do not address on the name of flashing program.

    ../../../bsp/tools/uart_sparkfun.py /dev/ttyUSB0 -r 1 -f bin/main_nonsecure_wire.bin -i 6 Connecting with Corvette over serial port /dev/ttyUSB0... Sending Hello. No response for command 0x00000000 Traceback (most recent call last): File "../../../bsp/tools/uart_sparkfun.py", line 341, in <module> main() File "../../../bsp/tools/uart_sparkfun.py", line 42, in main connect_device(ser) File "../../../bsp/tools/uart_sparkfun.py", line 61, in connect_device response = send_command(hello, 88, ser) File "../../../bsp/tools/uart_sparkfun.py", line 238, in send_command raise NoResponseError main.NoResponseError Makefile:194: recipe for target 'bootload' failed make: *** [bootload] Error 1

  • Some issues:

    • +1 @Dave21 with the updating extra permissions. I wound up just changing permissions on all Python files with find $AMB_ROOT -iname '*.py' -exec chmod 755 {} \;.
    • There's duplicate information about downloading the board project from GitHub in both the Adding SparkFun Edge Support section and the 3rd paragraph in the Example Applications section.
    • There's no information on the 921600 baud rate that we apparently should be using (if we ordered our boards from SparkFun and didn't receive them at some Tensorflow promo event).
    • There's no information about updating the baud rate in the examples and accompanying code. I did a global grep/sed replace in Bash. Did that break things? Couldn't tell you.
    • The GitHub repo is referenced as SparkFun_Edge_BSP, and later incorrectly as SparkFun_Edge_AmbiqSDK_BSP.
    • The file paths in the Housekeeping section are a mix of relative and (incorrectly) absolute while none are described as being relative to $AMB_ROOT, which makes things very confusing. Further, there are other relative paths throughout the document that confuse the reader, leading a person to believe that they should be in example1_edge_test instead of example1_edge_test/gcc while running make for example.
    • Under the Download the SDK section, the Ambiq SDK 2.0.0 is referencing both, an invalid link and a valid link, each referencing different builds of the same version of the SDK.
    • It's mentioned that on *nix systems, the TTY device will be /dev/cu* and Mac would be /dev/tty.*. Mac is /dev/cu.* and *nix would be /dev/tty*.
    • There doesn't seem to be much of a reason to be using version Ambiq SDK release 2.0.0. Once this issue is resolved, this document should be updated.
    • Under the Introduction section, the link "How to install FTDI Drivers" is irrelevant. This uses the CH340C board and its corresponding drivers.

    Further, I'm still having issues getting these examples to work. Any help is appreciated.

    UPDATE: Issue resolved. Seems the CH341 drivers may need to be updated.

  • I had to chmod 755 tools/apollo3_scripts/create_cust_wireupdate_blob.py under AmbiqSuite-Rel2.0.0 to build example1

    along with "sudo pip3 install pyserial" (not serial like my first try)

    I also tried the AmbiqSuite 2.1 release but ran into compilation errors which I haven't dug into yet (sticking with 2.0 for now)

    ../src/tf_adc/tf_adc.c:61:38: error: too few arguments to function 'am_hal_adc_samples_read' if (AM_HAL_STATUS_SUCCESS != am_hal_adc_samples_read(g_ADCHandle, ^~~~~~~~~~~~~~~~~~~~~~~

  • The "GNU-RM Download Site" links don't work.

  • $AMB_ROOT/boards/SparkFun_Edge_AmbiqSDK_BSP/examples/edge_test/gcc should be $AMB_ROOT/boards/SparkFun_Edge_AmbiqSDK_BSP/examples/example1_edge_test/gcc

    • Thanks for posting these notes!

    • Also, when installing pyserial (at least on osx), make sure it's installed with pip, not pip3, or your 'make bootload' command will throw this error: ... ../../../bsp/tools/uart_wired_update_sparkfun.py -b 921600 /dev/tty.usbserial-AL0339KE -r 1 -f bin/main_nonsecure_wire.bin -i 6 Traceback (most recent call last): File "../../../bsp/tools/uart_wired_update_sparkfun.py", line 5, in <module> import serial ModuleNotFoundError: No module named 'serial' make: *** [bootload] Error 1


If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!