While some of the examples include a "board.ld" style file, some of them were
pointing to the libopencm3 provided chip specific ld scripts. When
TOOLCHAIN_DIR has been overridden, those paths were no longer valid/correct.
The Makefile.includes contain a hardcoded ../../../../../libopencm3
path for the TOOLCHAIN_DIR variable. They also contained another copy
of this hardcoded path, that is now generated from $TOOLCHAIN_DIR.
This allows to have a symbolic link to a Makefile.include in an
out-of-tree project and reuse the Makefile infrastructure.
The LM3S811-EVB miniblink example is a copy of the LM3S3748-EVB miniblink
example. Modifications:
- rename lm3s3748-evb.ld to lm3s811-evb.ld and change RAM and ROM sizes
- amend Makefile to reference the lm3s811-evb.ld linker script
- amend miniblink.c to use PC5 instead of PF0 for the LED GPIO
- amend README to reference LM3S811-EVB instead of LM3S3748-EVB
This is not specifically an L1 example, but it lives beside the L1 "usart"
example to show how easy it is to add semihosting support to existing code.
Tested with the by now relatively old g-a-e 2012q4 release and
OpenOcd 0.8.0-dev-00011-g70a2ffa (2013-05-14-19:41)
as a way of creating accurately timed delays. A simple 'msleep'
is implemented by watching the system clock to wait a certain
number of milleseconds before it returns. Its a bit more accurate
than a for loop, although it really shines when your running multiple
threads.
This example is a merge of Chuck McManis's example for F4 and onnokort's system clock setting test blink example for demonstration issue, corrected in #224.
The LED in any available clock setting flashes four times per second.
My bad, I'd been testing my header includes against a branch with some
draft unification of the adc code. ADC is one of the remaining major
peripherals that isn't unified neatly.
Replace includes of stm32/YY/xxxx.h with stm32/xxxx.h
Replace stm32/YY/nvic.h with cm3/nvic.h.
In some cases, the include list was resorted alphabetically when it was
complicated and I was reviewing them manually, but most of this was
automatically done.
file.c~ (note the tilde at the end) are temporary backup files used by some
editors. They are not needed.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
- Integer printing function fixed.
- because of comparison against smaller than 0 numbers we must use signed numbers!
- Value zero was not printed at all.
- It was printing one more character than it should.
- Erasing unnecesary commentaries.
- Erasing debugging help.
I wrote this example to benchmark the USB driver. See the README.md for
full details.
Why README.md instead of just README. README.md shows up better on github,
and makes it easier to browse the tree on github to search for an example.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Implements a USB-to-serial adapter, compliant to the CDCACM subclass.
UART1 is used for the TX/RX lines. Although UART1 also has lines for flow
control, they are not used. Instead, the control lines are implemented in
software via GPIOA.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
We updated the GPIO API to use the AHB bus; however the AHP aperture for
GPIO ports A through J needs to be explicitly enabled at runtime. Accessing
the AHB aperture otherwise hardfaults.
To make the examples work again, we call gpio_enable_ahb_aperture() at the
start of main().
Since we're at it, we also take out the ugly register accesses in favor
of the new gpio functions.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
When the makefile was originally written, openocd did not officially
support ICDI. Now that ICDI support is part of an official openocd release,
update the makefile to enable flashing with "make flash".