I’ve got the “hello world” working on my STM32L Discovery board that I got about 8 months ago.  It’s not even the canonical blinking light, but it counts up and you only know that it works by using a debugger!  Another site gave me the basic idea, but I needed a few changes to get it working.

  1. Download the Linaro bare metal ARM toolchain (it’s near the bottom of the page).  Extract it somewhere (I put it in /opt).
  2. Download and build OpenOCD.  I’m using version 0.6.0.  I used Checkinstallso I had a managed package:
    tar -zxvf openocd-0.6.0.tar.gz
    cd openocd-0.6.0.tar.gz
    ./configure --prefix=/usr --enable-jlink --enable-amtjtagaccel --enable-ft2232_libftdi
    sudo checkinstall make install
  3. Now something to compile.  I used this:
    // By Wolfgang Wieser, heavily based on: // #define STACK_TOP 0x20000800 // just a tiny stack for demo static void nmi_handler(void); static void hardfault_handler(void); int main(void); // Define the…

View original post 788 more words


About minghuasweblog

a long time coder
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s