Tried to mount a SDCHI card in the internal card reader on my ’09 MBP running lion 10.9.2 and no luck..

The fix?

Run XQuartz from Spotlight. It should open up a terminal window. You should now be able to insert the SDCH(i) card and have it mounted as a normal drive. Weird fix, but it worked.



If you EVER Want to get TI’s SmartRF Board Examples to Work…


Open the samples in IAR studio.
In Workspace window->files select the root of the project
(i.e click on “light_switch – srf05_cc2530” for light_switch project).
Open “project options” (or just click Alt+F7)
Go to the Linker menu->Config (tab)->Linker command file (sub menu)
Ensure that Override default is checked.
Copy the following line to the override default line:
$TOOLKIT_DIR$\config\devices\Texas Instruments\lnk51ew_cc2530F256.xcl
Ensure that the device you have chosen is the device you are actually using.
You can choose the device manually from the opened list once you clicked
on … button. cc2530F256 stands for cc2530 SoC with 256Kb of internal FLASH.

Xilinx SP606 FPGA + MicroBlaze + LWIP // SPI Flash Bootloader Generation

General Project Setup
One of the most important points here is that if you’re attempting to create an embedded system is that your linker script is setup properly. When using LWIP, I had to increase the heap and stack size of my main application to 0x0A00 as seen below.


Bootloader Generation
From the SDK, create a default bootloader (srec_bootloader)

Here’s it’s linker script…


Ensure that in your blconfig.h file you have the following line
#define FLASH_IMAGE_BASEADDR 0x87200000
This tells the bootloader where to begin pulling the SREC data (your actual executable application)

Program the FPGA w/ the system bit file and the srec bootloader.

Program FPGA  (on worklaptop)_006

Take the download.bit file from the hardware platform
Run the following commands

impact -batch make_bpi_up.impact
xmcsutil -accept_notice -18 pi outfile.hex -o bootloader.bin

(The last command above creates a bootable image w/ your FPGA bit file and the bootloader)

Program your application @ the offset specified by your bootloader using XSDK…

Next, program the bootloader @ 0x0 using XSDK

Note, when you’re selecting “Program Flash” from XSDK, you’ll need to browse to the bootloader.bin and select * as opposed to “.bin;.elf;*.srec” in the file type filter in the browser window so you’ll be able to select the bootloader.bin file itself.


Let me know if you need me to clarify any of the steps in the comments below

The make_bpi_up.impact file consists of the following

setMode -pff
setSubmode -pffparallel
setPreference -pref StartupClock:Auto_Correction
addPromDevice -p 1 -size 32768
addDesign -version 0 -startaddress 000000
addDeviceChain -index 0
addDevice -p 1 -file download.bit
generate -format hex -fillvalue FF -output outfile


Even though i’m sure I have about 1 subscriber (probably a robot) I feel bad about neglecting the blog. Lots of exciting stuff has been happening and there’s lots to catch up on. Stay tuned!

Monitoring USB Traffic Using Wireshark under Linux

Easy as pie.

sudo modprobe usbmon

Then runwireshark as normal and select the USB interface. Here’s a pic for the visually inclined. You may select between the two or more interfaces to find which one has the device you’re trying to debug. If there’s an issue, check with

tail -f /var/log/syslog

to compare the errors you’re getting on the bus to determine which usbmon interface to observe.

Also, if you’re looking to quickly monitor any USB errors / problems, use the following filter in wireshark:

usb.urb_status < 0

Change Mouse Focus Behavior – Gnome

You can use dconf-editor to change the default mouse behavior. I prefer sloppy focus, but I do want the focus to change the active window. Not sure how to accomplish that because as soon as you move the mouse the focus is then changed to the previously-active window, not the one that just popped up.


The placde to edit the behavior in dconf-editor is in:
org / gnome / desktop / wm / preferences

GNOME 3 on Ubuntu 12.10 NVIDIA Quadro NVS 4200M

In the BIOS settings, disable Optimus in Display settings


sudo vim /etc/modprobe.d/blacklist.conf
+ add 'blacklist nouveau'
sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get --reinstall install libgl1-mesa-glx
sudo apt-get install nvidia-current nvidia-current-updates-dev
sudo apt-get -y install nvidia-glx nvidia-xconfig

I had previously gone through the steps to getting gnome 3 on Ubuntu, so this really only fixes the video card driver so X can recognize it properly on startup. You may need to go through and install more stuff, but this at least gives you a properly configured system for running Gnome 3 using the aforementioned configuration.

Python Print Newline Drama

When using the following:

def processSerialData():
    line = ser.readline()
    if len(line) > 2:
        print line

You’ll notice that the output will automatically append an additional newline sequence ‘/n/r’

If you change

print line


print line,

(notice the comma following the variable line) you will keep the interpreter from adding the additional newline.

Current Personal Projects / Efforts

Time to consolidate my efforts project-wise. Too much spreading and not enough butter.

High Priority Projects
BBQ Controller
FINALLY linking all the different aspects of product design/development that i’ve learned and been involved with in one complete, in-production project.
Skills Used
Embedded Systems Design/Implementation
PCB Design / Layout
C, Python
API Development
Database Modeling / Implementation
Advertising / Marketing

Garage Makeover
More organization, more time, more time less stress, less stress, longer life.
Skills Used
Finishing / Closing

Low Priority Projects
UDS Enhancements
Outdoor Kitchen
NFL Stats + Fantasy Aggregation and Visualization

Great Explanation of Passing Arrays/Functions as Parameters in C

Was doing some research earlier today and ran across this post by a very talented CS student.

Passing Arrays and Functions as Parameters : StackOverflow