From 9f28e53c71d28d04e2775c59944d2887a99f1e86 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sun, 22 Nov 2020 01:06:30 -0700 Subject: Large reorganization. What was in core/ is now moved to arch/stm34l4xxx/peripherals. This new directory is *supposed to* to contain raw header files defining just the pertinent register structures for the various peripherals. Peripheral management belongs somewhere in the new `kern/..` directories. This is not completely the case at the moment, so more refactoring needs to be done. What was sitting in the root has now been moved into the kern/ directory. The kern/ directory is to contain everything else other than raw device register definitions. The root of the kern/ tree is reserved for standard library-esque headers. The kern/ directory contains management systems for that peripheral. (At the moment DMA is the only peripheral with a decent management system.) Preferably these peripheral systems should only include their correlating header in arch/stm34l4xxx/peripherals, and use other management systems for handling other peripherals rather than manipulating their raw registers directly. (Though this ideal will require much more critical mass of management systems.) --- 02-usart/genmake.pl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '02-usart/genmake.pl') diff --git a/02-usart/genmake.pl b/02-usart/genmake.pl index 89403ce..c4165a6 100755 --- a/02-usart/genmake.pl +++ b/02-usart/genmake.pl @@ -87,6 +87,7 @@ foreach $file (@files) { my $obj_files_deps = join(' ', @obj_files); +my @tests_tgts; foreach $file (@test_files) { my $c_file = $file; @@ -98,6 +99,7 @@ foreach $file (@test_files) { my @deps = header_deps($c_file); my $deps_as_join = join(" ", @deps); + push (@test_tgts, "${outbinary}"); print "${outbinary}: $deps_as_join $obj_files_deps test_harness/test_harness.a\n\t"; print "mkdir -p " . dirname($outbinary) . "\n\t"; print '$(CC) $(CFLAGS) -o' . ${outbinary} . ' ' . $c_file . ' ' . $obj_files_deps . " test_harness/test_harness.a\n\n"; @@ -111,6 +113,13 @@ foreach $file (@test_files) { print "test_harness/test_harness.a: test_harness/test_harness.h test_harness/test_harness.c\n\t"; print 'cd test_harness; $(MAKE) test_harness.a; cd ..' . "\n\n"; +print "tests_: " . join(" ", @test_tgts) . "\n\t"; +print "" . join("\n\t", @test_tgts) . "\n\n"; + +print ".PHONY: tests\n"; +print "tests:\n\t"; +print 'PREFIX=$(TEST_PREFIX) CFLAGS="$(TEST_CFLAGS)" $(MAKE) tests_' . "\n\n"; + print "FORCE:\n\t\n\n"; print "$arch_obs_dir/main.elf: FORCE $obj_files_deps linker/linker_script.ld\n\t"; print "([ \"\$\$($idempotency_cmd_make)\" != \"\$(IDEMPOTENCY_HASH)\" ] " -- cgit