PiDP-8/I Software

Check-in [1ecc2e5833]
Log In

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Eliminate all use of vc includes and libraries. Eliminates PI_CFLAGS, PI_LFLAGS and PI_LIBS. Also pull in fix for install from Trunk. (Should save you a bit of merging, HB.)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | pi5-ils2-bookworm
Files: files | file ages | folders
SHA1: 1ecc2e5833f2a988279728fd10f1c0a2ff742222
User & Date: poetnerd 2024-06-09 19:35:47
Context
2024-06-09
20:59
Fix for scanswitch as per email on 5/19. Otherwise pidp8i won't start from systemd. check-in: 3a1f169d7d user: poetnerd tags: pi5-ils2-bookworm
19:35
Eliminate all use of vc includes and libraries. Eliminates PI_CFLAGS, PI_LFLAGS and PI_LIBS. Also pull in fix for install from Trunk. (Should save you a bit of merging, HB.) check-in: 1ecc2e5833 user: poetnerd tags: pi5-ils2-bookworm
19:27
Eliminate all use of vc includes and libraries. Eliminates PI_CFLAGS, PI_LFLAGS and PI_LIBS. Cleanup made possible through testing by HBEggenstein in pi5-ils2-bookworm branch. check-in: f50a614018 user: poetnerd tags: pi5
2024-06-06
19:54
performance optimizations check-in: 1aefd0c723 user: HBEggenstein tags: pi5-ils2-bookworm
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Makefile.in.

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

# C build flags for the PDP-8 simulator and its PiDP-8/I extensions.

ifeq (@BUILD_PIDP8I@, 1)
BUILD_PIDP8I_CFLAGS = -DPIDP8I -I @srcdir@/src/pidp8i -I @srcdir@/src/pinctrl
endif

SIM_CFLAGS := @CFLAGS@ @PI_CFLAGS@ @BUILDMODE@ \
	-Wno-unused-result -Wno-parentheses \
	-DUSE_READER_THREAD -DHAVE_DLOPEN=$(subst .,,@SH_SOEXT@) \
	-DSIM_ASYNCH_IO -DHAVE_GLOB \
	-DSIM_GIT_COMMIT_ID=$(SGCID) -DSIM_GIT_COMMIT_TIME=$(SGCTM) \
	-DSIM_BUILD_TOOL='autosetup+gmake' \
	-D_GNU_SOURCE \
	-U__STRICT_ANSI__ \







|







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

# C build flags for the PDP-8 simulator and its PiDP-8/I extensions.

ifeq (@BUILD_PIDP8I@, 1)
BUILD_PIDP8I_CFLAGS = -DPIDP8I -I @srcdir@/src/pidp8i -I @srcdir@/src/pinctrl
endif

SIM_CFLAGS := @CFLAGS@ @BUILDMODE@ \
	-Wno-unused-result -Wno-parentheses \
	-DUSE_READER_THREAD -DHAVE_DLOPEN=$(subst .,,@SH_SOEXT@) \
	-DSIM_ASYNCH_IO -DHAVE_GLOB \
	-DSIM_GIT_COMMIT_ID=$(SGCID) -DSIM_GIT_COMMIT_TIME=$(SGCTM) \
	-DSIM_BUILD_TOOL='autosetup+gmake' \
	-D_GNU_SOURCE \
	-U__STRICT_ANSI__ \
98
99
100
101
102
103
104

105
106
107
108
109
110
111
ifeq (@BUILD_DEEPER_THOUGHT@, 1)
PI_BINS += bin/deeper
endif
endif


BINS = $(PIDP8I_SIM) @CC8_CROSS@ \

	bin/d8tape \
	bin/palbart \
	bin/ptp2txt

BIN_SCRIPTS = \
	bin/os8pkg \
	bin/pidp8i \







>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
ifeq (@BUILD_DEEPER_THOUGHT@, 1)
PI_BINS += bin/deeper
endif
endif


BINS = $(PIDP8I_SIM) @CC8_CROSS@ \
	$(PI_BINS) \
	bin/d8tape \
	bin/palbart \
	bin/ptp2txt

BIN_SCRIPTS = \
	bin/os8pkg \
	bin/pidp8i \
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
#### TARGETS ###########################################################

.PHONY: all tags
.PRECIOUS: $(PRECIOUS_OUTFILES)

all: \
	$(OUTFILES) $(PRECIOUS_OUTFILES) \
	$(BUILDDIRS) $(BINS) $(PI_BINS) $(BOOTSCRIPTS) $(LISTINGS) \
	$(ASM_PTS) $(FC_EX_PTS) $(PAL_EX_PTS) \
	$(OS8_TOOLTIME) pkg_all \
	$(OS8_RK05S) $(V3F_MADE_RK05) $(V3D_TC08_TU56) \
	$(V3D_TD12K_TU56) $(V3F_TC08_TU56) $(V3F_TD12K_TU56)

clean:
	@rm -f $(BINS) $(BOOTSCRIPTS) $(ASM_PTS) $(PAL_EX_PTS) $(LISTINGS) \







|







414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
#### TARGETS ###########################################################

.PHONY: all tags
.PRECIOUS: $(PRECIOUS_OUTFILES)

all: \
	$(OUTFILES) $(PRECIOUS_OUTFILES) \
	$(BUILDDIRS) $(BINS) $(BOOTSCRIPTS) $(LISTINGS) \
	$(ASM_PTS) $(FC_EX_PTS) $(PAL_EX_PTS) \
	$(OS8_TOOLTIME) pkg_all \
	$(OS8_RK05S) $(V3F_MADE_RK05) $(V3D_TC08_TU56) \
	$(V3D_TD12K_TU56) $(V3F_TC08_TU56) $(V3F_TD12K_TU56)

clean:
	@rm -f $(BINS) $(BOOTSCRIPTS) $(ASM_PTS) $(PAL_EX_PTS) $(LISTINGS) \
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
obj/cc8/os8/%.c: @srcdir@/src/cc8/examples/%.c
	sed '/^#include/d' $< > $@

$(BUILDDIRS):
	mkdir -p $@

$(PIDP8I_SIM): $(SIM_OBJS) $(GPIO_OBJS)  $(PIDP8I_OBJS) $(LED_OBJ)
	$(CC) -o $@ @PI_LFLAGS@ $^ $(LIBS) $(SIM_LFLAGS) @PI_LIBS@
	ln -f bin/pidp8i-sim bin/pdp8

bin/cc8: $(CC8_OBJS)
	$(CC) $(CC8_CROSS_CFLAGS) -o $@ $^ $(LIBS)

bin/d8tape: $(D8TAPE_OBJS)
	$(CC) $(D8TAPE_CFLAGS) -o $@ $^







|







899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
obj/cc8/os8/%.c: @srcdir@/src/cc8/examples/%.c
	sed '/^#include/d' $< > $@

$(BUILDDIRS):
	mkdir -p $@

$(PIDP8I_SIM): $(SIM_OBJS) $(GPIO_OBJS)  $(PIDP8I_OBJS) $(LED_OBJ)
	$(CC) -o $@ $^ $(LIBS) $(SIM_LFLAGS)
	ln -f bin/pidp8i-sim bin/pdp8

bin/cc8: $(CC8_OBJS)
	$(CC) $(CC8_CROSS_CFLAGS) -o $@ $^ $(LIBS)

bin/d8tape: $(D8TAPE_OBJS)
	$(CC) $(D8TAPE_CFLAGS) -o $@ $^
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
bin/txt2ptp: bin/ptp2txt
	ln -f bin/ptp2txt bin/txt2ptp

# The deeper, pidp8i-test, and scanswitch programs only make sense if we
# have actual PiDP8i hardware
ifeq (@BUILD_PIDP8I@, 1)
bin/pidp8i-test: $(GPIO_OBJS) obj/misc/test.o obj/pidp8i/gpio-nls.o
	$(CC) -o $@ $(CFLAGS) @PI_CFLAGS@ @PI_LFLAGS@ $^ $(LIBS) @PI_LIBS@ -lncurses

bin/deeper: obj/misc/deeper.o $(LED_OBJ) $(GPIO_OBJS)
	$(CC) -o $@ $(CFLAGS) @PI_CFLAGS@ @PI_LFLAGS@ $^ $(LIBS) @PI_LIBS@

