# usb programming with iar

**URL:** <https://community.sparkfun.com/t/usb-programming-with-iar/39336>\
**Category:** Artemis\
**Created:** [April 12, 2020, 12:58pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336 "2020-04-12T12:58:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![majd.shahin](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@majd.shahin](https://community.sparkfun.com/u/majd.shahin)\
**Post date:** [April 12, 2020, 12:58pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/1 "2020-04-12T12:58:31Z")

</div>

Hallo everybody ,

i am new here and i have a problem

i want to program (Apollo3 Blue ama3b1kk-kbr / sparkfun redboard artemis) with IAR or SEGGER because i need to use AmbiqSuite-R2.4.2 SDK for low-power multitasking application

but i have only usb cable

my qustion is :  
 **how can i program the microcontroller with only usb cable in (IAR or SEGGER) ?  
 if i cannot , dose the Arduino IDE supports low-power multitasking applications in sparkfun redboard artemis ?**

---

<div class="post-metadata">

**Author:** ![liquid.soulder](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/liquid.soulder/32/6069_2.png) [@liquid.soulder](https://community.sparkfun.com/u/liquid.soulder)\
**Post date:** [April 13, 2020, 5:36pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/2 "2020-04-13T17:36:11Z")

</div>

Hi. The Apollo3 does not support USB natively and therefore/also does not have a USB bootloader. There are at least three ways to re-flash the Apollo3

- Use the UART bootloader that exists permanently on the chip. (Uses USB-\>UART bridge chip onboard most Artemis boards, or external FTDI USB-\>UART on the Edge board). A python script to perform this is available in the AmbiqSuite SDK. Another version (slightly modified for simplicity) is available in the Arduino Apollo3 repository on GitHub.

- Use a SEGGER J-Link (or other SWD capable debug probe) to directly flash the memory. Use J-Flash Lite or similar SW along with debug probe HW.

- Use the Ambiq Over-The-Air examples for wireless (Bluetooth) re-programming. Documentation for this exists within the AmbiqSuite SDK

P.s. the Arduino IDE supports all functionality that the HAL does - all HAL functions are available in Apollo3 Arduino sketches. Be aware, however, that the Arduino environment may enable peripherals behind the scenes. These should be disabled for extremely low power examples.

Some helpful links, perhaps?

[viewtopic.php?f=169&t=50904&hilit=low+power](https://forum.sparkfun.com/viewtopic.php?f=169&t=50904&hilit=low+power)

[viewtopic.php?f=170&t=51090&p=208415&hi … er#p208415](https://forum.sparkfun.com/viewtopic.php?f=170&t=51090&p=208415&hilit=apollo3+low+power#p208415)

---

<div class="post-metadata">

**Author:** ![majd.shahin](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@majd.shahin](https://community.sparkfun.com/u/majd.shahin)\
**Post date:** [May 1, 2020, 8:17pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/3 "2020-05-01T20:17:50Z")

</div>

thank you , it works good with Jlink 🙂

---

<div class="post-metadata">

**Author:** ![ZeusX](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@ZeusX](https://community.sparkfun.com/u/ZeusX)\
**Post date:** [August 8, 2020, 9:23pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/4 "2020-08-08T21:23:38Z")

</div>

Can you please send me the link to example for the third option?

- Use the Ambiq Over-The-Air examples for wireless (Bluetooth) re-programming. Documentation for this exists within the AmbiqSuite SDK

I want to flash my Apollo3 Artemis (Artemis Global Tracking board) over the air… possible ?

---

<div class="post-metadata">

**Author:** ![liquid.soulder](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/liquid.soulder/32/6069_2.png) [@liquid.soulder](https://community.sparkfun.com/u/liquid.soulder)\
**Post date:** [August 19, 2020, 10:32pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/5 "2020-08-19T22:32:04Z")

</div>

Possible? I think.

Have I done it myself? No. Try looking in the docs here:

[https://github.com/sparkfun/AmbiqSuiteS … bootloader](https://github.com/sparkfun/AmbiqSuiteSDK/tree/master/docs/secure_bootloader)

---

<div class="post-metadata">

**Author:** ![ZeusX](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@ZeusX](https://community.sparkfun.com/u/ZeusX)\
**Post date:** [August 23, 2020, 7:53am UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/6 "2020-08-23T07:53:39Z")

</div>

Thanks for your reply!

What I’m trying to do is:

I want to connect the serial console over BT instead of connect serial cable TX-RX, Programming and console…

I will try to debug the Artemis over BT because I cant connect any serial cable (It’s close box and I can’t connect any wire inside).

What do you think?

Thanks in advanced.

---

<div class="post-metadata">

**Author:** ![liquid.soulder](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/liquid.soulder/32/6069_2.png) [@liquid.soulder](https://community.sparkfun.com/u/liquid.soulder)\
**Post date:** [August 24, 2020, 3:11pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/7 "2020-08-24T15:11:09Z")

</div>

That sounds more difficult. You could easily get BLE “printf” debugging working, but any sort of single-step debug would require a true SWD/JTAG interface. I don’t think you could do that wirelessly w/o purchasing a special debug probe that would live within the box and has a wireless operating mode.

---

<div class="post-metadata">

**Author:** ![ZeusX](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@ZeusX](https://community.sparkfun.com/u/ZeusX)\
**Post date:** [August 28, 2020, 6:14am UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/8 "2020-08-28T06:14:04Z")

</div>

Thanks for your responded.

How to get printf over BLE ?

Can you send me link to any examples please ?

thanks

---

<div class="post-metadata">

**Author:** ![liquid.soulder](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/liquid.soulder/32/6069_2.png) [@liquid.soulder](https://community.sparkfun.com/u/liquid.soulder)\
**Post date:** [August 28, 2020, 3:16pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/9 "2020-08-28T15:16:51Z")

</div>

You can start by studying the ArduinoBLE API:

[https://www.arduino.cc/en/Reference/ArduinoBLE](https://www.arduino.cc/en/Reference/ArduinoBLE)

It will soon be supported on the Artemis and you could use it to create your own GATT server that emulates a UART connection.

(The Nordic Uart Service (NUS) seems to be a good one that we could all standardize on… [https://developer.nordicsemi.com/nRF\_Co … s/nus.html](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/bluetooth/services/nus.html))

---

<div class="post-metadata">

**Author:** ![ZeusX](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@ZeusX](https://community.sparkfun.com/u/ZeusX)\
**Post date:** [October 9, 2020, 3:15pm UTC](https://community.sparkfun.com/t/usb-programming-with-iar/39336/10 "2020-10-09T15:15:10Z")

</div>

Any update here maybe ?
