|
1 |
| -### ARM gcc |
| 1 | +## Updating the firmware without using a debugging probe |
| 2 | +1. Download and install STM's free [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) programming tool. |
| 3 | +2. Connect NeoDK to a computer using a USB-to-3.5mm-TRS-serial cable. Suitable cables (3.3V TTL, Tip=Tx, Ring=Rx, Sleeve=GND) are readily available from various sources, like Aliexpress, for about €10 including shipping. |
| 4 | +3. Press and hold the pushbutton on NeoDK while switching on its power (or connecting the battery). This puts NeoDK in bootloader mode. Release the button. |
| 5 | +4. Open a terminal window and execute the following on the command line:<br/> |
| 6 | + `cd firmware`<br/> |
| 7 | + `STM32_Programmer_CLI -c port=/dev/tty.usbserial-0001 -w build/neodk_g071.hex -v`<br/> |
| 8 | +(Specify the COM port that corresponds to your USB-serial cable, in place of `/dev/tty.usbserial-0001`).<br/> |
| 9 | +A power cycle starts the firmware; the blue LED should light up and the box is ready for use. |
| 10 | + |
| 11 | +## Controlling NeoDK from a computer |
| 12 | +1. Connect NeoDK to a computer using a USB-to-3.5mm-TRS-serial cable (3.3V TTL, Tip=Tx, Ring=Rx, Sleeve=GND). |
| 13 | +2. Open a Chrome, Edge or Opera browser window and point it to the [NUUI](https://deviceweb.org/neostim) (Neostim Ugly User Interface). |
| 14 | +3. The following commands can be typed into the command box: |
| 15 | +- /? list the commands |
| 16 | +- /a print the instantaneous primary current and some voltages |
| 17 | +- /b simulate the button, to start/pause/resume the pattern |
| 18 | +- /d primary voltage down by 200 mV |
| 19 | +- /l toggle the lovely blue LED |
| 20 | +- /u primary voltage up by 200 mV |
| 21 | +- /v print firmware version |
| 22 | +- /0 (zero) turn off the primary voltage |
| 23 | +- /1../9 set the primary voltage to 1..9 Volt (be careful what you wish for) |
| 24 | + |
| 25 | +## Developing code for NeoDK |
| 26 | +### Debugging probe |
| 27 | +A suitable probe is the Segger JLink or Segger JLink EDU. Other probes supporting the SWD interface will work too. |
| 28 | + |
| 29 | +### Compiler |
2 | 30 | 1. Download and install the [Arm GNU Toolchain](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain) for bare metal targets.
|
3 | 31 | 2. Edit [Makefile.posix](toolchain/gcc/Makefile.posix) or [Makefile.windows](toolchain/gcc/Makefile.windows) (depending on your operating system) to set three environment variables to their appropriate values. Alternatively, they can be set in the startup file for your command line interface.
|
4 | 32 |
|
5 |
| -### STM32Cube |
| 33 | +### STM's low-level code library |
6 | 34 | 1. Download and install [STM32Cube for STM32G0 series](https://www.st.com/en/embedded-software/stm32cubeg0.html).
|
7 | 35 | 2. In your home directory, create a softlink to directory 'STM32Cube' of the just installed tree.
|
8 | 36 |
|
9 |
| -### SEGGER J-Link |
| 37 | +### SEGGER J-Link software |
10 | 38 | 1. Download and install [Segger J-Link](https://www.segger.com/downloads/jlink/).
|
11 | 39 | 2. In the just installed Segger directory tree, find file JLink_V792k/Samples/RTT/SEGGER_RTT_V792k.tgz and unpack it in place.
|
12 | 40 | 3. In your home directory, create a softlink named 'SEGGER_RTT' to directory 'JLink_V792k/Samples/RTT/SEGGER_RTT_V792k/RTT' of the just installed tree.
|
@@ -35,15 +63,3 @@ This should now show output from NeoDK.<br>
|
35 | 63 | In the JLinkRTTClient window, type<br>
|
36 | 64 | `/?`<br>
|
37 | 65 | to see a list of available NeoDK interactive commands.
|
38 |
| - |
39 |
| -### Updating the firmware without using a debugging probe |
40 |
| -1. Download and install STM's free [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) programming tool. |
41 |
| -2. Connect NeoDK to a computer using a USB-to-3.5mm-TRS-serial cable. Suitable cables (3.3V TTL, Tip=Tx, Ring=Rx, Sleeve=GND) are readily available from various sources, like Aliexpress, for about €10 including shipping. |
42 |
| -3. Press and hold the pushbutton on NeoDK while switching on its power (or connecting the battery). This puts NeoDK in bootloader mode. Release the button. |
43 |
| -4. Open a terminal window and execute the following on the command line:<br/> |
44 |
| - `cd firmware`<br/> |
45 |
| - `STM32_Programmer_CLI -c port=/dev/tty.usbserial-0001 -w build/neodk_g071.hex -v`<br/> |
46 |
| -(Specify the COM port that corresponds to your USB-serial cable, in place of `/dev/tty.usbserial-0001`).<br/> |
47 |
| -If flashing was successful, execute:<br/> |
48 |
| - `STM32_Programmer_CLI -c port=/dev/tty.usbserial-0001 -g`<br/> |
49 |
| -This last command starts the firmware; the blue LED should light up and the box is ready for use. A power cycle instead of this command will have the same effect. |
|
0 commit comments