libexec/scanswitch: $(GPIO_OBJS) obj/misc/scanswitch.o obj/pidp8i/gpio-nls.o
	$(CC) -o $@ $(CFLAGS) @PI_CFLAGS@ @PI_LFLAGS@ $^ $(LIBS) @PI_LIBS@
endif

doc/e8-manual.pdf: doc/e8-manual.md
	tools/mkmanpdf doc/e8-manual

# Reconfigure whenever one of the *.in or autosetup files changes unless
# this is "make clean".







|


|


|







922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
bin/txt2ptp: bin/ptp2txt
	ln -f bin/ptp2txt bin/txt2ptp

# The deeper, pidp8i-test, and scanswitch programs only make sense if we
# have actual PiDP8i hardware
ifeq (@BUILD_PIDP8I@, 1)
bin/pidp8i-test: $(GPIO_OBJS) obj/misc/test.o obj/pidp8i/gpio-nls.o
	$(CC) -o $@ $(CFLAGS) $^ $(LIBS) -lncurses

bin/deeper: obj/misc/deeper.o $(LED_OBJ) $(GPIO_OBJS)
	$(CC) -o $@ $(CFLAGS) $^ $(LIBS)

libexec/scanswitch: $(GPIO_OBJS) obj/misc/scanswitch.o obj/pidp8i/gpio-nls.o
	$(CC) -o $@ $(CFLAGS) $^ $(LIBS)
endif

doc/e8-manual.pdf: doc/e8-manual.md
	tools/mkmanpdf doc/e8-manual

# Reconfigure whenever one of the *.in or autosetup files changes unless
# this is "make clean".

Changes to auto.def.

394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# Building and linking against the gpio stuff is conditionalized on the PIDP8I #define.
set uname_machine [exec uname -m 2>/dev/null]
set uname_system [exec uname -s 2>/dev/null]

msg-result "Arch: $uname_machine system: $uname_system"

if {([string match "arm*" $uname_machine] || [string match "aarch64*" $uname_machine] )  && [string match "Linux" $uname_system ]} {
    msg-result "We are a Pi Platform"
    define BUILD_PIDP8I 1
    define PI_CFLAGS ""
    define PI_LFLAGS ""
    define PI_LIBS   ""

# 
#    if {[file isdirectory "/opt/vc"]} {
#        define PI_CFLAGS "-I/opt/vc/include"
#        define PI_LFLAGS "-L/opt/vc/lib"
#        define PI_LIBS   ""
#    } else {
#        msg-result "WARNING: Building on Pi platform without libraspberrypi-dev installed!"
#        define PI_CFLAGS ""
#        define PI_LFLAGS ""
#        define PI_LIBS   ""
#    }
} else {
    msg-result "We are not a Pi Platform"
    define PI_CFLAGS ""
    define PI_LFLAGS ""
    define PI_LIBS   ""
}

if {[opt-bool force-pidp8i]} {
    msg-result "Forcing build of pidp8i."
    define BUILD_PIDP8I 1
    # We may need the vc libs, but we leave it users of this flag to debug.
}

# Ensure we have the libncurses development files installed here, else
# pidp8i-test won't build.
if {![cc-check-includes curses.h]} {
    user-error "Could not find curses.h.  Try installing libncurses-dev."
} elseif {![cc-check-function-in-lib initscr ncurses]} {







|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





<







394
395
396
397
398
399
400
401
402




















403
404
405
406
407

408
409
410
411
412
413
414
# Building and linking against the gpio stuff is conditionalized on the PIDP8I #define.
set uname_machine [exec uname -m 2>/dev/null]
set uname_system [exec uname -s 2>/dev/null]

msg-result "Arch: $uname_machine system: $uname_system"

if {([string match "arm*" $uname_machine] || [string match "aarch64*" $uname_machine] )  && [string match "Linux" $uname_system ]} {
    msg-result "We are a Pi Platform. Build for the PiDP-8/i Hardware."
    define BUILD_PIDP8I 1




















}

if {[opt-bool force-pidp8i]} {
    msg-result "Forcing build of pidp8i."
    define BUILD_PIDP8I 1

}

# Ensure we have the libncurses development files installed here, else
# pidp8i-test won't build.
if {![cc-check-includes curses.h]} {
    user-error "Could not find curses.h.  Try installing libncurses-dev."
} elseif {![cc-check-function-in-lib initscr ncurses]} {