Commit Graph

105 Commits

Author SHA1 Message Date
dragonmux 3a02fdea9d misc: Added a clang-tidy Makefile target so enforcing the formatting is easier 2022-06-26 18:55:04 -07:00
Mikaela Szekely db4b568e52 Fix compatibility with dash as /bin/sh.
Ubuntu's default /bin/sh is dash, which does not support the `&>`
redirection syntax. This commit moves version.h generation back into the
Makefile, as 8afaedd had it, but restores compatibility with
GNU Make < 4.0, which 8afaedd, broke. This also fixes building on macOS,
as macOS bundles GNU Make 3.81.
2022-06-12 16:31:00 -07:00
dragonmux 7846112a7b misc: Updated the build system to use the new version header generator script, fixing #1043 2022-06-12 16:31:00 -07:00
Piotr Esden-Tempski 9730ae1429 build: Corrected the all_platform build target.
The target was building but not including the BMDA binary, as the
build system does not expect a binary that does not end with `.bin`.
Additionally this corrects the BMDA Makefile.inc that was missing the
`all` and `host_clean` targets.
2022-06-03 22:42:05 -04:00
Piotr Esden-Tempski f97047b5f5 build: Added all_platforms target to toplevel Makefile
The src level all_platforms target now also checks for locm3 existence
as well as triggers build of the needed locm3 libraries.
2022-06-03 20:40:35 -04:00
Jonas Jelten 8afaedda37 update include/version.h only when content changes 2022-05-31 21:36:25 -04:00
Koen De Vleeschauwer 0a0f5a9dd7 rtt 2022-05-31 21:15:41 -04:00
mean 7c120ecb58 put ch32f1 in its own file 2022-04-10 23:40:44 -04:00
Piotr Esden-Tempski b59ca5142a pc hosted: Don't try to report memory usage.
When building on a pc gcc does not have that parameter and clang fails
with an error. This caused a build regression on Mac.
2022-03-29 16:45:08 -07:00
Piotr Esden-Tempski e0619ca7d5 Added a linker flag to output memory usage. 2022-03-15 11:41:31 -07:00
dragonmux 02d9a1d3cf Revert "jtag_scan: Rework chain detection"
This reverts commit 2d4a503135.
2022-03-14 21:37:44 -07:00
Uwe Bonnes 2d4a503135 jtag_scan: Rework chain detection
Fixme: stlinkv2/hosted probably does only handle STM devices. Check if
jtag_devs.c really needed.
2021-08-15 16:43:29 +02:00
Uwe Bonnes 23f942ac8c Raspberry RP2040: Recognize. No flash handling yet. 2021-04-21 21:50:35 +02:00
Uwe Bonnes 21b80949ff Compile with -Os as default. Change like "make OPT_FLAGS=..."
SWD/JTAG Bitbang is compiled with -O3 for good bitbang speed.
2021-04-20 18:20:41 +02:00
fabalthazar 6d6cfd6c98 Comprehensive STM32G03/4/5/6/7/8/B/C driver 2021-03-29 21:42:40 +02:00
Noah Pendleton 93d4c65948 Fix building with newer GNU make(#804)
More recent versions of GNU make remove the `-` prefix from
`$(MAKEFLAGS)`, which breaks the build:

```bash
 # output truncated to interesting parts
> make -C src --trace all_platforms
set -e ;\
mkdir -p artifacts/v1.7.1-91-g98b4ec5 ;\
echo "<html><body><ul>" > artifacts/index.html ;\
for i in platforms/*/Makefile.inc ; do \
        ...\
        make w --trace --no-print-directory clean ;\
        make w --trace --no-print-directory;\
        ...\
done ;\
echo "</ul></body></html>" >> artifacts/index.html ;\
cp artifacts/*.bin artifacts/v1.7.1-91-g98b4ec5
Building for hardware platform: f4discovery
make[1]: *** No rule to make target 'w'.  Stop.
```

Per the
[documentation](https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html),
there's no need to manually apply insert `$(MAKEFLAGS)`, it should be
automatically included when using `$(MAKE)` when recursing.

I tested on my machine (make 4.2.1) and a docker image based on
ubuntu:trusty (make 3.81), both behaved the same (directories were not
printed when recursing by default);
2020-12-12 14:39:52 +01:00
Uwe Bonnes 776861c6a0 Makefile: Fix version.h generation for make all_platforms
Same fix as 0ae65cc10f.
2020-10-23 09:40:15 +02:00
Eivind Alexander Bergem 38bc5bbf82 Add LPC546xx support #741 #553 2020-09-30 12:56:53 +02:00
Uwe Bonnes 0ae65cc10f src/Makefile: Fix version.h generation.
It seems, some git behaviour change got by unnoticed.
2020-09-22 19:02:26 +02:00
Uwe Bonnes efce2ae892 Do not compile jtagtap and swdptap when not needed. 2020-06-05 14:59:30 +02:00
Uwe Bonnes a09104c281 Build firmware executables as *.elf file 2020-06-05 14:59:30 +02:00
Uwe Bonnes 386a4bfce7 hosted: Device detection and selection. 2020-06-05 14:59:30 +02:00
Uwe Bonnes 9969c984f3 detour jtag primitives. 2020-06-05 14:59:30 +02:00
Uwe Bonnes e34a27f72c Detour swd primitives. 2020-06-05 14:59:30 +02:00
Uwe Bonnes 05adcd9bf5 remote.c: Compile only relevant functions.
Do no compile firmware functions when compiling pc-hosted.
2020-06-05 14:59:30 +02:00
Ken Healy 26216beaab Microchip SAM D51 / E5x support
Adds a target driver for Microchip SAM D51 / E5x family.

Tested on SAMD51G19A and SAMD51J19A. According to the datasheet, the
D51 / E5x family share the same core feature set, differing only in the
addition of CAN (E51) or ethernet controllers (E53/54). All members of
the family should be equivalent from a debug and programming perspective.
2019-11-17 12:45:49 +01:00
Uwe Bonnes 04d9749f25 Makefile: Publish DFU binaries with the daily build. (#549)
Fixes #548.
2019-10-28 16:37:41 +01:00
Dave Marples 90df8172ca Addition of pc-hosted variant and extensions to other targets to support it. 2019-10-08 19:16:12 +02:00
Uwe Bonnes 1cf0b8ac13 Make all arguments for all commands (struct *t, int argc, const char **argv).
-Wall on gcc8 otherwise warns without -Wno-cast-function-type but older
GCCs/CLang choke on that argument:
error: unknown warning option '-Wno-cast-function-type'; did you mean
 '-Wno-bad-function-cast'? [-Werror,-Wunknown-warning-option]

This adds 24 byte to the binary, as some functions are now called with
additional dummy arguments:
"Pushing and popping garbage to keep the system happy"
2019-09-29 12:44:55 +02:00
Sid Price 35cb4e51e4 Windows Build Fixes GNU make 4.2.1 (#502)
After update of GNU make the tests for Windows OS are no longer needed. Note that GNU make 4.2.1 is used to build BMP under Windows OS.
Make native working

Again, the newer version of GCC make does not need the OS tests.
2019-08-28 10:45:41 +02:00
Sylvain Munaut 544bcd9845 build: Allow support for .S assembly file in SRC
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-08-05 15:41:46 +02:00
Sylvain Munaut 804ec24df9 build: Apply OPT_FLAGS after platform Makefile.inc include
This allows the platform to specify another optimization level than
the default (like -Os if space is limited)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-08-05 15:29:00 +02:00
Uwe Bonnes e29f2b4fb9 jtag/swd: Rename defines/make variables to allow removal of weak attribute
jtagtap.c is libopencm3 generic. Move to common.
2019-07-18 20:54:10 +02:00
Uwe Bonnes 32d2b2c4bf jtag: Move device list to it's own file to allow reuse. 2019-07-17 17:26:00 +02:00
Uwe Bonnes 5aebef4f64 Makefile: Indicate high level SWD/JTAG implemenatation. 2019-07-17 17:26:00 +02:00
Uwe Bonnes df7458e35a Build-Infrastructure: Allow a different target name. 2019-07-17 17:26:00 +02:00
Sid Price 2108bb7137 Native Windows builds
All except hydrabus and launchpad-icdi building in PowerShell.
2019-04-07 10:26:45 -06:00
newbrain 8de1b45c85 Kinetis KE04: Flash and debug support
Support for Kinetis KE04 8KiB, 64KiB and 128KiB variants in nxpke04.c
Target monitor commands for sector and mass erase.
Changes to kinetis.c MDM-AP target to support KE04.
Only KE04Z8 tested in HW.
2019-02-17 22:48:23 +01:00
Uwe Bonnes a6b75bb4ef Makefile: Add -Wnocast-function-type for compilation on gcc8.
Older GCC versions do not warn for disabled warnings they do not know yet.
This is needed to compile with gcc8.
2019-01-16 23:17:17 +01:00
Uwe Bonnes f234074099 stm32h7: Start of support.
Implement probe, memory map, erase, write, uid, crc, parallelism.
2018-07-27 10:59:54 +02:00
newbrain ae6f0eadc9 Support for MSP432 TI MCUs (#353)
Introduces flashing and debugging support for Texas Instruments MSP432
series of MCUs
2018-06-07 08:34:21 +12:00
Akila Ravihansa Perera 471ce2547c Added LPC17xx support (#317) 2018-03-25 12:53:30 -07:00
Gareth McMullin ecc0d9807d Fix parallel build.
Add explicit dependency of command.c on version.h
Remove version.h on make clean.
2017-05-23 11:57:35 -07:00
Chuck McManis 0aef6c6774 SAM4L: Add extended reset to target interface
This adds a new function to the internal target interface
to allow the target to get control before reset is complete
so that it can do any additional work. On this target there
is a proprietary internal bit that has to be reset in some
cases to allow the core to continue operating.
2016-12-02 00:08:21 -08:00
Gareth McMullin 917c107ded Use `git-describe --always --dirty` when generating `version.h` 2016-10-22 14:45:32 -07:00
Gareth McMullin 7c83536c14 Don't break build if no tags in history 2016-10-22 13:19:00 -07:00
Gareth McMullin 7b575bd7c6 Fix Travis deployment. 2016-10-22 13:07:42 -07:00
Gareth McMullin cbc21114c1 First attempt at publishing Travis builds to Amazon S3. 2016-10-22 11:55:15 -07:00
Gareth McMullin b494279fe5 Move target files into separate directory. 2016-07-13 08:31:09 +12:00
Gareth McMullin b644724520 Overhaul of semihosting. Remove dependence of target on gdb_packet. 2016-07-13 08:31:09 +12:00