Problem Using Examples from AmbiqSDK 2.2.0 with Artemis RedBoard

I am currently using this Artemis RedBoard: https://www.sparkfun.com/products/15444.

I am also suing the following example from Ambiq SDK 2.2.0:

AmbiqSuite-Rel2.2.0\boards\apollo3_evb\examples\ble_freertos_amdtpc\gcc

I have added the following target to the provided Makefile for that example:

boot_artemis: wired_update

python3 …/…/…/…/…/tools/apollo3_scripts/ambiq_bin2board.py --bin $(CONFIG)/$(TARGET).bin \

–load-address-blob 0x20000 --magic-num 0xCB -o ${TARGET} \

–version 0x0 --load-address-wired 0x0C000 -i 6 --options 0x1 \

-b 115200 -port ${SERIAL_PORT} -r 2 -v

I can build and upload the code to the Artemis RedBoard using the git bash and above target with no error as seen below:

$ make boot_artemis

…/…/…/…/…/tools/apollo3_scripts/create_cust_image_blob.py --bin bin/ble_freertos_amdtpc.bin --load-address 0x10000 --magic-num 0xCB -o bin/main_nonsecure_ota --version 0x0

Header Size = 0x80

original app_size 0x1d0bc ( 118972 )

load_address 0x10000 ( 65536 )

app_size 0x1d0bc ( 118972 )

w0 = 0xcb01d13c

Security Value 0x10

w2 = 0x10008080

addrWord = 0x10000

versionKeyWord = 0x0

child0/feature = 0xffffffff

child1 = 0xffffffff

crc = 0xb97539d4

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 0x1d13c ( 119100 )

Writing to file bin/main_nonsecure_wire.bin

Image from 0x0 to 0x1d13c will be loaded at 0x20000

python3 …/…/…/…/…/tools/apollo3_scripts/ambiq_bin2board.py --bin bin/ble_freertos_amdtpc.bin \

–load-address-blob 0x20000 --magic-num 0xCB -o ble_freertos_amdtpc \

–version 0x0 --load-address-wired 0x10000 -i 6 --options 0x1 \

-b 115200 -port COM4 -r 2 -v

Header Size = 0x80

original app_size 0x1d0bc ( 118972 )

load_address 0x10000 ( 65536 )

app_size 0x1d0bc ( 118972 )

w0 = 0xcb01d13c

Security Value 0x10

w2 = 0x10008080

addrWord = 0x10000

versionKeyWord = 0x0

child0/feature = 0xffffffff

child1 = 0xffffffff

crc = 0xb97539d4

Writing to file ble_freertos_amdtpc_OTA_blob.bin

testing: ble_freertos_amdtpc_OTA_blob.bin

Header Size = 0x60

app_size 0x1d13c ( 119100 )

Writing to file ble_freertos_amdtpc_Wired_OTA_blob.bin

Image from 0x0 to 0x1d13c will be loaded at 0x20000

Connecting over serial port COM4…

Sending Hello.

Received response for Hello

Bootloader connected

Received Status

length = 0x58

version = 0x5

Max Storage = 0x4ffa0

Status = 0x2

State = 0x7

AMInfo =

0x1

0xff2da3ff

0x55fff

0x1

0x4cd00005

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 0x1d19c from 0x0 to 0x1d19c

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 8180

Sending Data Packet of length 8180

Sending Data Packet of length 8180

Sending Data Packet of length 8180

Sending Data Packet of length 4676

Sending Reset Command.

Tries = 0

Upload complete!

However, uploaded example is not producing any output and I am not sure if it is running or not.

I have also tried the load address of 0x10000 instead of 0x0C000 with no effect.

This example runs fine on the Edge board but not on the Artemis RedBoard.

is your makefile using the proper bsp?

does that example use any pins as buttons / inputs that may stop or change the program execution?

liquid.soulder, this code is one of the standard examples that is provided in Ambiq Apollo3 Blue SDK Rel 2.2.0 (Ambiq Micro Apollo3 Blue SDK Rel2.2.0).

This example resides under the following path in AmbiqSuite-Rel2.2.0\boards\apollo3_evb\examples\ble_freertos_amdtpc and runs fine on the Edge board but not on Artemis RedBoard.

This example implements a Bluetooth client and I do not believe that it is using pins as buttons. When it runs, it should present the user with a text based menu on the terminal and expects user to select one of the presented options as a number.

The Makefile that resides under AmbiqSuite-Rel2.2.0\boards\apollo3_evb\examples\ble_freertos_amdtpc/gcc is attached. It is using the bsp library that resides under AmbiqSuite-Rel2.2.0\boards\apollo3_evb\examples\ble_freertos_amdtpc/gcc/bin and I assume this BSP library is for apollo3 that both Edge and Artemis boards are using. If not, I don’t know which bsp from this package is appropriate for the Artemis board.

For some reason, this site does not upload the file (Makefile.zip). A blue progress bar indicates that the file is being uploaded but the file does not show up on this page.

that BSP is mis-matched - it is for the Apollo3 Evaluation Board (EVB). You can find BSPs for SparkFun boards here:

https://github.com/sparkfun/SparkFun_Ap … Suite_BSPs

or integrated with the AmbiqSuite SDK here:

https://github.com/sparkfun/AmbiqSuiteSDK

however I don’t think that is exactly the problem.

I have also experienced this sort of issue and believe the solution involved carefully reading through the code and printf debugging

Thanks for your help. I will give it a try.