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.

  • santaimpersonator / about 6 years ago * / 5 /

    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.

  • Hallo , i am trying to program artemis red 3 i just did every thing like Edge tutorial and adjust it for artemis but i got stacked at the last step by uploading the program


    the last part of make file is

    #

    wired_update: all ../../../../../tools/apollo3_scripts/create_cust_image_blob.py --bin $(CONFIG)/$(TARGET).bin --load-address 0xC000 --magic-num 0xCB -o $(CONFIG)/main_nonsecure_ota --version 0x0 ../../../../../tools/apollo3_scripts/create_cust_wireupdate_blob.py --load-address 0x20000 --bin $(CONFIG)/main_nonsecure_ota.bin -i 6 -o $(CONFIG)/main_nonsecure_wire --options 0x1

    bootload: wired_update ../../../../../tools/apollo3_scripts/uart_wired_update.py -b 115200 $(serial) -r 1 -f $(CONFIG)/main_nonsecure_wire.bin -i 6

    boot_artemis: wired_update ${ARTEMIS_LOADER_CMD} -b 115200 $(serial) -r 1 -f $(CONFIG)/main_nonsecure_wire.bin -i 6 -v

    ###############3

    but i got error

    Connecting with Corvette over serial port /dev/ttyUSB0... Sending Hello. No response for command 0x00000000 Traceback (most recent call last): File "../../../../../tools/apollo3_scripts/uart_wired_update.py", line 345, in <module> main() File "../../../../../tools/apollo3_scripts/uart_wired_update.py", line 36, in main connect_device(ser) File "../../../../../tools/apollo3_scripts/uart_wired_update.py", line 56, in connect_device response = send_command(hello, 88, ser) File "../../../../../tools/apollo3_scripts/uart_wired_update.py", line 244, in send_command raise NoResponseError main.NoResponseError

    i am sure that baud rate is correct is the problem in addresses or in somewhere else ?

    • Liquid Soulder / about 5 years ago / 1

      Please go to the SparkFun forums Edge Troubleshooting thread for technical support. (See link pinned to top of comments section)

      That being said - are you able to upload programs with the Arduino IDE? It appears to me that there is no communication whatsoever. Let's continue this discussion on the forums. Thanks!

  • Member #1422300 / about 5 years ago / 1

    If you're using the camera how many frames per second can this run inference on?

    • Liquid Soulder / about 5 years ago / 1

      Last time I tried it inference was running between 1 and 2 frames per second. TensorFlow team members have made an effort to increase performance (for example by doing inference in integers rather than floats) but I can't accurately say how much impact that will have.

  • Member #382781 / about 5 years ago / 1

    Is it possible to get all of the configuration done with Docker? I know it's not usually used for embedded development, but this seems like a good potential application?

    These blog posts explain it better: http://www.electronvector.com/blog/simple-embedded-build-environments-with-docker

    https://dev.to/dalimay28/using-docker-for-embedded-systems-development-b16

    • Liquid Soulder / about 5 years ago / 2

      This is a great idea. I recently took an introductory course on Docker and had a few experiments setting up the Apollo3 environment in an image. I put that on hold b/c I thought it would be too difficult to edit the files you might need for development w/o a GUI interface in the container. But...... your articles show a good way to link across the boundary. Then I presume one would edit SDK and source files with their editor of choice and then run the build in the container.

      I have been working on a much-improved set of tools and resources to get started with the SDK. We are going to release updated documentation sometime soon-ish (lots of work to do on Apollo3/Artemis yet) but in the meantime check it out here: Our upgraded copy of the AmbiqSuite SDK: https://github.com/sparkfun/AmbiqSuiteSDK The BSP repo that supports all our boards (the main upgrade to the SDK): https://github.com/sparkfun/SparkFun_Apollo3_AmbiqSuite_BSPs

      Thanks for those links!

    • Liquid Soulder / about 5 years ago / 1

      Hey there, I just got this to a workable state. If you want to try it out and let me know how it goes that would be great. Specifically I want to make sure that the instructions make sense and that the workflow is tolerable. artemis_dev_platform

  • Member #1508262 / about 5 years ago / 1

    This is mostly because of driver issue. I've faced it in my linux system. Finally I found out a solution to solve this problem.

    https://stackoverflow.com/questions/55463159/sparkfun-edge-bootloader-problems

    Finally worked for me.

  • Member #1523324 / about 6 years ago / 1

    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

    • Liquid Soulder / about 6 years ago / 1

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

      • Member #1523324 / about 6 years ago / 1

        I did but I find nothing that solve my issue

        • santaimpersonator / about 6 years ago / 1

          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.

  • Member #1523859 / about 6 years ago / 1

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

  • Member #1523859 / about 6 years ago / 1

    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

    • Liquid Soulder / about 6 years ago / 2

      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

  • Member #1523324 / about 6 years ago / 1

    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?

    • Liquid Soulder / about 6 years ago * / 1

      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

  • knorthover / about 6 years ago / 1

    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'
    

  • Member #989040 / about 6 years ago * / 1

    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

  • karma0 / about 6 years ago * / 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.

  • Dave21 / about 6 years ago / 1

    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, ^~~~~~~~~~~~~~~~~~~~~~~

  • Steve14 / about 6 years ago / 1

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

  • Member #538154 / about 6 years ago / 1

    $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

    • Liquid Soulder / about 6 years ago / 1

      Thanks for posting these notes!

    • Member #538154 / about 6 years ago / 1

      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 an issue with this tutorial content, please send us your feedback!