• Found a proper workaround for the issue. It is a simple matter of linking the startup file before the rest of the files. Here's a diff (commit numbers may be wrong because this is my fork):

    diff --git a/Makefile b/Makefile
    index 01a31191..dfd4638e 100755
    --- a/Makefile
    +++ b/Makefile
    @@ -601,7 +601,7 @@ SOURCES += $(PININFOFILE).c
     
     SOURCES += $(WRAPPERSOURCES) $(TARGETSOURCES)
     SOURCEOBJS = $(SOURCES:.c=.o) $(CPPSOURCES:.cpp=.o)
    -OBJS = $(PRECOMPILED_OBJS) $(SOURCEOBJS)
    +OBJS = $(SOURCEOBJS) $(PRECOMPILED_OBJS)
     
     
     # -ffreestanding -nodefaultlibs -nostdlib -fno-common
    

    Here is the pull request:

    https://github.com/espruino/Espruino/pul­l/1633

    I'd also like to ask for you to look at this other pull request:

    https://github.com/espruino/Espruino/pul­l/1632

    It fixes an issue where requesting an open drain output (without pullups) ends up configuring the pullup regardless.

    Thanks.

About

Avatar for swineone @swineone started