Setup the Development Environment
Prepare the Software
This section explains how to prepare the software development environment for the SC-OBC Module A1.
Target Platform
This document targets Ubuntu 24.04 x86_64 systems.
You can use any of the following environments.
-
A PC with Ubuntu installed
-
A system container (e.g., Incus)
-
A virtual machine (e.g., QEMU, VirtualBox, VMware)
-
Windows Subsystem for Linux (WSL) (see TIP)
For Windows or macOS users, refer to the upstream Zephyr Getting Started Guide.
|
According to the Install dependencies section on the upstream Zephyr Getting Started Guide, firmware flashing from WSL is not supported. However, for the SC-OBC Module A1 Development Board, we have confirmed that flashing is possible on WSL. Detailed instructions for WSL user are provided in the Connect the Hardware section. |
Get Zephyr and Python Requirements
Install udev rules
Install the udev rules, which allow you to flash most Zephyr boards as a regular user.
sudo cp ~/zephyr-sdk-[VERSION]/sysroots/x86_64-pokysdk-linux/usr/share/openocd/contrib/60-openocd.rules \
/etc/udev/rules.d
sudo udevadm control --reload
Connect the Hardware
Before starting development, make sure you have the following components:
-
✔️ SC-OBC Module A1
-
✔️ SC-OBC Module A1 Development Board
-
✔️ USB Micro-B Cable
-
✔️ AC Adapter (5V/3.0A PL03B)
Refer to SC-OBC Module A1 Development Board Product Manual for detailed instructions on how to make the connection.
| This document does not require a connection between the MPLAB PICkit and the Platform Cable USB II. |
For WSL User
CON2 on the SC-OBC Module A1 Development Board is the USB Micro-B DEBUG interface and is connected to the onboard FT4232H USB interface. It provides FPGA JTAG, CPU JTAG, FPGA UART, and TRCH UART.
Use a USB cable to connect CON2 to your Windows PC, then attach it to WSL using Microsoft’s USB connection guide.
To attach the device to WSL, run usbipd list on Windows and
identify the FTDI multi-port USB device for CON2 (VID:PID
0403:6011). You need the BUSID from this output for the usbipd
bind and usbipd attach command. The device name may be truncated in
the DEVICE column, but the VID:PID (0403:6011) is sufficient to
identify it.
Example (BUSID may differ on your system):
PS C:\Users\user> usbipd list
Connected:
BUSID VID:PID DEVICE STATE
...
9-1 0403:6011 USB Serial Converter A, USB Serial Converter B, USB Seria... Not shared
Attach the device to WSL using the BUSID shown by usbipd list:
usbipd bind --busid 9-1
usbipd attach --wsl --busid 9-1
After attaching, the serial ports appear in WSL as /dev/ttyUSB*.
We have confirmed that the west flash command takes longer to complete on WSL compared
to native Linux. (65 KBytes writing: WSL - about 1 minute / Native Linux – about 20 seconds)
|