Initial programming of Artemis Module? (and USB-less/FTDI programming?)

Hello,

I’ve made a PCB design (schematically the same as the Nano, with a few extra peripherals, and in Kicad) to play with the useability of the Artemis and seem to be able to reliably solder the Artemis on using an oven. Cool (apart from when I accidentally de-soldered the components and moved the BGA chip, yet to see if I can recover from that). I’ve made 5 boards, with 3 blank Artemis modules (1 which had some random code on it), and 2 Artemis modules taken off Nano boards after being programmed with my test code. 2 of them work so far. I’m using Arduino 1.8.9 to program them.

Is it possible the new Artemis modules are completely blank? (and unprogrammable)

I’m programming via Arduino and USB (CH340E), and of the standalone modules, one already had some code in it, spitting out numbers to Serial. Accepted Arduino code straight away. The other two blank modules won’t accept code, they are detected on USB plugin, but get a “No announcement from Artemis bootloader” error when trying to upload. This is the same as when trying to program with nothing connected.

They won’t accept the Sparkfun Variable Bootloader when I follow the instructions to upload it using the Ambiq bootloader. It’s an “Upload Failed” message. All SVL baud rates tried.

Anything obvious I’ve missed? Does this sound consistent with missing Ambiq bootloader? Guess I will try uploading that next, although it could be a while before I have a chance to wade into that.

Cheers,

Steve

PS: I’m also keen to do FTDI (ie. without USB) programming but get “Unknown BL Bootloader Response” error when I try it (with CH340E chip removed from working board to avoid interference), and the FTDI tied into Gnd/3.3V/TX/RX/RTS. I can get serial comms but can’t program, so it seems something to do with resetting. I need to stare at this some more, but again, anything obvious I’m missing?

Hi Steve – good questions I’ll do my best here:

Is it possible the new Artemis modules are completely blank? (and unprogrammable)

Possible? Yes, but not very likely. We do program all the modules before they leave our production floor. That consists of: configuring the always-present Ambiq Secure Bootloader (ASB) to operate at 115200 baud, adding a variable bootloader in addition, and finally adding a self-test application on the module.

However – the SparkFun Variable Loader (SVL) has undergone a significant revision. Depending on your version of the Arduino core what may be happening is that the new tools (from Arduino) are trying to talk to the old firmware bootloader. The solution is to burn the latest SVL onto your boards. Fortunately the ASB allows you to do this without any special tools – just the UART connection. Check out this post: viewtopic.php?f=163&t=50480

“No announcement from Artemis bootloader”

This sounds like you might be using an old version of the Arduino core? The new SVL was implemented in v1.0.4 and does not have that message. I'd recommend upgrading. (Though it does possibly suggest other problems if your boards have the pre-v1.0.4 bootloader and you're using a pre-v1.0.4 core...)

They won’t accept the Sparkfun Variable Bootloader when I follow the instructions to upload it using the Ambiq bootloader. It’s an “Upload Failed” message. All SVL baud rates tried.

Hmm... the SVL is not used to upload the SVL - instead it relies on the ASB, so trying different SVL rates should make no difference. Instead I am worried that you're possibly still using the old core which had an "advanced" example sketch that was the old bootloader. Now the only way to upload the bootloader should be to use "Tools->Burn Bootloader" after selecting "Ambiq Secure Bootloader" as your "Programmer" in the "Tools->Programmer" menu.

If you follow the steps in the post that I linked and it still isn’t working then we have to examine the ASB and the upload hw/process next.

Does this sound consistent with missing Ambiq bootloader?

Rare memory failure problems aside it is very unlikely that you will be missing the ASB -- however your ASB *might* be configured to use a non-standard baud rate. (Though this is unlikely too b/c you mentioned that two modules were removed from the Artemis Nano board, which used the [now] standard 115200 baud. For reference only the Edge boards sold by SparkFun had a different configuration and that was 921600 baud for the ASB). However lots of things are *possible* like if we somehow missed the configuration step on the module.

I follow the instructions to upload it using the Ambiq bootloader. It’s an “Upload Failed” message.

