DK-LM3S9B96

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m (Flashing with OpenOCD)
m (Flashing with OpenOCD)
 
(One intermediate revision by one user not shown)
Line 35: Line 35:
 
{{note|You will need to build OpenOCD with the <code>--enable-ft2232_libftdi</code> configure flag specified and <code>libftdi1</code> and <code>libftdi-dev</code> installed}}
 
{{note|You will need to build OpenOCD with the <code>--enable-ft2232_libftdi</code> configure flag specified and <code>libftdi1</code> and <code>libftdi-dev</code> installed}}
  
<source lang="bash">
+
See [[OpenOCD]] for support.
sudo openocd -f /usr/local/share/openocd/scripts/interface/luminary-icdi.cfg -f /usr/local/share/openocd/scripts/target/stellaris.cfg
+
</source>
+
 
+
If you get the following message, you may need to edit <code>luminary-icdi.cfg</code>
+
<source lang="text">
+
Error: unable to open ftdi device: device not found
+
</source>
+
  
Edit <code>luminary-icdi.cfg</code>
 
 
<source lang="bash">
 
<source lang="bash">
sudo sed -re 's/^(ft2232_vid_pid 0x0403 0xbcd)a$/\19/' -i /usr/local/share/openocd/scripts/interface/luminary-icdi.cfg
+
sudo openocd -f /usr/local/share/openocd/scripts/interface/luminary.cfg -f /usr/local/share/openocd/scripts/target/stellaris.cfg
 
</source>
 
</source>

Latest revision as of 17:30, 27 July 2012

Contents

[edit] Preparation

  • Build a toolchain. See Crosstool-ng, and use the arm-bare_newlib_cortex_m3_nommu-eabi config.
  • Build OpenOCD

[edit] Environment

export PATH=${TOOLCHAIN_DIR}/bin:${PATH}
export CROSS_COMPILE=arm-bare_newlib_cortex_m3_nommu-eabi-

[edit] Using TI's StellarisWare and Samples

mkdir sw
cd sw
unzip ../SW-*.exe
rm ../SW-*.exe
  • Edit the PREFIX variable in makedefs. E.g:
PREFIX=${shell echo -n ${CROSS_COMPILE} | rev | cut -b 2- | rev}
  • Build:
    • You make need to remove the build sections that target the Cortex-M4 from the following files:
      • ./driverlib/Makefile
      • ./grlib/Makefile
      • ./usblib/Makefile
    • The entire source tree won't build, due to Cortex-M4 boards, at this point, move into your board specific directory, and continue from there.
make clean all

[edit] Flashing with OpenOCD

Note: You will need to build OpenOCD with the --enable-ft2232_libftdi configure flag specified and libftdi1 and libftdi-dev installed

See OpenOCD for support.

sudo openocd -f /usr/local/share/openocd/scripts/interface/luminary.cfg -f /usr/local/share/openocd/scripts/target/stellaris.cfg
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox