-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.
On linux, the output of CP rule was try to write to / which is - of course, forbidden for write.
This solution adds to each part of lib correct pointer to the root of lib where the libs should be written.
Bug found by Kuldeep Singh Dhaka.
We currently default to "-mfloat-abi=hard -mfpu=fpv4-sp-d16" for M4F cores, and
and variations of "-mfloat-abi=soft" for the others. Keep the M4F default, and
move others to no FP flags for consistency, but allow overriding these flags
via the FP_FLAGS environment variable.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
previously, only stm32 chips passed the information about which chip to
build on into the compiler. this information is essential to dispatch,
thus defining LPC13XX, LPC17XX, LPC43XX and LM3S in analogy to
STM32F1..4.
Adds libopencm3/cm3/assert.h header that provides assertion check macros
similar to those provided by the standard C library.
Thanks to Nicolas Schodet for help.
- 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.
Changed the license to LGPL3+ for some makefiles that got ommited in the
previous big patch commit.
Corrected a find and replace error in a linker file.
This is the first working example code which is tested on hardware.
The LED on the Olimex STM-H103 eval board is happily blinking.
We use a dummy "delay" function (basically a busy-waiting for-loop), which
will only work if you use -O0 in CFLAGS (-O2, -O3, or -Os will not work as
the compiler optimizes the loop away).
We use some arbitrary value for stack size (2 KB) and use main()
directly as the reset vector function. This will change later.
Also, we do the GPIO and clock init as well as the GPIO toggling for the
LED blinking fully "manually" for now, but there may be more higher-level
functions for doing that at some later date.
This is intended as a small blink example for the Olimex STM32-H103 board.
It doesn't do anything useful (yet), but it builds fine.
There's a sample Makefile and a preliminary ld script (which probably
needs some more work).