So this does sound like you are correctly running the ASB. There are several reasons why it might fail, the most common is when there is a large amount of UART data being pushed out by the module. (The original Python script from Ambiq could not handle that -- they used ITM debugging instead of UART so presumably they never had this problem) (see this for reference with that issue: [viewtopic.php?f=164&t=50481](https://forum.sparkfun.com/viewtopic.php?f=164&t=50481)) I've included a workaround for this in v1.0.5 of the Arduino core.

I think that once your bootloader issues are worked out that using an external FTDI will work without much (if any) trouble.

My recommendation is to upgrade to the latest version of the Apollo3 core and try to get bootloading working with the ASB first. Once it works you can upload the SVL with “burn bootloader.” If all that is not working the next steps would be a detailed investigation including scoping out the traces and possibly reconfiguring the ASB (but that requires a programmer/debugger that uses SWD).

I hope this is helpful!

Thanks! The detailed support really appreciated. I updated the Apollo3 core to the latest (1.0.6) - worked ok, but took 5hrs to download it (~135MB) on my otherwise fast internet connection. I do have RX/TX indicator LEDs on the boards, and they aren’t doing anything - presumably if there was bulk Serial data they would be flashing like mad.

I still get “Upload Failed” with the 1.0.6 Apollo core when trying to burn bootloader according to the instructions at viewtopic.php?f=163&t=50480

(even when I soldered the BOOT pin to 3.3V and playing around with resetting)

Attempt to upload code, with BOOT tied to 3.3V

" error receiving packet

{‘len’: 0, ‘cmd’: 0, ‘data’: 0, ‘crc’: 1, ‘timeout’: 1}

unknown error

Upload failed"

I note that I don’t have an option under tools to select the ASB baud rate (using what seems to be the latest Arduino, 1.8.9 on Windows 10). That’s from a screenshot in the bootloader thread, maybe an older version?

I have a JTAG port ala the Nano and a programmer on the way, so I’ll try that next unless any better ideas? I might also attempt to swap in another module. Could be a soldering error of course, but consistency across the 5 assembled boards is not consistent with that. Oh for the record, the 3 Artemis modules I’m using are from Mouser - I suspect the 2 I’m struggling with were the last they had in stock of an early batch, I ordered them 11th July. I suspect the 1 module that had some code in it and worked fine was from a later batch, purchased from Mouser 1st August. I can’t be sure which is which, unless there are batch markings I’m missing.

Awesome, glad we can communicate and work through all these issues!

About the download - the speed is probably limited by what our servers can handle. I imagine that a decent number of people are trying to access those files right when I release new updates. I’ll talk to our IT guys to see if we can think of a way to deliver it better.

Good to know about the LEDs you have on TR/RX - Based on your description I don’t suspect that as the problem.

This raises a flag in my mind:

Attempt to upload code, with BOOT tied to 3.3V

"	error receiving packet
{'len': 0, 'cmd': 0, 'data': 0, 'crc': 1, 'timeout': 1}
unknown error
Upload failed"

because the error message is one from the SparkFun Variable Loader (SVL), but holding the BOOT pin high tells the Artemis module to go into the “true” boot mode using the Ambiq Secure Bootloader (ASB). They are incompatible modes. So let me explain a little more:

ASB: a bootloader baked into the APollo3 chip with some configurability. It is activated by the “BOOT” strapping pin being high when a reset occurs. (It also can be activated when “BOOT” is low at startup, and the “BOOT” pin is configurable depending on settings programmed with a debugger. All the Artemis modules use pad 47 and the HIGH polarity for bootload mode, however the original Edge baords used pad 14 and the LOW polarity. ) After that the ‘ambiq_bin2board.py’ python script is used to perform bootloading steps.

SVL: an additional bootloader that an be flashed into the chip using the ASB – designed for convenience. It resides at the location in memory that the ASB expects an application to live so that it runs when the ASB exits. It has a short window of time to receive a ‘U’ character (to detect baud rate) and then confirm bootloading intent via UART in order to begin, otherwise it jumps execution to the location where it expects an application to live.

So, if you hold the boot pin high and try to use the SVL nothing will work. Also should note that when you use the ASB it overwrites the SVL with your application – to use the SVL after using the ASB you need to re-upload the SVL using the ASB. That is done with the steps you linked (‘All About the Artemis Bootloader’). I am confused how you got the SVL error messages when following those steps. Can you provide the entire output by turning on verbose output for compilation and upload in the Arduino settings?

There is only one board definition that allows you to select the ASB baud rate – that is the Edge. This is because the ASB baud rate is not configurable by a user without a programmer/debugger. However the Edge was distributed in two different flavors, one with the ASB configured for 921600 baud and one configured for 115200 baud. All other boards (including all boards based on the Artemis module) are configured to use 115200 baud for the ASB.

As a note: the ‘burn bootloader’ option should use the configured ASB baud rate for upload (that is it will be 115200 on every board except an Edge board with 921600 selected as the baud rate for ASB)

I don’t know of any batch markings on the Artemis modules… I’ll bring this up with the engineer in charge of the HW. Seems like it could be a good thing to check. However AFAIK there have been no software or hardware changes to the Artemis modules. Since these are the engineering samples Mouser and other distributors would have purchased them directly from us.

Another tidbit: FCC certified Artemis modules for production are coming soon. The only significant difference will be that the module is canned for RF.

So in summary please make sure that you’re using the ASB tool (called ‘ambiq_bin2board’) for the ‘burn bootloader’ step, and provide as much of the console output as you can so that we can get a more clear idea.

Continuing on…

make sure that you’re using the ASB tool (called ‘ambiq_bin2board’)

I'm not sure what you mean - this phrase is not in the compilation or upload messages, or selectable as an option anywhere (Tools -> Programmer, likely options are Ambique Secure Bootloader, which I'm using, and USBasb)

With BOOT held at 3.3V, if I try to upload code using the ASB bootloader (Tools → Bootloader == “Ambique Secure Bootloader”), I get:

Sending Hello.
No response for command 0x00000000
Failed to respond
Fail

Same if I try Burn Bootloader (with Tools->Bootloader == ASB, or == SVL).

To replicate the error you were interested in, I’m using:

  • Arduino IDE 1.8.9

  • Windows 10

  • Using core 1.0.6

  • Custom Artemis Module board (GetBoardInfo yields BN: Unknown board

VID: 1A86

PID: 7523

SN: Upload any sketch to obtain it)

To get the error message you were interested in:

  • Set IDE Tools menu items:

  • Board to “Artemis Module”

  • Bootloader to SVL

  • Programmer to “Ambique Secure Bootloader”

  • SVL Baud Rate to 921600 (also tried 115200, same message)

  • Solder BOOT to 3.3V

  • Attempt to upload sketch (which would overwrite the SVL bootloader)

Here’s the full (verbose) output from the compilation and upload attempt:

C:\Program Files (x86)\Arduino1.8.9\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino1.8.9\hardware -hardware C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages -hardware C:\Users\Stephen Fordyce\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino1.8.9\tools-builder -tools C:\Program Files (x86)\Arduino1.8.9\hardware\tools\avr -tools C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino1.8.9\libraries -libraries C:\Users\Stephen Fordyce\Documents\Arduino\libraries -fqbn=SparkFun:apollo3:artemis:svl_baud=921600,loader=sparkfun_svl -vid-pid=1A86_7523 -ide-version=10809 -build-path C:\Users\STEPHE~1\AppData\Local\Temp\arduino_build_550390 -warnings=none -build-cache C:\Users\STEPHE~1\AppData\Local\Temp\arduino_cache_260889 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages\SparkFun\tools\arm-none-eabi-gcc\8-2018-q4-major -prefs=runtime.tools.arm-none-eabi-gcc-8-2018-q4-major.path=C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages\SparkFun\tools\arm-none-eabi-gcc\8-2018-q4-major -verbose C:\Users\Stephen Fordyce\Documents\_Projects\0122 - Suit Heating System\ArduinoCode\HeaterController_rev2_0\HeaterController_rev2_0.ino
C:\Program Files (x86)\Arduino1.8.9\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino1.8.9\hardware -hardware C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages -hardware C:\Users\Stephen Fordyce\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino1.8.9\tools-builder -tools C:\Program Files (x86)\Arduino1.8.9\hardware\tools\avr -tools C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino1.8.9\libraries -libraries C:\Users\Stephen Fordyce\Documents\Arduino\libraries -fqbn=SparkFun:apollo3:artemis:svl_baud=921600,loader=sparkfun_svl -vid-pid=1A86_7523 -ide-version=10809 -build-path C:\Users\STEPHE~1\AppData\Local\Temp\arduino_build_550390 -warnings=none -build-cache C:\Users\STEPHE~1\AppData\Local\Temp\arduino_cache_260889 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages\SparkFun\tools\arm-none-eabi-gcc\8-2018-q4-major -prefs=runtime.tools.arm-none-eabi-gcc-8-2018-q4-major.path=C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages\SparkFun\tools\arm-none-eabi-gcc\8-2018-q4-major -verbose C:\Users\Stephen Fordyce\Documents\_Projects\0122 - Suit Heating System\ArduinoCode\HeaterController_rev2_0\HeaterController_rev2_0.ino
Using board 'artemis' from platform in folder: C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.0.6
Using core 'arduino' from platform in folder: C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.0.6
Build options changed, rebuilding all
Detecting libraries used...
"C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\tools\\arm-none-eabi-gcc\\8-2018-q4-major/bin/arm-none-eabi-g++" -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 -c -g -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -fdata-sections -Os -ffunction-sections -w -std=gnu++11 -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -mcpu=cortex-m4 -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_SFE_ARTEMIS -DARDUINO_ARCH_APOLLO3 -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis/config" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup/ard_supers" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\cores\\arduino" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/hal" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/regs" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/utils" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Include" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/ARM/Include" "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\sketch\\HeaterController_rev2_0.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\tools\\arm-none-eabi-gcc\\8-2018-q4-major/bin/arm-none-eabi-g++" -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 -c -g -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -fdata-sections -Os -ffunction-sections -w -std=gnu++11 -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -mcpu=cortex-m4 -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_SFE_ARTEMIS -DARDUINO_ARCH_APOLLO3 -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis/config" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup/ard_supers" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\cores\\arduino" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/hal" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/regs" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/utils" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Include" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/ARM/Include" "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\sketch\\HeaterController_rev2_0.ino.cpp" -o "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino1.8.9\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\tools\\arm-none-eabi-gcc\\8-2018-q4-major/bin/arm-none-eabi-g++" -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 -c -g -MMD -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -fdata-sections -Os -ffunction-sections -w -std=gnu++11 -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_SFE_ARTEMIS -DARDUINO_ARCH_APOLLO3 "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis/config" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup/ard_supers" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\cores\\arduino" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/hal" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/regs" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/utils" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Include" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/ARM/Include" "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\sketch\\HeaterController_rev2_0.ino.cpp" -o "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\sketch\\HeaterController_rev2_0.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\tools\\arm-none-eabi-gcc\\8-2018-q4-major/bin/arm-none-eabi-gcc" -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 -c -g -MMD -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -fdata-sections -Os --function-sections -mfpu=fpv4-sp-d16 -std=gnu11 -Wall -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_SFE_ARTEMIS -DARDUINO_ARCH_APOLLO3 "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis/config" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup/ard_supers" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\cores\\arduino" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/hal" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/regs" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/utils" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Include" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/ARM/Include" "C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis\\startup\\startup_gcc.c" -o "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\core\\startup\\startup_gcc.c.o"
"C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\tools\\arm-none-eabi-gcc\\8-2018-q4-major/bin/arm-none-eabi-g++" -DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3 -c -g -MMD -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -fdata-sections -Os -ffunction-sections -w -std=gnu++11 -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_SFE_ARTEMIS -DARDUINO_ARCH_APOLLO3 "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis/config" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/ard_sup/ard_supers" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\cores\\arduino" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/hal" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/mcu/apollo3/regs" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/utils" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Include" "-IC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/ARM/Include" "C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis\\config\\variant.cpp" -o "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\core\\config\\variant.cpp.o"
Using precompiled core: C:\Users\STEPHE~1\AppData\Local\Temp\arduino_cache_260889\core\core_SparkFun_apollo3_artemis_svl_baud_921600,loader_sparkfun_svl_e8daa5b039df68de8560255859af6099.a
Linking everything together...
"C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\tools\\arm-none-eabi-gcc\\8-2018-q4-major/bin/arm-none-eabi-gcc" "-TC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6\\variants\\SparkFun_Artemis/linker_scripts/gcc/artemis_sbl_svl_app.ld" "-Wl,-Map,C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390/HeaterController_rev2_0.ino.map" -o "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390/HeaterController_rev2_0.ino.axf" "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\sketch\\HeaterController_rev2_0.ino.cpp.o" "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\core\\config\\variant.cpp.o" "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390\\core\\startup\\startup_gcc.c.o" "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_cache_260889\\core\\core_SparkFun_apollo3_artemis_svl_baud_921600,loader_sparkfun_svl_e8daa5b039df68de8560255859af6099.a" "-LC:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\apollo3\\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/ARM/Lib/ARM" -larm_cortexM4l_math -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -static -Wl,--gc-sections,--entry,Reset_Handler -Wl,--start-group -lm -lc -lgcc -Wl,--end-group -fno-exceptions -nostdlib --specs=nano.specs -t -lstdc++ -lc -lnosys -lm
C:\Users\STEPHE~1\AppData\Local\Temp\arduino_build_550390\sketch\HeaterController_rev2_0.ino.cpp.o

C:\Users\STEPHE~1\AppData\Local\Temp\arduino_build_550390\core\config\variant.cpp.o

C:\Users\STEPHE~1\AppData\Local\Temp\arduino_build_550390\core\startup\startup_gcc.c.o

C:\Users\STEPHE~1\AppData\Local\Temp\arduino_cache_260889\core\core_SparkFun_apollo3_artemis_svl_baud_921600,loader_sparkfun_svl_e8daa5b039df68de8560255859af6099.a

C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.0.6/cores/arduino/am_sdk_ap3/CMSIS/ARM/Lib/ARM\libarm_cortexM4l_math.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libm.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/thumb/v7e-m+fp/hard\libgcc.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libm.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/thumb/v7e-m+fp/hard\libgcc.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libstdc++_nano.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc_nano.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libnosys.a

c:/users/stephen fordyce/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libm.a

"C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\tools\\arm-none-eabi-gcc\\8-2018-q4-major/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390/HeaterController_rev2_0.ino.axf" "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390/HeaterController_rev2_0.ino.bin"
"C:\\Users\\Stephen Fordyce\\AppData\\Local\\Arduino15\\packages\\SparkFun\\tools\\arm-none-eabi-gcc\\8-2018-q4-major/bin/arm-none-eabi-size" -A "C:\\Users\\STEPHE~1\\AppData\\Local\\Temp\\arduino_build_550390/HeaterController_rev2_0.ino.axf"
Sketch uses 13464 bytes (1%) of program storage space. Maximum is 960000 bytes.
C:\Users\Stephen Fordyce\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.0.6/tools/artemis/windows/artemis_svl.exe COM8 -f C:\Users\STEPHE~1\AppData\Local\Temp\arduino_build_550390/HeaterController_rev2_0.ino.bin -b 921600 -v 


Artemis SVL Bootloader

phase:	setup
	cleared startup blip

phase:	bootload
	have 13576 bytes to send in 7 frames

	error receiving packet
{'len': 0, 'cmd': 0, 'data': 0, 'crc': 1, 'timeout': 1}


unknown error
	sending frame #0, length: 0

	Upload failed

phase:	setup
	cleared startup blip

phase:	bootload
	have 13576 bytes to send in 7 frames

	error receiving packet
{'len': 0, 'cmd': 0, 'data': 0, 'crc': 1, 'timeout': 1}


unknown error
	sending frame #0, length: 0

	Upload failed

phase:	setup
	cleared startup blip

phase:	bootload
	have 13576 bytes to send in 7 frames

	error receiving packet
{'len': 0, 'cmd': 0, 'data': 0, 'crc': 1, 'timeout': 1}


unknown error
	sending frame #0, length: 0

	Upload failed

Okay good, this is looking more like what I expected. In this first portion of your post you’ve correctly selected the Ambiq Secure Bootloader (ASB, tool name is called ambiq_bin2board when it is called by the computer). The error message:

Sending Hello.
No response for command 0x00000000
Failed to respond
Fail

Is an error message that comes from the ASB. Since there is no response for the first transaction it would be good to know for sure that the TX (and RX) line(s) from the Artemis module have a good connection the the FTDI. Do you have a way of checking this? There is also a large history of similar errors that you can read about on the forums. This could possibly give more insight into possible failure modes. (Though most of those issues have been identified and fixed it wouldn’t hurt to understand the history)

As for the attempt to use the SparkFun Variable Loader (SVL) in the second half of your post: the SVL will never work with the BOOT pin held high. In fact no application will ever run with that pin held high as the board will always go into bootloader on reset. A switch or a button to connect the BOOT pin to 3.3V temporarily could be very helpful.

Until you get the ASB working you can’t be sure that the SVL will work (because at this point how sure are you that the latest SVL is loaded in the application space?) so I’d focus all my efforts on the ASB. Do you have a logic analyzer or oscilloscope? It may be useful to see the signals. And it also could be useful to remove the FTDI from the equation by using an external CH340-based usb-serial bridge. (I will try uploading with an FTDI, on the other hand, and I will report my findings back here)

Use of an FTDI (https://www.sparkfun.com/products/9873) instead of the CH340-C (https://www.sparkfun.com/products/14050) on an Edge2 board (not released yet, but it is the Edge board using an Artemis module instead of the bare chip - good for testing external UART connections) went off without a hitch for me.

It is also very hard to accidentally “deconfigure” the ASB, so I suspect there must be soemthing wrong with either:

  1. the hardware

  2. the data transmission

So if you could verify those things it would help us get to the root of all this.

I’ve successfully managed JTAG programming (explained at viewtopic.php?f=165&t=50685)

And FTDI programming (explained at viewtopic.php?f=165&t=50764)

The troublesome boards which are the subject of this thread will get those and a few other lessons learned thrown at them soon. I also realised it’s probably not that hard to solder wires to the few pads required for FTDI comms, to check whether it’s a programming issue or not.

The troublesome board accepts JTAG programming, and then does serial comms over USB (TX, RX, and reset when opening Serial Monitor). Still leading me to think it’s an ASB issue. Playing with the ASB configuration has lead to other problems, which are the subject of a dedicated thread here:

viewtopic.php?f=165&t=50783