blob: 89247fe9fef6b5bda16fa07b5a742f6386c336ca [file] [log] [blame]
This Atmosic SDK requires a Linux-like environment and an Arm GNU-RM
toolchain. It also requires a system configuration in order to access
USB serial devices.
### MSYS2 ###
This SDK depends upon a Linux-like environment such as MSYS2
(recommended) or Cygwin with Make and Vim installed.
To get MSYS2, follow the installation instructions at
https://www.msys2.org.
Ensure the following packages are installed:
-) Make
-) Vim (for xxd)
-) Unzip
In MSYS2, use "pacman -Sy make vim unzip" to install them. Execute
the commands "which make", "which xxd", and "which unzip" from, say,
the MSYS2 Bash shell to display their locations and verify these
dependencies are met.
Note that all of the make commands in
platform/atm*/<platform>/examples/README should be run in a shell
provided by MSYS or Cygwin.
### Windows and MSYS Path Equivalence ###
Every Windows drive is available in MSYS under the root directory,
namely "/". That is, a drive <D> is available as /<D> in MSYS. For
example, the Windows path C:\atmosic_sdk becomes /c/atmosic_sdk in
MSYS.
In Windows, MSYS's root directory is its installation location. For
example, if MSYS is installed in C:\msys64, the MSYS directory /home
is accessible via C:\msys64\home in Windows.
Note: Windows and MSYS create different home directories for a given
user. A user named "SDK User" has a Windows home directory
"C:\Users\SDK User" and an MSYS home directory "/home/SDK User". The
former is accessible from MSYS via "/c/Users/SDK User"; the latter is
accessible from Windows via "C:\msys64\home\SDK User".
### Enabling Symbolic Links ###
In Windows 10, under Settings, go to "Update & Security." Then, under
"For developers," set "Use developer features" to "Developer mode."
Also, if using MSYS, make sure that the environment variable MSYS
contains the string winsymlinks:nativestrict. This can be done in one
of two ways. The best way is to define the variable in Windows by
going to Control Panel -> System and Security -> System -> Advanced
system settings -> Environment Variables, then add a new user variable
named MSYS with winsymlinks:nativestrict as the value. If MSYS is
already defined, append winsymlinks and nativestrict to the end
separating them with colons.
The second way to add winsymlinks:nativestrict to the MSYS variable
permanently is to add the following line to ~/.bash_profile,
assuming you're using Bash.
export MSYS=winsymlinks:nativestrict:"$MSYS"
If using Cygwin, change MSYS to CYGWIN in the above instructions.
### Arm GNU-RM toolchain ###
Download GNU Arm Embedded Toolchain, Version 10.3-2021.07 from the
following location.
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
At the time of this writing, the direct link below can also be used.
https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07win32/gcc-arm-none-eabi-10.3-2021.07-win32.exe
Install the toolchain in
<atmosic_sdk>\tools\gcc-arm-none-eabi-10.3-2021.07
### libusb-1.0.dll ###
A dependency of openocd.exe included in this SDK is libusb-1.0.dll.
If this DLL does not already exist in C:\Windows\system32, copy
tools/openocd/libusb-1.0.dll from this SDK to C:\Windows\system32.
Windows Administrator privileges are required for making said changes.
### WinUSB(ATM3330) ###
Microsoft by default will NOT have the j-link driver for the J-Link OB device
on the Atmosic board. Download J-Link software pack from the following location.
https://www.segger.com/downloads/jlink/
The J-Link OB device driver must be replaced with WinUSB in order for it to
become available as a USB device and usable by OpenOCD.
This can be done using:
1) Zadig
2) Install RDI Interface(The windows installer will create this shortcut
in "Start Menu">>"AtmosicSDK")
Windows Administrator privileges are required for replacing a driver.
Zadig can be obtained from:
https://github.com/pbatard/libwdi/releases
At the time of this writing, the latest version -- 2.4 -- can be
obtained using the following direct link.
https://github.com/pbatard/libwdi/releases/download/b721/zadig-2.4.exe
To replace the driver:
1) From the "Options" menu of Zadig, click "List all devices".
2) From the drop-down menu, find "BULK interface" corresponding to
the Atmosic board. It should show "jlink (v...)" as
the current driver on the left.
3) Select "WinUSB (v...)" as the replacement on the right.
4) Click "Replace Driver"
Verify the successful installation of WinUSB by going to the Windows
Device Manager and confirming that the "BULK interface" shows
as such rather than "J-Link driver". (In Device Manager, expand category
"Universal Serial Bus devices" and look for "BULK interface".)
For IDE environment, the J-Link OB device driver must use J-Link driver.
This can be done using:
1) Uninstall BULK interface driver manually
2) Setup IDE Environment(The windows installer will create this shortcut
in "Start Menu">>"AtmosicSDK")
### WinUSB ###
Microsoft by default installs the FTDIBUS driver for the FTDI device
on the Atmosic board. This makes the device show as a COM port in the
Windows Device Manager.
For Interface 0 of the Atmosic FTDI interface board, the FTDI driver
must be replaced with WinUSB in order for it to become available as a
USB device and usable by OpenOCD. This can be done using Zadig.
Windows Administrator privileges are required for replacing a driver.
Zadig can be obtained from:
https://github.com/pbatard/libwdi/releases
At the time of this writing, the latest version -- 2.4 -- can be
obtained using the following direct link.
https://github.com/pbatard/libwdi/releases/download/b721/zadig-2.4.exe
To replace the driver:
1) From the "Options" menu of Zadig, click "List all devices".
2) From the drop-down menu, find USB1, Interface 0 corresponding to
the Atmosic interface board. It should show "FTDIBUS (v...)" as
the current driver on the left.
3) Select "WinUSB (v...)" as the replacement on the right.
4) Click "Replace Driver"
Verify the successful installation of WinUSB by going to the Windows
Device Manager and confirming that the Atmosic FTDI USB1 device shows
as such rather than a COM port. (In Device Manager, expand category
"Universal Serial Bus devices" and look for "Atmosic RDI USB1".)
Also, verify that the driver provider is libwdi. (Right-click on
"Atmosic RDI USB1", go to "Properties", go to the "Driver" tab, and
check the "Driver Provider" line.) Restart Windows if necessary.
### Viewer for Console Output(ATM3330) ###
Console output for current Atmosic ATM3330 goes to the JLink CDC UART
serial port. That is Interface 2 of J-Link OB USB on the Atmosic
board. In order to view the console output, use a serial terminal
program such as PuTTY (available from
https://www.chiark.greenend.org.uk/~sgtatham/putty) to connect to
JLink CDC UART port generated by the interface 2 of J-Link OB USB
with the baud rate set to 115200.
If using PuTTY, open a session with the following three parameters:
1) Serial line: <COM port> (see next paragraph)
2) Speed: 115200
3) Connection type: Serial
A common way to determine <COM port> for parameter #1 above is to use
the Windows Device Manager as follows.
a) Under the "View" menu, choose "Devices by container"
b) Under the container "J-Link", find "JLink CDC UART Port
(COM<N>)", where <N> is some COM port sequence number
Then use "COM<N>" for the serial line parameter in PuTTY.
### Viewer for Console Output ###
Console output for all current Atmosic platforms goes to the UART1
serial port. That is Interface 1 of USB1 on the Atmosic interface
board. In order to view the console output, use a serial terminal
program such as PuTTY (available from
https://www.chiark.greenend.org.uk/~sgtatham/putty) to connect to
UART1 with the baud rate set to 115200.
If using PuTTY, open a session with the following three parameters:
1) Serial line: <COM port> (see next paragraph)
2) Speed: 115200
3) Connection type: Serial
A common way to determine <COM port> for parameter #1 above is to use
the Windows Device Manager as follows.
a) Under the "View" menu, choose "Devices by container"
b) Under the container "Atmosic RDI USB1", find "USB Serial Port
(COM<N>)", where <N> is some COM port sequence number
Then use "COM<N>" for the serial line parameter in PuTTY.
### OpenOCD ###
Informational: this Atmosic SDK requires a version of openocd >= 0.11.0.
MSYS2 and other systems provide older versions, so a binary was included
with this SDK -- tools/openocd/openocd.exe.
### Python 3 and Google Protocol Buffers 3 ###
The Atmosic ISP Tool requires Python 3. It can be installed on MSYS2
together with its package manager pip using:
pacman -Sy python3 python3-pip