Comments: Using SparkFun Edge Board with Ambiq Apollo3 SDK
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.
If you've found an issue with this tutorial content, please send us your feedback!
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 ?
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!
thank you , i reposted the question in the right place
If you're using the camera how many frames per second can this run inference on?
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.
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
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!
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
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.
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 runningmake.
This should generate the necessary libraries. Then you can try making the example again. HTHhi, 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:
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).
Awesome, thanks for sharing!
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:
find $AMB_ROOT -iname '*.py' -exec chmod 755 {} \;
.board
project from GitHub in both the Adding SparkFun Edge Support section and the 3rd paragraph in the Example Applications section.grep
/sed
replace in Bash. Did that break things? Couldn't tell you.SparkFun_Edge_BSP
, and later incorrectly asSparkFun_Edge_AmbiqSDK_BSP
.example1_edge_test
instead ofexample1_edge_test/gcc
while runningmake
for example./dev/cu*
and Mac would be/dev/tty.*
. Mac is/dev/cu.*
and *nix would be/dev/tty*
.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.
Thanks, give this a shot for now and we'll update the tutorial soon. https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads#
$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