SparkFun Forums 

Where electronics enthusiasts find answers.

User avatar
By asprenger
#206844
I have an application what I would like to upload to an Artemis board. I'm testing with an Artemis Nano and an Artemis Blackboard. I can successfully run the Blink example.

When I try to upload my application I'm getting the following error message:

Sending Hello.
Received response for Hello
Bootloader connected
Received Status
length = 0x58
version = 0x3
Max Storage = 0x4ffa0
Status = 0x2
State = 0x7
AMInfo =
0x1
0xff2da3ff
0x55fff
0x1
0x49f40003
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
Sending OTA Descriptor = 0xfe000
Sending Update Command.
number of updates needed = 1
Sending block of size 0x15a34 from 0x0 to 0x15a34
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 6828
No response for command 0x00000008
Response not valid
Failed to ack command
Fail
Tries = 3
Upload failed

The upload always fails when uploading the last chunk of the application binary.

Any idea?
User avatar
By liquid.soulder
#206847
I just ran into this problem as well -- it appears to only happen on larger binary uploads. The error messages indicate (by omission) that there were no bytes received for the response (rather than the *wrong* bytes being received.) So this made me think of a timeout problem. In the 'ambiq_bin2board.py' script I changed the two lines
Code: Select all
line# 383: with serial.Serial(args.port, args.baud, timeout=1) as ser:
line# 417: with serial.Serial(args.port, args.baud, timeout=0.5) as ser:
to
Code: Select all
line# 378: connection_timeout = 5
line# 384: with serial.Serial(args.port, args.baud, timeout=connection_timeout) as ser:
line# 418: with serial.Serial(args.port, args.baud, timeout=connection_timeout) as ser:
This worked for me first try after all previous uploads failed exactly the way you described. (I am uploading the ble_cordio_tag example from the AmbiqSuite SDK, size is 105516 bytes)

Until we make a new release you'll have to call the python script directly to see these changes take place. Modify the appropriate upload tool in the 'platform.txt' file to either call the script with Python directly or re-generate the executable from the python script with pyinstaller.
Code: Select all
pyinstaller --onefile ambiq_bin2board.py