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.