https://github.com/berkeleylab/marble-mmc
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.1%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: BerkeleyLab
- License: other
- Language: C
- Default Branch: master
- Size: 19.1 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 2
- Releases: 0
Metadata Files
README-lpc-toolchain.md
This is a C project for ARM Cortex M0+, M0, M3 and M4 LPC microcontrollers. The GNU Toolchain is used for compilation, but the LPCXpresso IDE is still required for downloading and debugging via NXP's LPC-Link.
This branch is intended for the LPC17xx series of devices, and the LPC1776 in particular, with customizations for the Marble-Mini
It is in turn forked from a branch targeting the LPC1769
Prerequisites
GNU Make and the following standard
utilities are required: cat, echo, find, grep, mkdir, rm, sed and
shuf. If you're running any sensible desktop linux then these will already be
installed.
You will need to aquire GNU Tools for ARM Embedded Processors.
On Ubuntu
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update && sudo apt-get install gcc-arm-none-eabi
Note about gcc-arm-embedded on Ubuntu 14.04 and later
If you are using Ubuntu 14.04 and later, please be careful because there are packages with same name but produced by Debian and inherited by Ubuntu. Simply follow the above 3 steps, you may end up with gcc-arm-none-eabi from Ubuntu. So to install gcc-arm-none-eabi from ARM, steps are:
1). sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
2). sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
3). sudo apt-get update
4). sudo apt-get install gcc-arm-none-eabi=4-8-2014q2-0trusty10
Meanwhile we are working with Debian to consolidate and unify this toolchain.
Otherwise
Download and add
the bin/ directory to your path. If you use
[Bash](https://en.wikipedia.org/wiki/Bash(Unixshell)), you might be
able to do this by adding export
PATH=$PATH:/path/to/gnu/tools/for/arm/bin/ to your
~/.bashrc.
Not Recommended
You could build your own tools from source. Have a look at summon-arm-toolchain.
Configuration
Most of the configuration options related to the chip are located in
makefile.conf. Please read the file itself for full details on each of the
options. You should probably run make clean after editing makefile.conf.
The sizes and locations of your chip's memory locations should be defined in
mem.ld. Any other changes to the layout of the final binary
(such as using external/AHB RAM or placing functions in RAM) should be made to
the linker script sections.ld
If you wish to download / debug using NXP's LPC-Link, you will need to edit the
LPCINSTALL variable in Makefile to point to the bin/ directory of your
LPCXpresso IDE
install.
Usage
After making sure sources.mk is up-to-date, simply run make to compile.
If you wish to download / debug using NXP's LPC-Link, run make lpc-link to
flash the LPC-Link's own firmware and start a server which can be connected to
by GDB. This will not return - you will need
to open a new terminal to continue. You can only do this once before you will
need to unplug and reconnect (or do some USB trickery to) the LPC-Link.
The makefile picks a random 5-digit port to start the debug server, and modifies
the connect command defined in .gdbscript to point to it. Therefore you
should run GDB (or more precisely arm-none-eabi-gdb) with the
--connect=.gdbscript flag.
sources
make sources is responsible for building sources.mk, which is a list of all
the source files in the project (except those listed in the OTHER_SOURCES
section of makefile.conf). When run make sources will add every .c and
.S file in the sources directory (currently defined as src/) to sources.mk. However this list should be checked by hand to be certain that only the
files you intended are being linked into the build.
Emacs
A Directory Local Variables File .dir-locals.el exists in the root of the
project, and this has the following effects on emacs:
Fixed default-directory
The default directory is fixed as the root of the project wherever you are
within the project. As the makefile needs to be run from the root of the
project, this means that M+x compile will always start a compile whichever
file you are editing.
Custom GDB
M+x gdb is set to use arm-none-eabi-gdb rather than the default GDB for your
machine. GDB is also instructed to read in .gdbscript as a command file.
Other notes
Wherever possible use
Function Attributes
and
Variable Attrubutes
rather than editing sections.ld.
Sources & Licensing
See LICENSE.md
Owner
- Name: Berkeley Lab
- Login: BerkeleyLab
- Kind: organization
- Location: Berkeley, CA
- Website: https://www.lbl.gov
- Twitter: BerkeleyLab
- Repositories: 11
- Profile: https://github.com/BerkeleyLab
Lawrence Berkeley National Laboratory
GitHub Events
Total
- Push event: 42
- Create event: 4
Last Year
- Push event: 42
- Create event: 4