Cannot upload example1_edge_test to my EDGE2

Hey All

I believe I have installed everything needed to be able to develop for the EDGE2 board on my Mac. I use the 2.0.0 version of the SDK and connect using the CH340C serial breakout board. I try to build and upload the example1_edge_test project1 and have changed the Makefile with the name of the serial port for the breakout board.

When executing the command make bootload, the following error is displayed (error part indicated in red):


make bootload

Compiling gcc …/src/main.c

Compiling gcc …/…/…/…/…/devices/am_devices_led.c

Compiling gcc …/…/…/…/…/utils/am_util_delay.c

Compiling gcc …/…/…/…/…/utils/am_util_faultisr.c

Compiling gcc …/…/…/…/…/utils/am_util_stdio.c

Compiling gcc startup_gcc.c

Compiling gcc …/src/tf_adc/tf_adc.c

Compiling gcc …/src/tf_accelerometer/tf_accelerometer.c

…/src/tf_accelerometer/tf_accelerometer.c: In function ‘platform_read’:

…/src/tf_accelerometer/tf_accelerometer.c:336:31: warning: assignment to ‘uint32_t *’ {aka ‘long unsigned int *’} from incompatible pointer type ‘uint8_t *’ {aka ‘unsigned char *’} [-Wincompatible-pointer-types]

iomTransfer.pui32RxBuffer = bufp; // Link in the RX buffer

^

Compiling gcc …/src/tf_accelerometer/lis2dh12_reg.c

Linking gcc bin/example1_edge_test.axf

Copying gcc bin/example1_edge_test.bin…

…/…/…/…/…/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 0x4620 ( 17952 )

load_address 0xc000 ( 49152 )

app_size 0x4620 ( 17952 )

w0 = 0xcb0046a0

Security Value 0x10

w2 = 0x10008080

addrWord = 0xc000

versionKeyWord = 0x0

child0/feature = 0xffffffff

child1 = 0xffffffff

crc = 0xf1ab45f5

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 0x46a0 ( 18080 )

Writing to file bin/main_nonsecure_wire.bin

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

…/…/…/bsp/tools/uart_wired_update_sparkfun.py -b 921600 /dev/tty.wchusbserial1430 -r 1 -f bin/main_nonsecure_wire.bin -i 6

Connecting with Corvette over serial port /dev/tty.wchusbserial1430…

Sending Hello.

Received response for Hello

Received Unknown Message

msgType = 0x0

Length = 0x0

[‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’]

!!!Wired Upgrade Unsuccessful!!!..Terminating the script


Can anybody help?

Hi John,

Some parts of the example1_edge_test project will work on the Edge2 board but not all of them. While you could use the process you described it would be much better to follow the getting started instructions at this repo:

https://github.com/sparkfun/AmbiqSuiteSDK

if you must use the 2.0.0 release of the SDK then you could use the BSP repo individually as well:

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

And finally if you really must use the process described above you will have to change out the uploader tool. This is because the new tool has slightly modified functions on the flow control lines of the USB-serial converter. You can find that tool in the common/tools_sfe/ambiq/ambiq_bin2board.py python script (that script has combined the three separate calls above into one big script for convenience…)

Let us know if you keep having trouble :slight_smile: