11-03-2019, 09:56 AM
(This post was last modified: 11-03-2019, 09:56 AM by Hikari_Tadashi.
Edit Reason: MIspelling
)
I was thinking about hooking mine up to a Raspberry PIs GPIO pins, and compiling on my desktop, and doing the upload/download/monitoring over the network.
I have an unrelated question though. When these go into production will we still be able to hack on them like we are now? I would love to keep doing dev on my watch even if my design isn't where the community puts its weight behind
I get a 404 error on that URL.
I decided to test developing for the PineTime using Microsoft Windows Subsystem for Linux (WSL). This allows you to run Linux under Windows 10 without using a hypervisor or emulator like QEMU, VirtualBox or VMware, I ran my tests on a Microsoft Surface Pro 4.
Summary: Everything ran perfectly except for the most important part. WSL could not access the STLink device to program the target device. But there was a workaround.
The WSL feature is turned off by default so on Windows 10 you have to go into Settings - Apps - Programs and Features - Turn Windows Features On and Off. Click the checkbox for Windows Subsystem for Linux and OK. After the restart I had WSL 1 installed. Then you download and install the Linux version of your choice FROM THE MICROSOFT STORE. I chose Debian ‘buster’.
Once Debian was installed I could open a special command prompt window and issue standard Linux commands. Linux graphics are not supported.
The Debian version supplied by Microsoft is quite lean. A lot of the standard commands are not included. In order to get an environment suitable for programming I had to use APT to install the following: git, make, unzip, bzip2, python, stlink-tools. I also downloaded and installed the gcc-arm cross compiler and toolchain.
For testing I used a standard STLink V2 and an old STM32F103C8T6 ‘blue pill’ board I had available. I downloaded FreeRTOS. I built the standard ‘blink the LED’ program. There were no problems building the bin file and performance was good. But then a serious problem appeared.
Debian could not see the STLink plugged into a USB port. Windows could see it but Linux could not. I found out that Linux under WSL can only access USB drives and similar devices but not other devices like the STLink. A problem has been opened with Microsoft about this.
It is possible to get around this problem. Debian Linux provides a mount point /MNT/C which points to the Windows C: drive. I copied the bin file created by the Linux build process to a Windows directory. I then went into Windows and used the STM32 ST-LINK Utility from STMicroelectronics to program the bin file into the blue pill device. Everything worked perfectly.
So, if you only have a Windows 10 system you can quite easily create a Linux environment to do developing for PineTime, with the only problem being you have to program the PineTime using Windows tools.