Commit Graph

18 Commits

Author SHA1 Message Date
Karl Palsson
140d0864b8 rules: use TGT_xxx to avoid trampling user vars
As in the main library, instead of constructing and making our own CFLAGS
CXXFLAGS and LDFLAGS variables, use TGT_ for ones we construct, and include any
user provided variables afterwards.
2016-08-18 22:39:25 +00:00
Karl Palsson
4b772a4437 rules: pull up optimization level 2016-08-18 22:39:25 +00:00
Karl Palsson
5b35c7d7a1 rules: provide better feedback on missing libraries.
If the library files are missing (haven't been built) it's better to get a
failure message saying that, rather than a failed dependency with no rules to
generated it.

Before: (I'd manually removed the f4 library)
```
$ make clean all V=1
Using ../../../../../libopencm3/ path to library
rm -f *.o *.d *.elf *.bin *.hex *.srec *.list *.map
make: *** No rule to make target `adc-dac-printf.elf', needed by `elf'.  Stop.
```

After:
```
$ make clean all V=1
Using ../../../../../libopencm3/ path to library
rm -f *.o *.d *.elf *.bin *.hex *.srec *.list *.map
arm-none-eabi-gcc -Os -g -Wextra -Wshadow -Wimplicit-function-declaration
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -fno-common
-ffunction-sections -fdata-sections -MD -Wall -Wundef
-I../../../../../libopencm3//include -DSTM32F4 -mthumb -mcpu=cortex-m4
-mfloat-abi=hard -mfpu=fpv4-sp-d16 -o adc-dac-printf.o -c adc-dac-printf.c
arm-none-eabi-gcc --static -nostartfiles -L../../../../../libopencm3//lib
-T../stm32f4-discovery.ld -Wl,-Map=adc-dac-printf.map -Wl,--gc-sections -mthumb
-mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 adc-dac-printf.o
-lopencm3_stm32f4 -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group -o
adc-dac-printf.elf
/home/karlp/tools/gcc-arm-none-eabi-4_9-2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld:
cannot find -lopencm3_stm32f4
collect2: error: ld returned 1 exit status
make: *** [adc-dac-printf.elf] Error 1
```

I strongly feel that the latter is far more informative.
2016-04-17 00:21:24 +00:00
Priit Laes
48b2f10e66 [BUILD] Report proper error when linker script cannot be found. 2015-06-28 22:53:55 +03:00
kbob
9cee61f089 [stm32f429i-discovery] Added LTDC DMA example.
This example is just using buffers and built in alpha overlay
functionality to animate a dmond floating on a checker board. After
initializing of the frame buffers only 7 registers are being modified to
implement the animation.
2015-02-24 17:14:57 -08:00
Karl Palsson
05d46ab6cd make V=1 no longer spews linker garbage collection
make V=99 will, if you realllly want it.
2014-04-05 13:14:56 +00:00
Frantisek Burian
3af1f8d43d [BUILD] Make the binaries only needed for the user
User can specify which binaries he needs on the commandline.

'make hex' will build examples with generating hex file
'make hex bin' will build hex and bin output
'make images' will build all images as in previous versions of buildsystem
'make all' or 'make' will build only elf (+ map) files

This will have huge impact on build speed.
2014-02-13 19:35:18 +01:00
Frantisek Burian
5f592615d6 [BUILD] Correct inplace build for examples 2014-01-22 12:50:38 +01:00
Frantisek Burian
1b98ef8bfc Add stylecheck to the examples directory 2014-01-11 13:42:15 +01:00
Frantisek Burian
94ddb178eb [BUILD] Use the automatic variable RM=rm -f 2014-01-06 22:30:32 +01:00
Frantisek Burian
52fc38b03e [FIX] Library paths and preprocessor defines should be in CPPFLAGS, Reorganization of *FLAGS
Using:
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options
http://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#Preprocessor-Options
http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options
http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#ARM-Options

To CFLAGS are added only -ffunction-sections -fdata-sections, so this should not break the build.
2014-01-06 22:30:31 +01:00
Frantisek Burian
04d4bac5af [BUILD] Move out ARCH_FLAGS from the LDFLAGS and CFLAGS, CXXFLAGS 2014-01-06 22:30:19 +01:00
Frantisek Burian
39f6c9eb5f [FIX] Correct the compilation of C++ files (prepared for the future) 2014-01-06 22:27:29 +01:00
Frantisek Burian
f756c99a42 [BUILD] Removed TOOLCHAIN_DIR, add autodetection of current libopencm3 library placement 2014-01-06 22:25:57 +01:00
Frantisek Burian
5385b463fe [FLASH:OPENOCD] Fixed the flashing function 2014-01-06 22:25:56 +01:00
Onno Kortmann
58e84a9438 [BUILD] Generate *.MAP files
Reworked by: Frantisek Burian <BuFran@seznam.cz>
2014-01-06 22:25:55 +01:00
Frantisek Burian
02c35eee70 Make the STM32 Makefile.includes usable from outside the examples tree (Issue #28) 2014-01-06 22:25:55 +01:00
Frantisek Burian
9934e40fe9 [BUILD] Add generic Makefile.rules 2014-01-06 22:25:40 +01:00