New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LM4F initial support #74
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This file is part of the libopencm3 project. | ||
* | ||
* It was generated by the irq2nvic_h script. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file shouldn't be committed, it it's generated every time by the build scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for catching that. I will push an updated fix soon.
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>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
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>
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>
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>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
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>
There was no reference to LM4F in in the doc/ subdirectory. Add the needed infrastructure to generate focumentation for LM4F. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
esden
added a commit
that referenced
this pull request
Jan 7, 2013
Merge remote-tracking branch 'mrnuke/lm4f_initial'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a cherry pick of the most important commits needed to get LM4F working properly with libopencm3, as well as a basic example.
I've picked these from my stellaris branch. I consider these commits to be well tested.