The LM4F provides new registers for system control. Each peripheral
now has its own clock gating control register. The LM4F still supports
the legacy registers for backwards compatibility.
Use SYSCTL_RCGCGPIO instead of SYSCTL_RCGC to enable the GPIO.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Add an "#ifdef(LM4F)" clause to include/libopencm3/dispatch/nvic.h
and lib/dispatch/vector_nvic.c. This compiles in the vector table
and allows interrupts to be used.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Specify the -mfloat-abi=hard and -mfpu=fpv4-sp-d16 flags so that FPU
is enabled by default.
While this compiles with FPU support, in order to use the floating point types,
the FPU must be explicitly enabled at runtime.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Fix three distinct issues were present with
examples/lm4f/Makefile.include:
1. Architecture flags were not being passed to the linker. This caused the linker
to link against the wrong libraries when trying to use any C library, causing
hard faults.
2. -lc and -lnosys were not linked against. Try using printf() without -lnosys
3. The makefile erroneously specified -mcpu=cortex-m3 instead of m4.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Create lm4f code infrastructure from the lm3s infrastructure.
As far as the interrupt table is concerned, don't create an irq.yaml. Just
include the LM3S nvic.h. The LM3S vector table seems to be compatible with the
LM4F
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Where the library is installed has quite an affect on what -L and -I
flags are used. If you install into the toolchain, you don't want
to use them at all, but if you install out of tree (/opt/mycm3 for
example) you need to specify the -L and -I flags.
Update the documentation and the example makefiles to support this