27 Commits

Author SHA1 Message Date
Travis Geiselbrecht
34310ae0ca [make] remove line numbers from the non-debug .lst file
Turns out it's just a little too noisy for me for normal bringup. That's
what .debug.lst is for.
2025-10-05 13:57:13 -07:00
Travis Geiselbrecht
63e4bdcd92 [build] add line numbers to the disassembly .lst files 2025-09-29 22:28:00 -07:00
Travis Geiselbrecht
5d8dd9c36a [make] add 'make tags'
Tries to generate a curated ctags file for the current project and
configuration.
2024-05-09 20:29:08 -07:00
Travis Geiselbrecht
78fa76a658 [build] add a vim tag to some build generated files
Set the tab stop to 8 and turn off listing characters to look proper on
some editors that have that set to something else.
2024-04-23 23:27:37 -07:00
Alex Richardson
06a206f44e [make] Fix linker invocation to be compatible with ld.lld
The LLD linker does not allow joined short arguments, so split -dT <script>
into -d -T <script>.
2023-06-01 17:50:50 -07:00
Travis Geiselbrecht
479d989185 [make] default WITH_LINKER_GC to false at the place it is used
Also switch the test logic to the TOBOOL macro.
2022-04-18 01:15:45 -07:00
Travis Geiselbrecht
98ca62d1e8 [build] c++filt the dump and size map as well 2021-11-10 01:35:32 -08:00
Travis Geiselbrecht
ee04645a0c [make] fix typo in build output 2019-02-17 20:29:50 -08:00
Travis Geiselbrecht
a53ce0c42c [arch][arm] move -Mreg-names-raw behind an arch specific flag 2019-02-17 20:27:54 -08:00
Travis Geiselbrecht
96d98bc160 [make] replace echo commands with $(info)
Seems to result in less forks since it doesn't need to run an echo
binary.
2018-12-01 11:59:42 -08:00
Travis Geiselbrecht
5d43aa25eb [arch][rules] create ARCH_LDFLAGS and clean up all the arch rules files to consistently use ARCH_* vars 2018-11-30 22:00:45 -08:00
Girts Folkmanis
65019cc391 [build] add deps for srcfiles.txt and include_paths.txt
Without the dependencies, the files get written once and don't get
updated when include paths or source files change.
2016-12-11 14:37:12 -08:00
Pierre Carru
2a0601dfe9 [make] output .map file 2016-11-01 21:52:07 -04:00
Girts
3972b18697 [make] [lib/version] remove a misplaced .PHONY (#170)
When lib/version was included, a rule depended on .PHONY.  This would
unexpectedly invoke other rules defined as dependent on .PHONY (standard
phony-ness signal).

As a side effect, this used to generate srcfiles.txt and
include_paths.txt in build dir. Since they are useful, we might always
build those anyway, and not make them phony at all.
2016-10-07 11:24:29 -07:00
Travis Geiselbrecht
8a57db12ee [make] output a text file with all the source files and include paths used in the build 2015-11-20 21:00:44 -08:00
Travis Geiselbrecht
0e1ce411ba [make] add ability to set EXTRA_LINKER_SCRIPTS in modules
This allows for individual modules to extend the main linker script,
primarily to add their own sections to interate over.
Remove the main shared_* linker scripts.
2015-10-26 16:47:18 -07:00
Travis Geiselbrecht
c0ba79fe4f [make] also output the size of any extra objects included in the final link 2015-10-14 13:06:21 -07:00
Michael Ryleev
6d352765a1 [make] Add support for EXTRA_BUILDRULES
All makefiles added to EXTRA_BUILDRULES variable
will be included right before processing bulk of build.mk

Change-Id: Ic37e37ea7469ee57e6f6543f378c5d0c1510824b
2015-03-19 18:01:10 -07:00
Travis Geiselbrecht
f21ad5d749 [make] miscellaneous make system tweaks
-Have arch set the default optimization level. Most will use
 O2, but arm-m sets to Os.
-Make the link time garbage collection be optional. Only set
 for arm-m.
2014-03-22 21:03:03 -07:00
Travis Geiselbrecht
e36bb92d7d [make] also generate lk.elf.sym.sorted 2014-01-26 22:51:51 -08:00
Travis Geiselbrecht
e002c58b59 [make] rename INCLUDES -> GLOBAL_INCLUDES
To be more consistent, rename make variable INCLUDES to GLOBAL_INCLUDES.
Also remove the need to put -I in front of each field, the make system
will do that for you.

To fix your module makefiles:
-Change INCLUDES -> GLOBAL_INCLUDES
-Remove -I prefix
2013-06-07 22:26:06 -07:00
Travis Geiselbrecht
eaa673169e [make] add feature to allow multiple parallel build dirs
Using environment variables LKROOT and LKINC you can specify multiple
parallel top level directories (outside of the lk root) that are overlayed
on top of the build system. This allows for a structure like

lk/
testproject/
someotherfirmware/

Where each of these subdirs has an entire overlayed tree of libraries, platforms,
targets, and projects.

To accomplish this, copy makefile into the root dir and build a lk_inc.mk that
sets LKROOT and LKINC.
2013-03-12 03:12:24 -07:00
Travis Geiselbrecht
5f6b2a955d [make] fix a typo that was causing some build lines to echo 2012-11-11 14:00:34 -08:00
Travis Geiselbrecht
0e0c77c04f [make] also output .hex files in intel hex format 2012-11-02 11:48:17 -07:00
Travis Geiselbrecht
6830dfe447 [make] add options to add extra .o files to the link line at the module and global scope 2012-09-23 18:29:34 -07:00
Travis Geiselbrecht
734f32b143 [make] better modularize the build system
-Each module's rules.mk defines a seperate linkage unit. Each
module can have a private set of CFLAGS, DEFINES, INCLUDES, and so
forth.
-Files to be compiled are now added by source, not object.

Most rules.mk files can be converted easily by following these steps:

1) add 'MODULE := $(LOCAL_DIR)' near the top of the file
2) change OBJS += to MODULE_SRCS += and list source files instead of .os
3) add 'include make/module.mk' at the bottom of the file

See make/module.mk for directions.
2012-08-31 15:52:24 -07:00
Travis Geiselbrecht
5bcbd9d68e move the stray .mk files from the root dir into a make/ subdir 2009-01-24 20:15:32 -08:00