Can I install the developer VM image natively?

Firmware/software/electronics
Post Reply
salocinx
Beginner
Posts: 18
Joined: Wed Feb 06, 2019 7:58 pm
Contact:

Can I install the developer VM image natively?

Post by salocinx » Sun Sep 08, 2019 11:12 am

Hi

I just received my ST-LINK/V2 device and would like to make progress with my ESP32 deck project. As suggested by the online resources, I checked out the development VM together with VirtualBox on my Windows PC. But it seems, that I have issues with the USB ports, PC-Client doesn't recognize my CrazyRadio PA dongle and the ST-LINK/V2 debugger doesn't to be recognized as well; since the flash targets in Eclipse don't work. Then I read something about going native would be the better choice.

So I would like to install a native Xubuntu/Ubuntu Crazyaflie development system. What's the best way to achieve a similar development environment like the Bitrcraze VM provides. Is there any way to "install" the VM image on a realy Xubuntu/Ubuntu machine somehow? Are there detailed installation/requirements somewhere online in case I need to install Eclipse/ST-LINK/V2/GDB/etc. manually myself? Any help is highly appreciated!

Thank you & cheers,
Nicolas



tobias
Bitcraze
Posts: 1890
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Can I install the developer VM image natively?

Post by tobias » Tue Sep 10, 2019 7:12 am

You could start trying to setup the environment on windows. There is a guide here, might be a bit outdated, but a good start.

salocinx
Beginner
Posts: 18
Joined: Wed Feb 06, 2019 7:58 pm
Contact:

Re: Can I install the developer VM image natively?

Post by salocinx » Thu Sep 12, 2019 1:49 pm

Hi Tobias.

Thanks for your quick reply. I meanwhile found a way to configure the USB devices so that they are accessible from within the VM. Now it seems to work, at least I can use the "flash using debugger" make target in Eclipse and the firmware gets flashed to the CF2 through the ST-LINK/V2 automatically - wonderful :-) ! Next I will try a debug session, crossing fingers it will work.

Here's what I had to do in order to access the USB devices within the Xubuntu VM provided by Bitcraze (ST-LINK/V2 and CrazyRadio PA USB Dongle):

1.) Installing VirtualBox Extension Pack (to enable USB2 and USB3 support, by default VirtualBox only supports USB1)
-> VirtualBox -> Preferences -> Extensions -> "Add" (https://download.virtualbox.org/virtualbox/ => use same version as your VirtualBox version)

2.) Start the Xubuntu Bitcraze VM and open a Linux terminal and type (username of VM is "bitcraze" and password is "crazyflie" if needed):

Code: Select all

$ sudo gpasswd -a bitcraze vboxsf
3.) Check if bitcraze user is added to the group by typing:

Code: Select all

$ groups bitcraze
4.) Shutdown the Bitcraze VM and go to "Settings -> USB" of your VM instance and click "USB 2.0 (EHCI) Controller" or better "USB 3.0 (xHCI) Controller" if your PC supports USB 3.0

5.) Next, within the same window, add "USB Device Filters". Make sure your ST-LINK/V2 and CrazyRadio PA dongles are plugged-in to your PC:
-> Add "STMicroelectronics STM32 STLink [0100]
-> Add "Bitcraze Crazyradio PA USB Dongle [0053]

6.) Now power-on the Xubuntu Bitcraze VM again and open a Linux terminal and type the following to list all active USB devices connected to your PC:

Code: Select all

$ lsusb
Finally run Eclipse IDE and start the make target "flashing using debugger" to validate everything is working fine. Don't forget to connect the ST-LINK/V2 via USB and a turned-on CF2 via the Bitcraze debug adapter to ST-LINK/V2 using the JTAG flat cable.

salocinx
Beginner
Posts: 18
Joined: Wed Feb 06, 2019 7:58 pm
Contact:

Re: Can I install the developer VM image natively?

Post by salocinx » Thu Sep 12, 2019 7:28 pm

I followed the instructions in the wiki here, but unfortunately I get the following error when trying to start a debug session in Eclipse CDT:

Code: Select all

Error in services launch sequence
Launching command [/opt/gnuarmeclipse/openocd/0.9.0-201505190955/bin/openocd -c gdb_port 3333 -c telnet_port 4444 -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c targets -c echo "Started by GNU ARM Eclipse"] failed.
Launching command [/opt/gnuarmeclipse/openocd/0.9.0-201505190955/bin/openocd -c gdb_port 3333 -c telnet_port 4444 -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c targets -c echo "Started by GNU ARM Eclipse"] failed.
Cannot run program "/opt/gnuarmeclipse/openocd/0.9.0-201505190955/bin/openocd": Unknown reason
Any idea what I am doing wrong?

Post Reply