Virtual Machines

buildscc | 12 Sep 2012 | | about

We are running all virtual machines on builds-ashitaka.

Here are the steps that we took while setting them up.

—- The VMs are being managed by ‘virt-manager’ Any user that wants to be able to see and configure VMs must be in the group ‘libvirt’, and then can run ‘virt-manager’. Networking is running BRIDGED. So, we have a bridge device, br0, that both ashitaka and all of its VMs connect to.

Externally, it looks like ashitaka is a switch, that ashitaka and all of its VMs hide behind. The configuration for this is as follows.

On ashitaka, /etc/network/interfaces was modified as follows:

auto br0 iface br0 inet static address 128.197.15.39 gateway 128.197.15.33 netmask 255.255.255.224 bridge_ports eth0 bridge_stp on bridge_maxwait 0 bridge_fd 0

In virt-manager, we set up a network called ‘bridge’, which has some pretty logical setup involving bridging.

—- For Linux VM’s to be able to resolve DNS add the following to /etc/resolv.conf:

domain bu.edu search bu.edu nameserver 128.197.253.183 nameserver 128.197.253.120 nameserver 128.197.253.254


Older · View Archive (146)

stm32f4 discovery dev board

Specs

Open Source Toolchain

Linux

Under linux this is rather straightforward. I was able to compile with toolchain without a hitch using [http://cu.rious.org/make/stm32f4-discovery-board-with-linux/ these instructions], under OS X I would imagine its a tad more of a pain in the ass.

The programs/scripts being used are the following:

  • [https://github.com/esden/summon-arm-toolchain summon-arm-toolchain] : Downloads and compiles the arm-none-eabi toolchain which we will be using. I am not sure if it compiles with the STM32F4’s FPU support.
  • [https://github.com/texane/stlink Texane’s stlink] : Allows us to program using the stlink on the STM32F4 Discovery board. We program using gdb to load the program into SRAM for now. If you link correctly you can flash too. In the future this should work to program other STM32 chips via the SWD link (if the jumpers are set correctly).
  • [http://www.st.com/internet/mcu/product/252149.jsp#SOFTWARE_AND_DEVELOPMENT_TOOLS The official STM32F4 header files and libraries] : Not sure how compatible these are with our toolchain, but its probably worth grabbing them.

OS X

Thanks to [[Alex Whittemore]] there is some good documentation

[here http://www.alexwhittemore.com/open-source-ide-and-toolchain-for-the-stm32f4-discovery-on-mac-osx-lion/] on one method of getting set up with Eclipse.

[[Chris Woodall]] would prefer to use emacs + a makefile to do his development, so the methodology is a little different.

First, you should make sure you have XCode installed, because that will install gcc and all of the development tools you need for some of the future steps. Now, lets get [http://www.macports.org/ macports] if you have a Mac and some self respect you should already have macports anyway (or [http://mxcl.github.com/homebrew/ homebrew]).

Then we will install the arm-none-eabi toolchain, this might take awhile if you have never used macports before, while you are at it you should install git:

$ sudo port install arm-none-eabi-*
$ sudo port install git # optional

Now we will use git to grab texane’s great [https://github.com/texane/stlink stlink program]:

$ mkdir ~/src #optional, but my preferred working directory for installations like this
$ cd ~/src # optional
$ git clone https://github.com/texane/stlink.git
$ cd stlink/gdbserver
$ make

Now we can actually load up an example program! So lets do that:

$ cd ~/src/stlink/examples/blink
$ make CONFIG_STM32F4_DISCOVERY=1

Then connect to the debugger and try it out…

$ arm-none-eabi-gdb
(gdb) target remote localhost:4242
(gdb) load blink_F4.elf
(gdb) continue

You should see the Green, Orange, Blue and Red lights blink on and off. If this worked, then great success!

Makefile and Libraries

So I am using a modified version of the standard STM32 libraries. As I go I might start rewriting parts of the STM32F4 library code for myself. However, at the moment I am use the peripheral access provided by ST.

The library along with some boilerplate template code can be found on [https://github.com/prattmic/stm32f4-templates github (thanks to prattmic)]. I needed to change some CFLAG variables in the Makefile and a few compiler directives in the file ‘'’startup_stm32f4xx.s’’’.

All of these altercations are due to the fact that our compiler wasn’t compiled with support for the hardware FPU. LINK TO MY VERSION COMING SOON.

Newer

xfce4-terminal configuration

Here is my configuration for xfce4-terminal, which is mostly a detailed selection of colors. This belongs in the file ~/.config/Terminal/terminalrc.

Note that, after putting it there, you may need to run killall xfce4-terminal to see the changes: xfce4-terminal runs a daemon, and it does not always see changes in configuration instantly.

[Configuration]
FontName=Monospace
10
MiscAlwaysShowTabs=FALSE
MiscBell=TRUE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=FALSE
MiscMouseAutohide=FALSE
MiscToolbarsDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
ScrollingBar=TERMINAL_SCROLLBAR_NONE
ColorPalette1=#2e2e34343636
ColorPalette9=#555557575353
ColorPalette2=#cccc00000000
ColorPalette10=#efef29292929
ColorPalette3=#4e4e9a9a0606
ColorPalette11=#8a8ae2e23434
ColorPalette4=#c4c4a0a00000
ColorPalette12=#fcfce9e94f4f
ColorPalette5=#34346565a4a4
ColorPalette13=#72729f9fcfcf
ColorPalette6=#757550507b7b
ColorPalette14=#adad7f7fa8a8
ColorPalette7=#060698989a9a
ColorPalette15=#3434e2e2e2e2
ColorPalette8=#d3d3d7d7cfcf
ColorPalette16=#eeeeeeeeecec
ColorForeground=#aaaaaaaaaaaa
ColorCursor=#ffffffffffff
AccelSwitchToTab1=
AccelSwitchToTab2=
AccelSwitchToTab3=
AccelSwitchToTab4=
AccelSwitchToTab5=
AccelSwitchToTab6=
AccelSwitchToTab7=
AccelSwitchToTab8=
AccelSwitchToTab9=
AccelNextTab=
AccelPrevTab=
AccelFullscreen=
AccelNewTab=
AccelNewWindow=
AccelDetachTab=
AccelCloseTab=
AccelCloseWindow=
AccelContents=
ShortcutsNoMenukey=TRUE
ShortcutsNoMnemonics=TRUE
ScrollingOnOutput=FALSE
ScrollingOnKeystroke=FALSE
BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT
BackgroundDarkness=0.900000