Commit Graph

13 Commits

Author SHA1 Message Date
Karl Palsson 9a05dcb6c0 ld scripts: drop duplication of standard sections
Instead of every "simple" target having their own duplicate file with
all the section mappings, just provide a single, simple,
"cortex-m-generic.ld" that works with our startup code and any simple
rom/ram system.  This also drops the pointless copying of files all over
the place.  Using -L flags properly is sufficient, and the standard file
is now in the root of the library already.
2018-04-28 21:12:27 +00:00
Karl Palsson b860319785 make: use std=c99 everywhere by default.
setting "STANDARD_FLAGS=-std=c11" or similar will let you try out
alternate compilation modes.

Fixes https://github.com/libopencm3/libopencm3/issues/773
2017-06-08 23:01:45 +00:00
Tido Klaassen aad8d06c3f make: rename CFLAGS in target Makefiles to TGT_CFLAGS
Renamed every instance of variable CFLAGS in target specific Makefiles
to TGT_CFLAGS to free up CFLAGS for user defined compiler flags.

Added information in README.md about existence and usage of CFLAGS
environment variable in build process.
2015-10-11 19:14:25 +00:00
Karl Palsson 6d658c20b8 make: use shared DEBUG_FLAGS (-gdb3) by default
-ggdb3 make slightly bigger .elf files, but allows gdb to understand
macros, which libopenocm3 uses somewhat extensively.  Make this the
default, and pull it up to the common base makefile, so it can be easily
substituted.
2015-05-04 13:45:07 +00:00
Paul Fertser 283d8cc7d2 Makefile: fix build for directories with spaces
When full path of a source directory has spaces in it, that makes
shell and Make split the path, so special treatment is
necessary. Additionally, @F doesn't honour the escaping, so has to be
avoided.

Reported-by: Roman Faizullin <roman@faizullin.info>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2014-08-12 12:01:16 +00:00
Frantisek Burian db3dc42dd6 [CM3:DWT] Add the file to library build process for each target 2014-01-02 21:25:26 +01:00
Karl Palsson bad5580492 [make] Use less shell variables
Use fixed variables for things that can't change, instead of variables
like SRCLIBDIR that was causing a shell call for every single use.

Use less functions in general and less shell expansions.

Use builtin functions like $(realpath blah) instead of $(shell
pwd)/blah  In particular, this was important for me trying to build on
windows with git-shell.  This should help a lot on smaller build
machines, but doesn't make a huge difference on my own.

Remove redundant clean print messages. These also cause more needless
shell expansions.
2013-06-02 18:11:49 -07:00
Fergus Noble 4d15da995e Adding basic support for v7m sync primatives and mutex convenience functions. 2013-05-10 14:30:17 -07:00
chrysn c243724676 platform-independent makefile: fix old "stm32" reference
the "make clean" target showed a constant "stm32/f1" debug message
instead of the current relative directory. this is fixed by showing the
relevant portion of the current directory instead, relevant being
determined by evaluating the current makefile's relative position and
stripping that part off.
2013-01-10 11:37:51 +01:00
chrysn 75c2165827 build common .o files everywhere (fixes issue #29)
vector.o, nvic.o, scb.o and assert.o are available on every platform,
but at least some of them differ between the implementations. they
already got built explicityly on some platforms; now adding them to the
common Makefile.include.
2012-10-19 18:56:39 +02:00
Ken Sarkies 0834f41383 stm32f1:
Add object files to Makefile to include new modules into lib.

Correct typo in pwr.c

Add two new functions to timer.c to preset the counter (for use
with deadman style timeouts) and to identify an interrupt
source.

Also noticed lib/makefile.include didn't clean lib/stm32, which
isn't a target. Added a fix.
2012-10-16 14:05:45 -07:00
Piotr Esden-Tempski 11727f56c9 Minor build system fixes. 2012-08-25 19:53:15 -07:00
Piotr Esden-Tempski 3441bba1c4 Changed local build target for library and linker files.
- The library files are now being built into the lib subdirectory of the
  source.
- The linker files for each library are being copied into the lib source
  subdirectory.

Motivation: The relative locations of files in the source directory after make
are now the same as after make install now. This makes it easier to
reuse examples with their makefiles outside of the libopencm3
sourcecode directory.
2012-08-13 15:19:57 -07:00