• Category Archives software
  • lfs and blfs frustrations

    Today has been a frustrating day. I finished my lfs (linuxfromscratch) 6.3 build and was starting the blfs portion. While I was working on installing xorg and xfce, I ran into some issues.
    first issue was dhcpcd build. version 5 will not compile,  ipv6 issues I believe. I gave up since static ip is fine.

    second issue,  .xz ….
    in the blfs build it instructs you to download. xz files. This is a problem, since blfs book does not inform you or give you the resource to unpack this file.
    To remedy this you can download 7zip,  specifically p7zip.
    To install it,  use make,  then make test, then make install.
    this will install it to /usr/local.
    to use it use, 7za x /your/package.xz
    And that will remedy that whole .xz crap…….

    Third issue,  when compiling xorg protocols ,  xbc(xcb?)_proto requires python interpreter,  so install python first. but remember to install 7zip so you can unpack it lol.
    **Edit** xcb does mention python, it is built after xorg protocols

    I am sure to find more things that don’t make sense with the build. When my box is done,  I will post on the whole process and more of the issues I ran into.

    Hope this helps someone,  because I would hate for someone else to give up on there build  due to poor information. Let me know what ypu think.

  • Getting use out of a thin client


    Today I setup my evo t20. I used the built in terminal emulator to connect to my linux box. So easy and super simple. All that is needed is inetd and telnetd installed on the linux box, no configuration necessary. once installed I set up windows ce to telent to that box and that was it. One thing I did notice was that I couldn’t get nano to work and vi acts all funny. So I will have to figure out a telnet compatable editor so I can use mspdebug and be able to edit the code as well……One step closer to getting a useful work area. If you have any suggestions on telnet editors please let me know.

  • My battle with Ubuntu 11.10

    I decided to finally upgrade my Ubuntu 10.10 to 11.10 and deal with unity or gnome 3.4. Neither of those options looked promising to me. But change is inevitable.

    The whole process was painless, only a few unnecessary librarys removed. When it all finished, unity loaded up and I got to work, trying to make my desktop productive.
    So I went searching and found this link http://blog.sudobits.com/2011/09/08/10-things-to-do-after-installing-ubuntu-11-10/. It definitely helped, like, getting dvd movies to play. Most of it is pretty good advice and the rest is personal preference.

    My opinion on 11.10, I like it but I have my complaints. For example, gnome-shell or gnome classic, when logging in, is better then unity (I’m not going to get into this Unity just sucks, especially on a 32″ monitor) . Gnome-shell ‘s menu bar, it’s very hard to customize it, I’m still looking for the auto-hide option or the opacity setting. And I still can’t figure out how to add things to the top menu bar like the system monitor graph or even a fortune cookie app. The gnome tweak tool helped a bit but there are still large holes in the setting that need to be filled, but over all it does run on my i5 much better then gnome 2. Time to continue on customizing and tweaking the desktop.
    Next is to upgrade to 12.04 lts.

    The battle continues!

  • Ubuntu 10.04, 10.10, 11.04 The bane of my existence!!

    I have been an avid fan of ubuntu and I still am, but for newer hardware only. Recently I had to upgrade to 9.10 and then to 10.x. let start with my first issue in 9.10  and we will go from there. In 9.10 my sound and video would not play. this was caused by pulse audio and also not working together or something like that, personally i could not find the exact issue or cause, which made this issue very hard to fix…. but a fix was found….i will go over that in a min or two lol.

    Next issue was the keyboard and mouse locking up on ubuntu 10.04 and higher, this is a big pain, because once they lock up, both the PS2 keyboard and mouse freeze, and so do the usb keyboard and mouse. This makes is very hard to find a fix since i may have 2 secs of the mouse moving or i might get 5 mins, either way it locks and i have to reboot, and thats not a guaranteed fix.

    So lets start on how i fixed the 9.10, 10.04, 10.11 with an audio issue. The symptoms are choppy music play and then it cuts out, log file filled with “karmic pulseaudio [1653]: ratelimit.c: 2 events supressed” also video usually stops or wont play as well…… to Help most of you out, i have tried everything from recompiling the kernel, to installing from source, compiling pulse from source, changing alsa drivers, changing the scheduling, using every google fix there is……not even launchpad couldnt give me any info. There are bugs listed but no real fixes or workarounds…until now lol.  if you have applications that use pulseaudio ( im not sure what depends on it) this may not be a good workaround.


    Unistall Pulse Audio!!! (Thanks Kevix from the 43oh IRC room/forums!!) He stated that most programs still use alsa and dont need pulseaudio.

    as soon as i did that, my sound worked as well as my video, even the system alerts could be heard!!

    this worked for me, on my audiology and on board sound card…..I do not know the extent of pulse integration with ubuntu desktop so try at your own risk and feel free to let me know how it worked out for you. 🙂

    on to my next issue Ubuntu 10.4-11.04 Keyboard and mouse do not work/ freeze after a few min.

    This issue has been going on since i had tried 10.04 a little after the initial release, I haven’t tried nearly as much as i had worked on the other issue, but this one is inherently very hard to pinpoint for me. no log messages or errors, even on verbose…….tried combination of ps2 and usb with no luck at all.  I even tried reinstalling Dbus and Hal with no luck ….. and this is where i am stuck.

    My choices are continue on working on the issue and be down a PC (this is my main PC used for everything) or find a distro that works with my older PC, both require a decent amount of work to get it all going, including all the programs i have compiled from source.

    So any ideas ? any thoughts? another distro i could try? im willing to try almost anything to get my PC up and running so i can watch youtube on my tv!!

    PC specs

    P4 2 x cores with asus motherboard

    ATI 9600/128mb

    ram 1.2Gb

    nothing too special lol

    Leave some comments 🙂


  • MSP430 RGB V0.1

    A different take on how to create a PWM signal. I decided to go the interrupt route using the WDT+ peripheral. I did this by setting it to the interval timer and putting all my counters and logic within the interrupt. The funny thing is  i have read that you shouldn’t put too much code into your interrupt, or something bad will happen.

    the resistors on the left, are 100 ohm resistors and the one on the right is a 470 ohm resistor to limit current for the RGB LED. connections on the uC that are used are pins 1.3, 1.4, 1.5 i have not decided which pins are what color, i will decide that on my final build.

    The test code will be improved this is just the compile and see if it works.- The best part , the code works lol .

    so let me know what you think on creating PWM with the interval timer instead of timer A.

    #include <msp430x20x2.h>
    #include <signal.h> //add for interrupt
    #define UP 0x00
    #define DOWN 0x01
    volatile  int millsecs = 0;
    volatile  int counter2 = 0;
    volatile  int led_red = 0;
    volatile  int led_green = 199;
    volatile  int led_blue = 199;
    volatile  int dir = UP;
    void main(void)
    WDTCTL = WDT_MDLY_0_064;
    P1DIR |= BIT5 + BIT4 + BIT3;
    P1OUT |= BIT5 + BIT4 + BIT3;
    IE1 |= WDTIE;
    }//end main
    interrupt(WDT_VECTOR) watchdog_timer(void)
    if (millsecs == 200) { millsecs= 0; P1OUT |= BIT0 + BIT6; ++counter2; }
    if (millsecs == led_red ) { P1OUT ^= BIT3; }
    if (millsecs == led_green) { P1OUT ^= BIT4; }
    if (millsecs == led_blue ) { P1OUT ^= BIT5; }
    if (counter2 == 25 ) { counter2 =0;
    switch (dir){
    case UP: ++led_red; --led_green; --led_blue;
    if (led_red == 199) {dir = DOWN;}
    case DOWN: --led_red; ++led_green; ++led_blue;
    if (led_red == 0) {dir = UP;}
    }//end switch
    }//end if
    }//end interrupt

    To change the Period length – change the 200 value to the period you want, you can also change it by setting the WDT interval to different intervals to change the period.
    to change the Duty cycle, change the led_[color] variable to anything between 0 and period length

    I am still working on trying to get it to cycle through all colors, and fade better when led_[color] is close to 0
    by far this project is not done, the board will be soldered up and pics will be presented. The end result should be code for WDT PWM, which could be used for servos, LEDs, or possibly communication, and i will have my flower pot back!

  • msp430- coding interrupts for mspgcc

    I am just an idiot, but thats my opinion. For those with MSPGCC compilers, we have a more difficult time finding code examples, and many of the code examples given either don’ explain very well (cryptic Coding, un-commented code) or they are for the CCS or IAR, and they dont use the same syntax as the MSPGCC compiler. So here is how to create an interrupt handler for non-PUC/POR interrupts.

    I will not go into interrupt vector masking, that is beyond me at this moment, but im not saying that i wont cover it later on, once i understand why you would want to mask it…..
    So lets start at what headers and other setup items you need before, creating the interrupt handler.
    First the signal.h has to be included into your code. #include<signal.h>
    this will give you access to the special function of
    interrupt(VECTOR ) service_routine (void) {/*interrupt code*/ }

    this is the same as #pragma vector=WDT_VECTOR
    __interrupt void watchdog_timer(void){ }

    These are the Defined vectors for interrupts right from the header files.(mspgcc headers)

    #define PORT1_VECTOR 4 /* 0xFFE4 Port 1 */
    #define PORT2_VECTOR 6 /* 0xFFE6 Port 2 */
    #define USI_VECTOR 8 /* 0xFFE8 USI */
    #define ADC10_VECTOR 10 /* 0xFFEA ADC10 */
    #define TIMERA1_VECTOR 16 /* 0xFFF0 Timer A CC1-2, TA */
    #define TIMERA0_VECTOR 18 /* 0xFFF2 Timer A CC0 */
    #define WDT_VECTOR 20 /* 0xFFF4 Watchdog Timer */
    #define NMI_VECTOR 28 /* 0xFFFC Non-maskable */

    all the interrupts should be self expainatory, vector = the source of the interrupt.

    since now we have all the basics we can now right a small program that uses interrupt, we will just create a small WDT interval timer.
    /*WDT interval timer- code based on msp430 examples*/
    #include<signal.h> //interrupt service routine
    #include <io.h> //usually included on msp430 header, but for sfr register access.
    void main(void) {
    WDTCTL = WDT_MDLY_32; //~30mS intervals
    P1DIR |=BIT1;
    IE1 |= WDTIE; //enable interrupt
    _BIS_SR(LPM0_bits + GIE); //not low power mode and enable interrupts
    }//end of main
    //interrupt service routine
    interrupt(WDT_VECTOR) watchdog_timer(void)
    P1OUT ^= BIT1;
    }//end of interrupt

    this should give you a good start on your Interrupts but there is still one thing that you may need. Changing the power modes when a interrupt is being serviced, the power mode will revert back to the power mode that it was in when the interrupt was called.
    There are 2 functions that we can use to clear or set power modes while in an interrupt.
    First one is to set the mode on exit of the routine, this is done by changing the copy of the status register that is saved to the stack. _BIS_SR_IRQ( ... )
    you would use this the same way you would use the _BIS_SR(…)

    The second one will clear the bits you select _BIC_SR_IRQ(...) same usage as the other, except it will just clear the bits not modify them.
    ***the use of _BIx_SR_IRQ() should only be used in an interrupt service request, the compiler will give you a warning but will produce the correct code if you use it anywhere else.***
    ****remember to enable Interrupts by using BIS_SR(GIE) or eint()****

    Edit 6-23-2011

    MSPGCC Uniarch branch of mspgcc has been released, It supports newer chips like the msp430G2453 (the newer 20pin DIPs) This is an initiative to unify the current branches of mspgcc. Interrupts for this version is slightly different. Once I test it or get confirmation from another user I will post the correct format for uniarch branch……but what would be better would be unify the branches so we don’t have so much confusion with these version discrepancies and nuances of the trees.

    As of right now uniarch is still being worked on and there and is not fully recommended unless you need support for the newer 20pin Dips (G2x53 G2x52).  Please don’t let my opinion dissuade your choice of compiler, mspgcc works great for me but uniarch may work better for you.


    Thank you Tissit for your Comment

    “In current gcc, you can (should) include msp430.c instead of the specific header and use the -m switches (in a Makefile) to tell the compiler which chip you’re using. It will find the right headers automatically. “

    If I forget something let me know and I will update

  • MSP430 basic coding/programing part 1

    basic functionality can be achieved with minimal coding. In my attempt to learning how to get the different peripherals working on my msp~2231. All MSP430 value line come with a simple universal package of hardware, Basic Clock, Timer_A, GPIO, USI (SPI,I2C,UART), WDT. then there are chips with chip specific hardware like ADC10, Comparator, Timer_B, Sigma-Delta ADC. to get most of these to work, it takes very little code, but to make them useful that will take a little more skill.

    We will start with everything after the header file #include msp430xxx.h , remember that this header file is chip specific.

    Lets start Here- this is where most of your code will go, including setting up the clocks, pins, interrupts, and anything else that will be run.
    void main(void) {
    //program goes here

    Continue reading  Post ID 1076

  • MSP430 tools for linux

    For your MSP430 launchpad to work on Linux you may have to do a little work, lol hopefully you expected this…..So lets get to it…..by the way i have Ubuntu 9.04 for my system, but that shouldn’t matter, except for dependencies may be different then mine.

    First you will need a few things to get it all working, so gather your tools and programs and lets start…..

    1. launchpad with 430 value line chip
    2. http://mspgcc4.sourceforge.net/ you will need at leas the binaries, or you can build it yourself
    3. http://mspdebug.sourceforge.net/ this is the program that will let you program your msp430 launchpad and debug it if needed
    4. libusb dev files (usb headers for compilation)
    5. Readline dev files
    6. and texinfo dev files

    after you have gathered all that you need you can start installing, you will most likely need the CLI to do most of the work, since we will be moving files into a root owned folder.

    1. First Build or install MSP430-gcc and other binaries for the tool chain http://mspgcc4.sourceforge.net/
    2. next install or copy the binaries /usr/ or usr/local ( i choose /usr/) I unpacked my archive inside my home folder and then CPd(copied) everything into /usr/ folder
    3. then check to see that they work, run msp430-gcc or msp430-gdb, it should just give the usage or start the program if all went well
    4. Now you want to install mspdebug, this program allows you to connect to the launchpad and reprogram the chip or debug it . It should be the simple make && make install on the source and it should go fairly quickly. if you have dependencies issues please consult the maintainer, I only listed the ones that i needed to download.
    5. after its done installing run it and test. to run it type “mspdebug rf2500” and it should start up
    6. jsolarski@server-001:~$ sudo mspdebug rf2500
      [sudo] password for jsolarski:
      MSPDebug version 0.9 - debugging tool for MSP430 MCUs
      Copyright (C) 2009, 2010 Daniel Beer
      This is free software; see the source for copying conditions. There is NO

      Trying to open interface 1 on 005
      Initializing FET...
      FET protocol version is 30066536
      Configured for Spy-Bi-Wire
      Set Vcc: 3000 mV
      Device ID: 0xf201
      Device: MSP430F2013
      Code memory starts at 0xf800
      Available commands:
      = erase hexout mw read run sym
      cgraph gdb isearch opt regs set
      dis help md prog reset step
      Available options:
      color gdb_loop
      Type "help " for more information.
      Press Ctrl+D to quit.

    7. now that it is connected its time to try and reprogram the flash, or play around with the registers.

    Now that its hooked up and ready to go you can go ahead and play around with mspdebug, or connect it up with gdb to debug and reprogram as well, but im just going to go into mspdebug because i have not learned gdb as well as i should.

    The main commands for mspdebugare

    =        erase    hexout   mw       read     run      sym
    cgraph   gdb      isearch  opt      regs     set
    dis      help     md       prog     reset    step

    the ones that i have used so far in my learning this program

    • dis <address>< length> — disassembles that block of memory dis 0xf800 2048
    • prog <file> program the target board “prog main.elf”
    • md <address><length in bit> read an address
    • regs    displays your registers for the board
    • erase   erases the flash memory of the board

    There are plenty of other things you can do in mspdebug but that is beyond my knowledge at this point.

    To reprogram the board just follow the simple instructions of  erase, prog. simple as that.

    Personally the easiest way to reprogram it is use this archive, which has all the files needed to do a test reprogram …and its been edited so it can be compiled with mspgcc.

    Demo program that works with GCC and mspdebug and msp tools

    this is the same source code and make file found on This site. I have not modified it all i did was take the .tgz and package it up into a zip file so its an archive with in a zip file. this is the same program that’s on the 2231 chip that comes with the launchpad except a few changes to make it work with gcc.

    At this point you should have a good starting point to work with this chip…just a little more research and i should be able to creating programs that do what i want them to do….

    Hope this helps!!

  • MSP430 launchpad dev kit how too

    A few weeks ago I had purchased a few MSP430 Launchpad, originally from Mouser, but there wait times for shipment of the product wasn’t until mid AUG to SEP

    and decided that was unacceptable for my terms of getting product and or waiting for parts…..very few times have i waited for more then a month for anything that I wanted, Sugru was different so I waited for it…..but back to the MSP430.

    after searching around I found a company that sold it and was in stock, so i Decided to cancel my other orders and go with them, the company was Newark, and i was very happy with there customer service….very friendly and polite. but i have finally gotten it and was able to do a little testing but not much in the way of programming, I haven’t set up the software for it or the library’s. But i did get to solder on the 32KHz crystal that was sent with the board………to my surprise it was a SMD 1.4mm+-.1mm crystal, with the leads .5mm apart from each other. I saw this and wondered why TI hates us hobbyist. I was expecting a regular through hole crystal, like they showed in one of the videos but that’s not the case, so i will do my best to solder one on to the boards and connect all the headers. I chose the regular female headers, sorta like the arduino, and i left the other board blank so i could solder wires and add other interesting gizmos to it and also to have a board that relies on the internal oscillator. so back to the how too……. Installing the crystal is probably the hardest part of the whole kit, just because the crystal is so small and hard to handle, but if you do it smart you can solder this piece in no time flat. So lets begin with things you may need

    • Supplies
    • Launch pad
    • 32KHz crystal
    • soldering iron
    • solder
    • headers
    • Bright lamp
    • electrical tape or tape like substitute
    • odds and ends (lol)(tweezers or other tool for manipulation)

    after getting your supplies ready its time to start plugging stuff in and getting things setup

    Continue reading  Post ID 1076