<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>welcome to the world of...</title>
	<atom:link href="http://www.smallbulb.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.smallbulb.net</link>
	<description>Looks like a small bulb used to indicate something unusual, like a malfunction.</description>
	<lastBuildDate>Tue, 14 Feb 2012 10:59:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Mass erase of MSP-EXP430FR5739</title>
		<link>http://www.smallbulb.net/2012/202-mass-erase-of-msp-exp430fr5739</link>
		<comments>http://www.smallbulb.net/2012/202-mass-erase-of-msp-exp430fr5739#comments</comments>
		<pubDate>Tue, 07 Feb 2012 21:03:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[experimenter board]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[MSP-EXP430FR5739]]></category>
		<category><![CDATA[msp430]]></category>
		<category><![CDATA[mspdebug]]></category>
		<category><![CDATA[mspgcc]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=202</guid>
		<description><![CDATA[I bought myself a new toy &#8211; MSP-EXP430FR5739 experimenter board. It didn&#8217;t stay working long because I ran into the same trouble like the guy here. Mspdebug was complaining about blow fuses. Fix was quite easy thanks to my another toy MSP-EXP430G2 LaunchPad which I luckily bought together with the experimenter board. First of all [...]]]></description>
			<content:encoded><![CDATA[<p>I bought myself a new toy &#8211; <a href="http://www.ti.com/tool/msp-exp430fr5739">MSP-EXP430FR5739 experimenter board</a>. It didn&#8217;t stay working long because I ran into the same trouble like the guy <a href="http://www.mail-archive.com/mspgcc-users@lists.sourceforge.net/msg10446.html">here</a>. Mspdebug was complaining about blow fuses. Fix was quite easy thanks to my another toy <a href="http://www.ti.com/tool/msp-exp430g2">MSP-EXP430G2 LaunchPad</a> which I luckily bought together with the experimenter board.<span id="more-202"></span></p>
<p>First of all I was confused at the beginning by no ability to load any program at all. It failed on erasing the chip. Solution: do not use programming command</p>
<pre>$ mspdebug rf2500 "prog test.elf"</pre>
<p>but use</p>
<pre>$ mspdebug rf2500 "load test.elf"</pre>
<p>because FRAM chips don&#8217;t need erasing.</p>
<p>After few loading rounds the big trouble appeared. It took me some googling to find <a href="http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/150394.aspx">this discussion</a>. This clever guy Donald created a <a href="http://dbindner.freeshell.org/msp430/fram_bsl.html">simple program</a> for LaunchPad to use BSL to mass erase the experimenter board. I tried to compile and load the program on my own but without success. The red LED always stayed on. I tried it with and without soldered crystal, both failed. Then I used Donald&#8217;s prebuilt binary with soldered crystal and it worked.</p>
<p>Now I will wait how long it will take to break again.</p>
<h4>Update 2012-02-09</h4>
<p>It didn&#8217;t take very long to jam again. Actually it took about 5 rounds of programming. My frustration was huge. After lots of another trials and failures I stumbled on a little code in mspdebug/drivers/fet.c:</p>
<pre>/* This packet seems to be necessary in order to program on the
 * MSP430FR5739 development board.
 */
if (xfer(dev, 0x30, NULL, 0, 0) &lt; 0)
  printc_dbg("fet: warning: message 0x30 failed\n");</pre>
<p>At least in my case it is not neccessary. I removed the code, experimenter board programming works fine and it does not jam any more. What a lucky shot <img src='http://www.smallbulb.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h4>Update 2012-02-12</h4>
<p>Well, card is blocked again. But this time it takes much more programming cycles then before. Better than nothing. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2012/202-mass-erase-of-msp-exp430fr5739/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python setup.py to DEB package</title>
		<link>http://www.smallbulb.net/2011/194-python-setup-py-to-deb-package</link>
		<comments>http://www.smallbulb.net/2011/194-python-setup-py-to-deb-package#comments</comments>
		<pubDate>Fri, 13 May 2011 09:29:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[distribution]]></category>
		<category><![CDATA[distutils]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[setup.py]]></category>
		<category><![CDATA[setuptools]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=194</guid>
		<description><![CDATA[From time to time I hit an interesting Python package which is not available in a DEB package. Setup.py/distutils/setuptools are de facto standard but the base binary distribution command set includes only RPM support. I don&#8217;t like python setup.py install. I prefer full installation/purging control via Ubuntu package system. Solution is easy. Install package python-stdeb [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I hit an interesting Python package which is not available in a DEB package. Setup.py/distutils/setuptools are de facto standard but the base binary distribution command set includes only RPM support. I don&#8217;t like <em>python setup.py install</em>. I prefer full installation/purging control via Ubuntu package system. Solution is easy.</p>
<p>Install package <strong>python-stdeb</strong> and then execute</p>
<pre>python setup.py --command-packages=stdeb.command bdist_deb</pre>
<p>And your DEB is ready!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2011/194-python-setup-py-to-deb-package/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu encrypted home</title>
		<link>http://www.smallbulb.net/2011/182-ubuntu-encrypted-home</link>
		<comments>http://www.smallbulb.net/2011/182-ubuntu-encrypted-home#comments</comments>
		<pubDate>Fri, 18 Mar 2011 18:04:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ecryptfs]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[luks]]></category>
		<category><![CDATA[notebook]]></category>
		<category><![CDATA[pam]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=182</guid>
		<description><![CDATA[I played with my new toy &#8211; HP Mini 5103 WT211ES. eCryptfs is not as enterprise as they say. It started to fail on Ubuntu 10.10. And also it is terribly slow especially for seeking. So I was looking for a better solution. I didn&#8217;t want the full disk encryption which the alternative CD offers [...]]]></description>
			<content:encoded><![CDATA[<p>I played with my new toy &#8211; <strong>HP Mini 5103 WT211ES</strong>. <strong><a href="https://launchpad.net/ecryptfs" target="_blank">eCryptfs</a></strong> is not as enterprise as they say. It started to <a href="https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/372014" target="_blank">fail</a> on <strong>Ubuntu 10.10</strong>. And also it is <strong>terribly slow</strong> especially for seeking. So I was looking for a better solution. I didn&#8217;t want the <strong>full disk encryption</strong> which the alternative CD offers during the installation because the disk is very fast and the CPU is not so fast <img src='http://www.smallbulb.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I decided to make a <strong>separate partition to host my home directory</strong> and other private data.<span id="more-182"></span></p>
<p>First I booted into the Live CD to make the disk preparations. I splitted the disk into 3 partitions:</p>
<ul>
<li>250 GB for root</li>
<li>60 GB encrypted partition</li>
<li>10 GB swap</li>
</ul>
<p>For the encryption I decided to utilize <strong>aes-ebc-plain</strong> with<strong> key size 128 bits</strong> for its <a href="http://blog.wpkg.org/2009/04/23/cipher-benchmark-for-dm-crypt-luks/" target="_blank">speed</a> (I don&#8217;t need military grade safety). Partitions formatting:</p>
<pre>mkfs.ext4 /dev/sda1
cryptsetup luksFormat -c <code>aes-ecb-null -s 128 /dev/sda2
cryptsetup luksOpen /dev/sda2 encpart
mkfs.ext4 /dev/mapper/encpart
cryptsetup luksClose encpart
</code>mkswap /dev/sda3</pre>
<p>First idea was to have the encrypted partition mounted directly to <em>/home/bobalice</em> in my final system but I wasn&#8217;t able to make the mount point owned by <em>bobalice</em>. So I created a directory <em>home/bobalice</em> on the encrypted partition and used symbolic link to &#8220;attach it&#8221;. See below. After the disk preparation I ran ordinary Ubuntu installation using the root and swap partition.</p>
<h2>Login mount</h2>
<p>Next step was to setup automatic mount of the encrypted partition. It was a kind of easy. I installed package <strong>libpam-mount</strong> and added lines to <em>/etc/security/pam_mount.conf.xml</em>:</p>
<pre>&lt;mkmountpoint enable="1" remove="true" /&gt;
&lt;volume user="bobalice" fstype="crypt"
    path="/dev/disk/by-uuid/55f028b1-3306-4de6-b420-6478ea649604"
    mountpoint="/mnt/localcrypt" /&gt;</pre>
<p>It says that only on <em>bobalice</em> login the mounting should be performed. I advice to use <strong>by-uuid</strong> partition reference because <strong>sd*</strong> labels are not constant. Now if I login as <em>bobalice</em> the partition will be mounted and ready. Next:</p>
<pre>mv /home/bobalice/.??* /enc/home/bobalice
rm -Rf /home/bobalice
usermod -d /enc/home/bobalice bobalice</pre>
<p>Now I have my home directory on the encrypted partition.</p>
<h2>GDM and initial chdir</h2>
<p>My first idea of home directory mapping was to use a symbolic link (<em>ln -sf /enc/home/bobalice /home/bobalice</em>) but it caused a little trouble with GDM. When I logged in with GDM it changed directory to the path on the encrypted mount, it followed the symlink. It is not a big deal but current working directory was different from <em>$PATH</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2011/182-ubuntu-encrypted-home/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Firefox cache and history cleanup</title>
		<link>http://www.smallbulb.net/2010/158-firefox-cache-and-history-cleanup</link>
		<comments>http://www.smallbulb.net/2010/158-firefox-cache-and-history-cleanup#comments</comments>
		<pubDate>Wed, 05 May 2010 21:25:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[cleanup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=158</guid>
		<description><![CDATA[Firefox gets slower by the time. Lots of data is stored in sqlite databases. First step is cleaning cache &#8211; Menu&#62;Tools&#62;Clear Private Data &#8211; check Cache and Cookies. Other slowing stuff is the browsing history. Cleaning the whole history is not very effective way so why not remove only the oldest items? Run following in [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox gets slower by the time. Lots of data is stored in sqlite databases. First step is cleaning cache &#8211; <em>Menu&gt;Tools&gt;Clear Private Data</em> &#8211; check <em>Cache</em> and <em>Cookies</em>. Other slowing stuff is the browsing history. Cleaning the whole history is not very effective way so why not remove only the oldest items?<span id="more-158"></span> Run following in the Firefox&#8217;s profile directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">MONTH</span>=<span style="color: #000000; font-weight: bold;">`</span>python <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;import time; print int(time.time()-3600*24*30)*1000000&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;DELETE FROM moz_historyvisits WHERE visit_date &lt; <span style="color: #007800;">$MONTH</span>;&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> sqlite3 places.sqlite
<span style="color: #000000; font-weight: bold;">for</span> z <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span>.sqlite; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;VACUUM;&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> sqlite3 <span style="color: #ff0000;">&quot;<span style="color: #007800;">$z</span>&quot;</span>; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>This will remove items older than 30 days and maintain all the sqlite databases. Speedup is often very striking.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2010/158-firefox-cache-and-history-cleanup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSPGCC4, debugging</title>
		<link>http://www.smallbulb.net/2010/153-mspgcc4-debugging</link>
		<comments>http://www.smallbulb.net/2010/153-mspgcc4-debugging#comments</comments>
		<pubDate>Tue, 13 Apr 2010 19:34:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ddd]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[msp430]]></category>
		<category><![CDATA[mspdebug]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=153</guid>
		<description><![CDATA[I recently found a forked project MSPGCC4. It is built against newer GCC and GDB. It supports multiple versions. I tried GCC 4.4.3 and GDB 7.0.1. The compilation and installation is very easy. Just run the buildgcc.sh, choose wanted versions and watch the progress. Compilation of source code for MSP430 is the same like in [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found a forked project <a href="http://mspgcc4.sourceforge.net/" target="_blank">MSPGCC4</a>. It is built against newer GCC and GDB. It supports multiple versions. I tried GCC 4.4.3 and GDB 7.0.1. The compilation and installation is very easy. Just run the buildgcc.sh, choose wanted versions and watch the progress.</p>
<p><span id="more-153"></span></p>
<p>Compilation of source code for MSP430 is the same like in the <a href="/2010/138-msp430-gcc-mspdebug">previous article</a>. Lets focus on debugging. I had troubles to make it working with the original MSPGCC project. In other words I didn&#8217;t make it working. But GDB 7.0.1 works better.</p>
<p>Mspdebug supports breakpoints only from newest versions, use git to get it (git clone git://mspdebug.git.sourceforge.net/gitroot/mspdebug). It currently supports <strong>only 1 breakpoint</strong> at a time.</p>
<p>First run the mspdebug in a stub mode:</p>
<pre>$ mspdebug -R gdb
MSPDebug version 0.7 - debugging tool for MSP430 MCUs
Copyright (C) 2009, 2010 Daniel Beer &lt;daniel@tortek.co.nz&gt;
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open interface 1 on 002
rf2500: warning: can't detach kernel driver: No data available
FET protocol version is 30000002
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
Device: MSP430F22xx
Sending magic messages for &gt;= 30000000
Bound to port 2000. Now waiting for connection...
</pre>
<p>Then run debugger. I like DDD:</p>
<pre>$ ddd --debugger msp430-gdb test.elf</pre>
<p>In the debugger console run a command to connect to the stub:</p>
<pre>(gdb) target remote :2000
0x0000e000 in _reset_vector__ ()</pre>
<p>Now you can debug at will.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2010/153-mspgcc4-debugging/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSP430, GCC, mspdebug</title>
		<link>http://www.smallbulb.net/2010/138-msp430-gcc-mspdebug</link>
		<comments>http://www.smallbulb.net/2010/138-msp430-gcc-mspdebug#comments</comments>
		<pubDate>Sat, 10 Apr 2010 21:12:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[mcu]]></category>
		<category><![CDATA[msp430]]></category>
		<category><![CDATA[mspdebug]]></category>
		<category><![CDATA[toolchain]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=138</guid>
		<description><![CDATA[This article describes brief steps to setup a Linux development tools for MSP430 MCU &#8211; compiler and programmer. MSP430 is not as well linux-supported as AVR or 8051 but fortunately there are ways to make it working. GCC The easiest way for users of Debian and derived distributions is to add following repository to /etc/apt/sources.list: [...]]]></description>
			<content:encoded><![CDATA[<p>This article describes brief steps to setup a Linux development tools for <a href="http://focus.ti.com/mcu/docs/mcuprodoverview.tsp?sectionId=95&amp;tabId=140&amp;familyId=342" target="_blank">MSP430</a> MCU &#8211; compiler and programmer. MSP430 is not as well linux-supported as AVR or 8051 but fortunately there are ways to make it working.</p>
<p><span id="more-138"></span></p>
<h2>GCC</h2>
<p>The easiest way for users of Debian and derived distributions is to add following repository to /etc/apt/sources.list:</p>
<pre>deb http://merlin.fit.vutbr.cz/FITkit/download/debian debian fitkit
</pre>
<p>Then run as root:</p>
<pre># wget http://merlin.fit.vutbr.cz/FITkit/download/debian/debkey.asc -O- | apt-key add -
# apt-get update
# apt-get install msp430-devtools
</pre>
<p>After that you will have full toolchain. Lets try to compile the following C source:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;io.h&gt;</span>
&nbsp;
<span style="color: #993333;">void</span> wait<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>          <span style="color: #666666; font-style: italic;">//delay function</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">volatile</span> <span style="color: #993333;">int</span> i<span style="color: #339933;">;</span>        <span style="color: #666666; font-style: italic;">//declare i as volatile int</span>
  <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span><span style="color: #0000dd;">32000</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">//repeat 32000 times</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  WDTCTL <span style="color: #339933;">=</span> WDTPW <span style="color: #339933;">|</span> WDTHOLD<span style="color: #339933;">;</span>
&nbsp;
  P1DIR<span style="color: #339933;">=</span><span style="color: #208080;">0xFF</span><span style="color: #339933;">;</span>            <span style="color: #666666; font-style: italic;">//port 1 = output</span>
  P1OUT<span style="color: #339933;">=</span><span style="color: #208080;">0x01</span><span style="color: #339933;">;</span>            <span style="color: #666666; font-style: italic;">//set bit 0 in port 1</span>
&nbsp;
  <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">;;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>              <span style="color: #666666; font-style: italic;">//infinite loop</span>
    P1OUT<span style="color: #339933;">=</span>~P1OUT<span style="color: #339933;">;</span>        <span style="color: #666666; font-style: italic;">//invert port 1</span>
    wait<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>              <span style="color: #666666; font-style: italic;">//call delay function</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Compile the source and generate output suitable for programming the MCU:</p>
<pre>$ msp430-gcc -Os -mmcu=msp430x2234 -o test.elf test.c
$ msp430-objdump -DS test.elf &gt; test.lst      # assembler output
$ msp430-objcopy -O ihex test.elf test.hex
$ ls
test.c  test.elf  test.hex  test.lst</pre>
<p>It&#8217;s done!</p>
<h2>Programming</h2>
<p>For this purpose there is all-in-one tool called <a href="http://homepages.xnet.co.nz/~dlbeer/" target="_blank">mspdebug</a>. It was originaly created for <a href="http://focus.ti.com/docs/toolsw/folders/print/ez430-rf2500.html" target="_blank">EZ430-RF2500</a> but now it supports all the MSP430 programmers. I&#8217;ve tested it with the RF2500 programmer. The easiest way to program the MCU&#8217;s flash is to run the following command:</p>
<pre>$ mspdebug -R "prog test.hex"
MSPDebug version 0.6 - debugging tool for MSP430 MCUs
Copyright (C) 2009, 2010 Daniel Beer &lt;daniel@tortek.co.nz&gt;
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open interface 1 on 002
rf2500: warning: can't detach kernel driver: No data available
FET protocol version is 30000002
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
Device: MSP430F22xx
Erasing...
Writing 120 bytes to e000...
Writing  32 bytes to ffe0...</pre>
<p>It&#8217;s done!</p>
<h2>Debugging</h2>
<p><a href="/2010/153-mspgcc4-debugging">Next time&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2010/138-msp430-gcc-mspdebug/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Internet Explorer fixators &#8211; PNG, box model, &#8230;</title>
		<link>http://www.smallbulb.net/2009/109-internet-explorer-fixators-png-box-model</link>
		<comments>http://www.smallbulb.net/2009/109-internet-explorer-fixators-png-box-model#comments</comments>
		<pubDate>Thu, 10 Sep 2009 07:44:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[box model]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PNG]]></category>
		<category><![CDATA[selectors]]></category>
		<category><![CDATA[transparency]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=109</guid>
		<description><![CDATA[The old and painful problem with Internet Explorer is the PNG transparency. IE6 is still so wide-spread, damn. Few clever people created a JavaScript fixes for that. The best I know is iepngfix. It has a little limitation and works for IMG, background-image, &#8230; Besides the PNG transparency Internet Explorer has many other holes. Missing [...]]]></description>
			<content:encoded><![CDATA[<p>The old and painful problem with Internet Explorer is the <strong>PNG transparency</strong>. IE6 is still so wide-spread, damn. Few clever people created a JavaScript fixes for that. The best I know is <strong><a href="http://www.twinhelix.com/css/iepngfix/" target="_blank">iepngfix</a></strong>. It has a little limitation and works for IMG, background-image, &#8230;</p>
<p>Besides the PNG transparency Internet Explorer has many other holes. <strong>Missing CSS selectors, wrong box model</strong>, &#8230; I found <strong><a href="http://dean.edwards.name/IE7/" target="_blank">IE7</a></strong> script which patches most of those holes. So great! Now I can use selectors like DIV &gt; DIV or DIV + DIV everywhere. It also fixes the box model (total width = margin + border + padding + width) and min-height/min-width. It tries to fix the PNG transparency too but it is not as well tuned as the iepngfix. You should remove this path of the script.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2009/109-internet-explorer-fixators-png-box-model/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transition to FastCGI</title>
		<link>http://www.smallbulb.net/2009/96-transition-to-fastcgi</link>
		<comments>http://www.smallbulb.net/2009/96-transition-to-fastcgi#comments</comments>
		<pubDate>Fri, 08 May 2009 16:36:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[horde]]></category>
		<category><![CDATA[mpm]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[prefork]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[worker]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=96</guid>
		<description><![CDATA[Apache&#8217;s prefork MPM is a very heavy memory eater. Thirty instances together with PostgreSQL can consume more then 1.5GB of memory. I have already managed the PostgreSQL to become modest. Now the Apache is the target. I need to decrease the memory consumption or decrease the processes count. How about worker MPM? It uses more [...]]]></description>
			<content:encoded><![CDATA[<p>Apache&#8217;s <strong>prefork MPM</strong> is a very heavy memory eater. Thirty instances together with PostgreSQL can consume more then 1.5GB of memory. I have already managed the PostgreSQL to become modest. Now the Apache is the target.</p>
<p><span id="more-96"></span></p>
<p>I need to decrease the memory consumption or decrease the processes count. How about <strong>worker MPM</strong>? It uses more threads than processes.</p>
<p>I&#8217;m running a lot&#8217;s of applications mostly with mod-python. But I need PHP for applications like phpmyadmin and Horde. Biggest issue is how to replace <strong>mod-php</strong> which depends on the <strong>prefork MPM</strong> because it is not thread-safe. Solution can be found in <strong>FastCGI.</strong> Let&#8217;s try it:</p>
<ol>
<li>get rid of <strong>apache2-mpm-prefork</strong> and <strong>libapache2-mod-php5</strong> and install <strong>apache2-mpm-worker</strong> and <strong>php5-cgi</strong>.</li>
<li>Configure Apache. You can find a lots of examples on the internet how to simply configure PHP+FastCGI. For eager beavers a quick tour:
<ol>
<li>enable Apache&#8217;s <strong>action</strong> and <strong>fastcgi</strong> modules.</li>
<li>put following lines in Apache&#8217;s configuration:
<pre>AddType application/x-httpd-php .php
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php5</pre>
</li>
</ol>
</li>
</ol>
<p>Voila! Simple PHP scripts works!</p>
<p>But first problem arises. I can&#8217;t get into <strong>phpmyadmin</strong>. Firefox wants to download the page as PHTML. <a href="http://lists.debian.org/debian-user/2006/01/msg00286.html" target="_blank">Solution</a> is to clear the Firefox&#8217;s cache.</p>
<p>Another and harder problem comes. I have some .htaccess files with PHP directives (like <strong>php_flag</strong>). Now they doesn&#8217;t work because they worked only with <strong>mod-php</strong>. And generaly it will not work with FastCGI anyway. Some suggestions can be found e.g. in <a href="http://www.forum.psoft.net/archive/index.php/t-21125.html" target="_blank">H-Sphere forum</a>. Well you have to go around <img src='http://www.smallbulb.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2009/96-transition-to-fastcgi/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filtering duplicities in XSLT</title>
		<link>http://www.smallbulb.net/2009/85-filtering-duplicities-in-xslt</link>
		<comments>http://www.smallbulb.net/2009/85-filtering-duplicities-in-xslt#comments</comments>
		<pubDate>Wed, 29 Apr 2009 12:27:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[duplicites]]></category>
		<category><![CDATA[filtering]]></category>
		<category><![CDATA[xpath]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=85</guid>
		<description><![CDATA[I had a problem: I needed to find some tags in a subtree without duplicities. The duplicity was determined by a tag&#8217;s attribute value. XPath has a function distinct-values but it doesn&#8217;t work in xsltproc nor 4xslt. I found a few forums where the problem was discussed. The common solution is to use &#60;xsl:key&#62; tag [...]]]></description>
			<content:encoded><![CDATA[<p>I had a problem: I needed to find some tags in a subtree without duplicities. The duplicity was determined by a tag&#8217;s attribute value. <span id="more-85"></span>XPath has a function <a href="http://www.w3schools.com/XPath/xpath_functions.asp#sequence" target="_blank">distinct-values</a> but it doesn&#8217;t work in xsltproc nor 4xslt. I found a few forums where the problem was discussed. The common solution is to use &lt;xsl:key&gt; tag and functions key() and generate-id() (e.g. <a href="http://www.stylusstudio.com/xsllist/200412/post70880.html" target="_self">here</a>). However this works only for an in advance defined subtree. I didn&#8217;t find any constraint for the &lt;xsl:key&gt; tag to focus only to a nonparticular subtree.</p>
<p>I needed to work with tags &lt;cost&gt; with an unique attribute <em>role</em> in a current section. My solution works with a combination of &lt;xsl:for-each&gt; and &lt;xsl:if&gt;:</p>
<pre>&lt;xsl:variable name="cursection" select="."/&gt;
&lt;xsl:for-each select=".//cost"&gt; &lt;!-- get all of those --&gt;
   &lt;xsl:variable name="role" select="@role"/&gt;
   &lt;!-- id(current cost) == id(first cost in the section with the given role) --&gt;
   &lt;xsl:if test="generate-id()=generate-id($cursection//cost[@role=$role][1])"&gt;
     ....
   &lt;/xsl:if&gt;
&lt;/xsl:for-each&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2009/85-filtering-duplicities-in-xslt/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MagicDraw &#8211; UML tool</title>
		<link>http://www.smallbulb.net/2009/76-magicdraw-uml-analysis-and-modeling</link>
		<comments>http://www.smallbulb.net/2009/76-magicdraw-uml-analysis-and-modeling#comments</comments>
		<pubDate>Tue, 14 Apr 2009 20:16:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[diagram]]></category>
		<category><![CDATA[magicdraw]]></category>
		<category><![CDATA[uml]]></category>

		<guid isPermaLink="false">http://www.smallbulb.net/?p=76</guid>
		<description><![CDATA[Good (meaning many features and userfriendly) and cheap UML modeling tool is a hard candy to find. I need at least following stuff: use case, class, activity and sequence diagrams not just dummy diagrams but also some semantics ability to run under Linux First I started looking in my Ubuntu distro. I found: Dia &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Good (meaning many features and userfriendly) and cheap UML modeling tool is a hard candy to find. I need at least following stuff:</p>
<ul>
<li>use case, class, activity and sequence diagrams</li>
<li>not just dummy diagrams but also some semantics</li>
<li>ability to run under Linux</li>
</ul>
<p><span id="more-76"></span>First I started looking in my Ubuntu distro. I found:</p>
<ul>
<li> <a href="http://live.gnome.org/Dia" target="_blank">Dia</a> &#8211; great generic diagramming tool but with no semantics.</li>
<li><a href="http://uml.sourceforge.net/" target="_blank">Umbrello</a> &#8211; basic UML semantics but IMHO only for kids <img src='http://www.smallbulb.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li><a href="http://gaphor.sourceforge.net/">Gaphor</a> &#8211; I didn&#8217;t try it, it depends on Zope packages (why?!?) and I don&#8217;t want the Zope.</li>
<li><a href="http://argouml.tigris.org/" target="_blank">ArgoUML</a> &#8211; Yeah! What a tool! Lots of diagrams, lots of choices, nice UI. I like it. But.. wait&#8230; It has no undo/redo? Okay, no big deal, I have to be careful. It has not cut/copy/paste?? No way!</li>
</ul>
<p>After the disapointment with ArgoUML I decided to look into commercial waters. Few bucks cannot kill me. Tools like Borland Together or IBM Rational Rose are too expensive. I need something with good power/price ratio.</p>
<ul>
<li><a href="http://www.gentleware.com/" target="_blank">Poseidon</a> &#8211; commercial version of ArgoUML. Has undo/redo, limited cut/copy/paste, better UI than ArgoUML but not so good to pay for it.<a href="http://www.gentleware.com/" target="_blank"><br />
</a></li>
<li><a href="http://jude.change-vision.com/jude-web/index.html" target="_blank">Jude</a> &#8211; In addition to the basic UML diagrams it has ERA diagrams, mind mapping, forward/reverse engineering of Java code&#8230;<a href="http://jude.change-vision.com/jude-web/index.html" target="_blank"><br />
</a></li>
<li><a href="http://www.magicdraw.com/">MagicDraw</a> &#8211; my final choice.</li>
</ul>
<h2>Why MagicDraw?</h2>
<p>Finalists were Jude and MagicDraw. Jude has more &#8220;big&#8221; features but is also more expensive ($280) and it is subjectively less userfriendly. MagicDraw won because:</p>
<ul>
<li>It has fancy UI and nice diagrams <img src='http://www.smallbulb.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>It&#8217;s cheap &#8211; &#8220;Personal Edition&#8221; costs $149.</li>
<li>There is also a free &#8220;read-only&#8221; edition.</li>
<li>Keyboard control.</li>
<li>It has tons of (in)significant features like fullscreen, &#8220;jumps&#8221; on crossing lines, selection mode toggle (complete and partial coverage), formatting, nifty zoom/preview window, etc&#8230;</li>
</ul>
<p>But it has also a few cons:</p>
<ul>
<li>I didn&#8217;t find any &#8220;non-exact-UML&#8221; elements like a circle, standalone line or bezier curve. There is only something called &#8220;rectangular shape&#8221; and &#8220;separator&#8221; which is only a horizontal line.</li>
<li>Huge uncompressed saved files. I&#8217;m saving into uncompressed because of SVN &#8211; simple diffs.</li>
<li>I will find more later&#8230;</li>
</ul>
<p>Despite those inperfections I have to admit that MagicDraw is and excelent tool.</p>
<h3>Update, 20.4.2009</h3>
<p>I don&#8217;t know how could I miss it but I found a very similar program to the MagicDraw: <a href="http://www.visual-paradigm.com/product/vpuml/" target="_blank">Visual Paradigm for UML</a>. Basic UI is almost the same as MagicDraw. Same toolbars, same windows, the resemblance is huge. It has a quite good pros:</p>
<ul>
<li>cheaper, &#8220;Modeler edition&#8221; costs $99</li>
<li>free &#8220;read-only&#8221; edition</li>
<li>&#8220;Modeler edition&#8221; includes more features than MagicDraw&#8217;s &#8220;Personal edition&#8221; &#8211; requirements management, ERD, &#8230;</li>
<li>free-form elements &#8211; lines, circles, polygons&#8230;</li>
</ul>
<p>It has also cons:</p>
<ul>
<li>Less user-friendly:
<ul>
<li>I miss the keyboard controlled new elements selection.</li>
<li>May be a bug but I created and activity control flow line and when I started typing guard with &#8220;[&#8221; then nothing happened. Only after a letter it started to edit the name.</li>
</ul>
</li>
<li>JRE is bundled in the installation (I think it is a con)</li>
<li>Linux version has only Metal look and feel and the font size is needlessly big.</li>
<li>Workspaces &#8211; I don&#8217;t want a full IDE. I want an UML tool where I will save a single file with my UML model and not a lots of garbage around.</li>
<li>Diagrams are not very nice (at least bad font).</li>
<li>missing tiny things (e.g. matrix swim lanes in activity diagrams)</li>
<li>No project-specific symbol properties.</li>
<li>It can&#8217;t save in an uncompressed format &#8211; not suitable for Subversion.</li>
</ul>
<p>I think I will stay with the MagicDraw.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smallbulb.net/2009/76-magicdraw-uml-analysis-and-modeling/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

