DK-LM3S9B96
From Attie's Wiki
(Difference between revisions)
m |
m (→Flashing with OpenOCD) |
||
(10 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
==Preparation== | ==Preparation== | ||
* Build a toolchain. See [[Crosstool-ng]], and use the <code>arm-bare_newlib_cortex_m3_nommu-eabi</code> config. | * Build a toolchain. See [[Crosstool-ng]], and use the <code>arm-bare_newlib_cortex_m3_nommu-eabi</code> config. | ||
− | * | + | * Build [[OpenOCD]] |
− | + | ||
− | + | ||
− | + | ||
==Environment== | ==Environment== | ||
Line 19: | Line 16: | ||
cd sw | cd sw | ||
unzip ../SW-*.exe | unzip ../SW-*.exe | ||
+ | rm ../SW-*.exe | ||
</source> | </source> | ||
* Edit the <code>PREFIX</code> variable in makedefs. E.g: | * Edit the <code>PREFIX</code> variable in makedefs. E.g: | ||
Line 25: | Line 23: | ||
</source> | </source> | ||
* Build: | * Build: | ||
+ | ** You make need to remove the build sections that target the Cortex-M4 from the following files: | ||
+ | *** <code>./driverlib/Makefile</code> | ||
+ | *** <code>./grlib/Makefile</code> | ||
+ | *** <code>./usblib/Makefile</code> | ||
+ | ** 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. | ||
<source lang="bash"> | <source lang="bash"> | ||
make clean all | make clean all | ||
+ | </source> | ||
+ | |||
+ | ==Flashing with OpenOCD== | ||
+ | {{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}} | ||
+ | |||
+ | See [[OpenOCD]] for support. | ||
+ | |||
+ | <source lang="bash"> | ||
+ | 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
- Download from: http://www.ti.com/tool/sw-lm3s (or look for an update / new page)
- Extract the contents of the windows executable.
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.
- You make need to remove the build sections that target the Cortex-M4 from the following files:
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
installedSee OpenOCD for support.
sudo openocd -f /usr/local/share/openocd/scripts/interface/luminary.cfg -f /usr/local/share/openocd/scripts/target/stellaris.cfg