totalspectrum / flexprop Goto Github PK
View Code? Open in Web Editor NEWSimple GUI for Propeller development (both P1 and P2)
License: Other
Simple GUI for Propeller development (both P1 and P2)
License: Other
I am jumping into P2 for the first time and I was following directions for installing various tools, including this one. This note:
You'll also need to get binary versions of fastspin and loadp2 for your platform, and copy them into the bin folder.
sent me on a 30 minute wild goose chase trying to compile p2gcc, which didn't build (needed propeller-elf-gcc
), which then sent me looking for that, which was another dead-end. I finally gave up and compiled just loadp2, only to discover on putting it in flexgui's bin directory that there was already a newer version in the release.
Recent RPi4 build of flexprop...
flexpropRPi.zip
After a git pull (and a complete git clone) of flexprop, I'm no longer able to build flexprop on latest macOS 11.5.2...
There seems to (yet again) be an issue around Tk versions.
The error starts here:
cc -o flexprop.bin src/flexprop_native.c -I/opt/tcl-tk/include -L/opt/tcl-tk/lib -ltk8.6 -ltcl8.6 -lz -lpthread -framework CoreFoundation -framework CoreServices -framework Cocoa -framework Carbon -framework IOKit -lm -lobjc
In file included from src/flexprop_native.c:23:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/tk.h:31:3: error: Tk 8.5 must be compiled with tcl.h from Tcl 8.5
##error Tk 8.5 must be compiled with tcl.h from Tcl 8.5
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/tk.h:86:11: fatal error: 'X11/Xlib.h' file not found
##include <X11/Xlib.h>
^~~~~~~~~~~~
2 errors generated.
make: *** [flexprop.bin] Error 1
Just a tiny compatibility issue.
What are you planning to do with the debug() statements that Chip supports?
I just got a compile error "error: syntax error, unexpected DEBUG" for my having debug() statements in the DAT section (pasm2 code).
It would be nice not to have to comment these out as it would mean that I have to edit my code depending upon which compiler I'm using.
When trying to load any compiled binary during "Compile & Run on P2", a timeout error returns unless the "-SINGLE" option is added to the Run Command line in Configure Commands panel... This happens on .bas and .spin2 compile/run attempts.
$ /Users/altergator/flexprop//bin/loadp2 -p /dev/cu.usbserial-A601RZ6G -b230400 /Users/altergator/Desktop/rayTest.binary -9/Users/altergator/Desktop -k -T; osascript -e 'tell application "flexprop.mac" to activate'; exit 0
ERROR: timeout waiting for initial checksum: got -1
Try increasing the FIFO setting if not large enough for your setup
Press enter to continue...
Attempt with "-SINGLE" option:
$ /Users/altergator/flexprop//bin/loadp2 -p /dev/cu.usbserial-A601RZ6G -b230400 /Users/altergator/Desktop/rayTest.binary -9/Users/altergator/Desktop -k -T -SINGLE; osascript -e 'tell application "flexprop.mac" to activate'; exit 0
( Entering terminal mode. Press Ctrl-] or Ctrl-Z to exit. )
This is in Linuxmint 20.3 terminal. I believe I followed all the install instructions correctly. I notice warnings in the make install process that referred to ignoring the return value from 'getcwd' and a 'write' function.
This execution was after cloning from github and running the make install.
This same error occurred when I installed flexprop using gdebi on the .deb vesion download.
./flexprop.bin
Error in startup script: child killed: segmentation violation
while executing
"exec -ignorestderr $ROOTDIR/bin/proploader$EXE -W"
(procedure "rescanPorts" line 21)
invoked from within
"rescanPorts"
(file "/home/georgem/Programs/flexprop/src/gui.tcl" line 2345)
invoked from within
"source $ROOTDIR/src/gui.tcl"
(file "/home/georgem/Programs/flexprop/src/flexprop.tcl" line 30)
Using latest from github as of 4pm Sunday 4/19/2020.
If you configure the commands for P1, you will see all 3 commands change. With the run and flash commands using proploader.
Now, if you exit flexgui completely and run again and go look at the configured commands the flash command one has reverted back to the loadp2 line. The other two commands are still the P1 versions.
Appears to be a problem with floating point printf and sprintf with 5.9.2 "C" compiler. Program written under previous editions worked fine, but under 5.9.2 all floating point formated entries (ex: %6.1f) just prints ???. ex: this program uses sprintf and prints floats fine in previous 5.5.2.
After updating to the latest macOS (12.0.1) and newest flexprop 5.9.4, the flexprop editor no longer allows file access. Trying to open files or save them results in "The open file operation failed" dialog box. And, an Assertion failure appears in the Terminal where flexprop was launched. Not sure if the mac update or flexprop version are causing the issue. Could be a Tcl issue with macOS 12.0.1... A copy of the console error message and a screenshot follow:
$ ./flexprop 2021-10-30 06:27:38.320 flexprop[8795:1239752] *** Assertion failure in -[NSOpenPanel beginServicePanel:asyncExHandler:], NSVBOpenAndSavePanels.m:1907 2021-10-30 06:27:38.326 flexprop[8795:1239752] -[NSSavePanel beginWithCompletionHandler:]_block_invoke caught non-fatal NSInternalInconsistencyException '<NSOpenPanel: 0x7f7fd771c000> is attempting to advance this Open/Save panel to run phase while another self.advanceToRunPhaseCompletionHandler is in waiting for a previous attempt. An Open/Save panel cannot start to advance more than once.' with user dictionary { NSAssertFile = "NSVBOpenAndSavePanels.m"; NSAssertLine = 1907; } and backtrace ( 0 CoreFoundation 0x00007ff819185e5b __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff818ee6b9d objc_exception_throw + 48 2 Foundation 0x00007ff81a03c653 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 267 3 AppKit 0x00007ff81c53f269 -[NSSavePanel beginServicePanel:asyncExHandler:] + 475 4 AppKit 0x00007ff81c54051d -[NSSavePanel runModal] + 297 5 libtk8.6.dylib 0x00000001052fff53 showOpenSavePanel + 171 6 libtk8.6.dylib 0x00000001052ff843 Tk_GetOpenFileObjCmd + 2001 7 libtcl8.6.dylib 0x00000001053bc9f4 TclNRRunCallbacks + 79 8 libtk8.6.dylib 0x000000010528d547 TkInvokeMenu + 488 9 libtk8.6.dylib 0x000000010530c652 -[TKMenu(TKMenuActions) tkMenuItemInvoke:] + 150 10 AppKit 0x00007ff81bd3864d -[NSApplication(NSResponder) sendAction:to:from:] + 288 11 AppKit 0x00007ff81be2d9de -[NSMenuItem _corePerformAction] + 413 12 AppKit 0x00007ff81be2d6fe -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 95 13 AppKit 0x00007ff81be78519 -[NSMenu performActionForItemAtIndex:] + 113 14 AppKit 0x00007ff81be7849f -[NSMenu _internalPerformActionForItemAtIndex:] + 82 15 AppKit 0x00007ff81be782e8 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 101 16 AppKit 0x00007ff81be11eb3 NSSLMMenuEventHandler + 1078 17 HIToolbox 0x00007ff821cffbad _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1391 18 HIToolbox 0x00007ff821cfefde _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 333 19 HIToolbox 0x00007ff821d13e0b SendEventToEventTarget + 39 20 HIToolbox 0x00007ff821d742ef _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 365 21 HIToolbox 0x00007ff821d9975e SendMenuCommandWithContextAndModifiers + 46 22 HIToolbox 0x00007ff821d99708 SendMenuItemSelectedEvent + 348 23 HIToolbox 0x00007ff821d9955a _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 96 24 HIToolbox 0x00007ff821d99f60 _ZL14MenuSelectCoreP8MenuData5PointdjPP13OpaqueMenuRefPt + 631 25 HIToolbox 0x00007ff821d99c51 _HandleMenuSelection2 + 459 26 AppKit 0x00007ff81bcd2b79 _NSHandleCarbonMenuEvent + 215 27 AppKit 0x00007ff81bcd29e6 _DPSEventHandledByCarbon + 54 28 AppKit 0x00007ff81bb32750 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3447 29 libtk8.6.dylib 0x0000000105311f05 TkMacOSXEventsCheckProc + 329 30 libtcl8.6.dylib 0x0000000105464ed0 Tcl_DoOneEvent + 302 31 libtk8.6.dylib 0x0000000105262bc5 Tk_MainLoop + 33 32 libtk8.6.dylib 0x000000010526f7d2 Tk_MainEx + 1624 33 flexprop 0x0000000104fdca5e main + 94 34 dyld 0x000000010b69e4fe start + 462 )
When building loadp2 on Ubuntu 18.04 it fails to find MainLoader.h
$ ./build_linux
loadp2.c:71:10: fatal error: MainLoader.h: No such file or directory
#include "MainLoader.h"
^~~~~~~~~~~~~~
compilation terminated.
I was not able to locate this file in the code that was brought down.
On macOS, after a fresh git clone (with --recursive) of flexgui, make install gets 2 errors trying to build sdboot.binary:
gc:65: error: Unknown symbol _clkfreq_var
gc:66: error: Unknown symbol _clkmode_var
make[1]: *** [sdboot.binary] Error 1
Build log:
flexguiBuildError.txt
After exec'ing "wish flexgui.tcl" in a Terminal window on macOS (Catalina v10.15.2 in the case), and making changes within the Commands/Configure Commands dialog, I expect the .flexguji.config file to be created either within the flexgui root directory or the user's root directory.
RESULT: no .flexgui.config file is found, anywhere (searched for with $ find . -name ".flexgui.config"). Each new execution of flexgui starts with the default Configure Commands values.
Looks like the Makefile for macOS does not create the bin file required for copying fastspin & spin2cpp binaries... If I create the bin file before running the Makefile.mac (change its name to "Makefile", it completes as it normally does. I don't remember this being a problem in the past (pre 1231/2018).
The error:
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/fastspin fastspin.c build/common.o build/spinc.o build/lexer.o build/symbol.o build/ast.o build/expr.o build/dofmt.o build/flexbuf.o build/lltoa_prec.o build/strupr.o build/strrev.o build/strdupcat.o build/preprocess.o build/cppexpr.o build/functions.o build/cse.o build/loops.o build/pasm.o build/outdat.o build/outlst.o build/spinlang.o build/basiclang.o build/clang.o build/outasm.o build/assemble_ir.o build/optimize_ir.o build/inlineasm.o build/outcpp.o build/cppfunc.o build/outgas.o build/directive.o build/expand.o build/mbchar.o build/mcpp_eval.o build/mcpp_main.o build/mcpp_system.o build/mcpp_support.o build/version.o build/spin.tab.o build/basic.tab.o build/cgram.tab.o -lm
cp spin2cpp/build/fastspin bin/fastspin
cp: bin/fastspin: No such file or directory
make: *** [bin/fastspin] Error 1
If user does File > New File, then enters code and clicks Compile, receives "Compilation failed" error.
The call to fastspin fails because there's no filename yet (user has not saved the entered code).
When a large number (8, 10, 12, etc...?) of files are open for editing, the tabs get very small horizontally and the filenames get cut-down and it is difficult to know which actual file you are editing as you copy & rename files to add variant filenames (ex: "jm_i2c_driver" gets cloned to: "jm_i2c_driver_MOD"). I often quickly clone code from others (mostly JonnyMac :-) and add my initials or "MOD" to the filename. On occasion, I've started editing and realized I was editing the original file only after compiling/saving. Some way of know which actual file you are about to edit, would help with this problem.
Could tooltips containing the filename be added? Then, as you move the cursor over a TAB, the full filename of the file is briefly displayed.
I've seen that there are ways to add help text to TABs, but I'm unsure how to implement. Here's a stackoverflow posting which might provide some ideas about tab help text: https://stackoverflow.com/questions/52352475/display-tooltip-when-hovering-on-a-tab
In FlexProp 5.3.0-beta, while checking on how much new DEBUG abilities were available, I noticed that local variables in a method() don't get initialized to zero. Both PNut_v35j and PropTool 2.5.3 do initialize local variables to zero on entry to the method(). This could create confusion between the usage of these tools...
I've attached a zip file containing a source code example and DEBUG screenshots for each of the three tools: PNut_v35j, PropTool_2.5.3 and FlexProp_5.3.0-beta.
In the flexgui editor: When a compiled listing window is displayed, the user can use the menu commands to Copy & Paste text to/from the listing window (and back to the source text window).
However, the Copy command does not function when the user applies Command-C to attempt text copying. In the example image, in the listing window, the text "she muldivb_, #16" has been selected and Command-C has been typed. Attempting to paste that text into the Search dialog, shows that a previously-copied text, "sub objptr, #4" gets pasted. The same previously-copied text will paste into the source listing as well.
It appears that only the Command-C (Copy) command works incorrectly. Command-V, paste works as it should.
On macOS (11.2.2), flexprop gives a console warning whenever the Find dialog is invoked:
2021-03-16 10:12:30.686 Wish[55915:5091906] Warning: Expected min height of view: (<NSButton: 0x7fca4a198dc0>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2021-03-16 10:30:56.822 Wish[55915:5091906] Warning: Expected min height of view: (<NSButton: 0x7fca4a19ae50>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2021-03-16 10:30:59.108 Wish[55915:5091906] Warning: Expected min height of view: (<NSButton: 0x7fca4a224550>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
May be macOS specific as I know that the Tcl/Tk versions on macOS may be older variants. This may be a cause...
I do not have any problems with how the command CONST works.
It's more an AESTHETIC query/request.
I note the command is FIXED to the Left Margin and no tabs or leading spaces are permitted before the keyword CONST.
Would it be possible (in future versions) to ALLOW for leading spaces to be used before the keyword CONST?
Thanks
JD
I just unpacked Flexprop 5.9.10 and got the Norton Firewall alert below when launching flexprop.exe, it concerns proploader.exe wanting to access UDP port#32420.
Is this expected? I don't get that alert when running 5.9.9 or earlier versions.
I don't know if I should over-ride the recommendation to block the transaction. The alert shows up immediately after starting flexprop, and I haven't even loaded any code or connected a propeller.
After I let Norton block the transaction, I can still load some spin2 code and have it download/run the code on a P2 Edge board. So I don't know what the UDP transaction's purpose is/was...
When building flexprop on a recent (bullseye) release of Raspberry Pi OS, the HTML help files will not be created unless additional resources are available. The docs process to create the .html help files requires pandoc as well as LaTeX (or a replacement, such as lyx).
After an initial build with "make install", on Raspberry Pi, flexprop's GUI cannot find the .html help files for spin, BASIC, C, etc... Reviewing the Makefile displays the requirement of 'pandoc' to build pdf and html files from the .md help files. Installing pandoc (with sudo apt install pandoc) helps to get a bit further, creating pdfs but some form of LaTeX is needed to create the .html files. Not finding a simple install for LaTeX, I did find that 'lyx' can be installed (sudo apt install lyx) and this allows the build/Install to complete successfully.
Perhaps just an update to the readme will help other Raspberry Pi users!
Another for you. Trying to build and test my RGB LED matrix driver with your tools.
Just found this:
mov panelCol, #screen.MAX_DISPLAY_COLUMNS
Generates: error: Operand too complex for inline assembly
Guess I'm stopped at this point. BTW- I'm just working with spin2/pasm2 with these tests.
in loadp2/osint_linux.c ftime is used to implement msleep function
Trying to port flexprop to OpenBSD and this function (and related sys/timeb.h) has been removed a looong time ago there as it has been deprecated in POSIX standard. Even in Linux it is obsoleted according to the man page.
The usleep function it replaces is ALSO obsoleted and replaced by nanosleep instead as below. Sorry no patch/pull request and maybe too simplistic as it will fail horribly when using more then 999 ms. However for loadp2 it works without any problems on both OpenBSD and Linux (Mint & raspbian)
void msleep(int ms)
{
struct timespec remaining, request = {0, ms * 1000000};
nanosleep(&request, &remaining);
}
PS I'll come back with a pull request for all the changes needed to get it to compile on OpenBSD once I've completed it all. For now it is mainly in the Makefiles, but still struggling with proploader and port selection in flexprop (similar to MacOS though)
The Makefile's TCLROOT
line is hardcoded and is causing the CI server to fail. The Docker image being used by the CI server already has Tcl/Tk installed via apt
, so TCLROOT
shouldn't need to be set at all. Can you conditionally set TCLROOT
based on whether a default installation can be found?
Fun?? test.
Attempt to position the cursor just ahead of the first character on an indented line. Can take up to leading "number of spaces" tries (the cursor moves toward the desired position with every click?!). That's a symptom I haven't seen before?! ;-)
I'm on macOS catalina v10.15.7 running flexprop from the .dmg build.
I wanted to provide a build version but I don't see a menu item offering an about screen or something similar.
You are making great progress!
Thanks for your work on this!
Building flexprop (actually, the spin2cpp module) on current macOS version (version 11.0.1 Big Sur) results in:
~/source/flexprop/spin2cpp]$ make
bison -t -b ./build/spin -d frontends/spin/spin.y
frontends/spin/spin.y:7.9-18: syntax error, unexpected identifier, expecting string
make: *** [build/spin.tab.h] Error 1
standard bison version on that macOS is:
% bison -V
bison (GNU Bison) 2.3
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
In order to build spin2cpp, the workaround is to install bison from homebrew:
$ brew install bison
$ /usr/local/Cellar/bison/3.7.4/bin/bison -V
bison (GNU Bison) 3.7.4
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AND, mod the spin2cpp Makefile with the following:
# note: to produce detailed debug, use YACC="bison --report=all"
YACC = /usr/local/Cellar/bison/3.7.4/bin/bison
#YACC = bison
#YACC = bison372
Probably not something to fix in spin2cpp or flexprop themselves, but a note about this in the README files for these projects would help. Also, this change must be made to the Makefile whenever the Makefile has been updated on github...
After a fresh "git pull", building flexgui gives errors building sdboot.binary
~/source/flexgui % make install
make -C spin2cpp
mkdir -p ./build
bison -p spinyy -t -b ./build/spin -d frontends/spin/spin.y
frontends/spin/spin.y: conflicts: 25 shift/reduce
bison -p basicyy -t -b ./build/basic -d frontends/basic/basic.y
frontends/basic/basic.y:1270.5-1272.44: warning: unused value: $4
frontends/basic/basic.y: conflicts: 10 shift/reduce
bison -p cgramyy -t -b ./build/cgram -d frontends/c/cgram.y
frontends/c/cgram.y: conflicts: 3 shift/reduce
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/lexer.o -c frontends/lexer.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/symbol.o -c symbol.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/ast.o -c ast.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/expr.o -c expr.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/dofmt.o -c util/dofmt.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/flexbuf.o -c util/flexbuf.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/lltoa_prec.o -c util/lltoa_prec.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/strupr.o -c util/strupr.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/strrev.o -c util/strrev.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/strdupcat.o -c util/strdupcat.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/to_utf8.o -c util/to_utf8.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/from_utf8.o -c util/from_utf8.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/preprocess.o -c preprocess.c
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/testlex testlex.c build/lexer.o build/symbol.o build/ast.o build/expr.o build/dofmt.o build/flexbuf.o build/lltoa_prec.o build/strupr.o build/strrev.o build/strdupcat.o build/to_utf8.o build/from_utf8.o build/preprocess.o -lm
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/common.o -c frontends/common.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/case.o -c frontends/case.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/spinc.o -c spinc.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/functions.o -c functions.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/cse.o -c cse.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/loops.o -c loops.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/types.o -c frontends/types.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/pasm.o -c pasm.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/outdat.o -c backends/dat/outdat.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/outlst.o -c backends/dat/outlst.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/spinlang.o -c frontends/spin/spinlang.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/basiclang.o -c frontends/basic/basiclang.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/clang.o -c frontends/c/clang.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/outasm.o -c backends/asm/outasm.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/assemble_ir.o -c backends/asm/assemble_ir.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/optimize_ir.o -c backends/asm/optimize_ir.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/inlineasm.o -c backends/asm/inlineasm.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/compress_ir.o -c backends/asm/compress_ir.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/outcpp.o -c backends/cpp/outcpp.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/cppfunc.o -c backends/cpp/cppfunc.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/outgas.o -c backends/cpp/outgas.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/cppexpr.o -c backends/cpp/cppexpr.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/cppbuiltin.o -c backends/cpp/cppbuiltin.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/directive.o -c mcpp/directive.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/expand.o -c mcpp/expand.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/mbchar.o -c mcpp/mbchar.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/mcpp_eval.o -c mcpp/mcpp_eval.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/mcpp_main.o -c mcpp/mcpp_main.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/mcpp_system.o -c mcpp/mcpp_system.c
gcc -MMD -MP -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/mcpp_support.o -c mcpp/mcpp_support.c
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -DGITREV=1061f38d -o build/version.o -c version.c
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/spin.tab.o -c build/spin.tab.c
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/basic.tab.o -c build/basic.tab.c
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/cgram.tab.o -c build/cgram.tab.c
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/spin2cpp spin2cpp.c build/common.o build/case.o build/spinc.o build/lexer.o build/symbol.o build/ast.o build/expr.o build/dofmt.o build/flexbuf.o build/lltoa_prec.o build/strupr.o build/strrev.o build/strdupcat.o build/to_utf8.o build/from_utf8.o build/preprocess.o build/functions.o build/cse.o build/loops.o build/types.o build/pasm.o build/outdat.o build/outlst.o build/spinlang.o build/basiclang.o build/clang.o build/outasm.o build/assemble_ir.o build/optimize_ir.o build/inlineasm.o build/compress_ir.o build/outcpp.o build/cppfunc.o build/outgas.o build/cppexpr.o build/cppbuiltin.o build/directive.o build/expand.o build/mbchar.o build/mcpp_eval.o build/mcpp_main.o build/mcpp_system.o build/mcpp_support.o build/version.o build/spin.tab.o build/basic.tab.o build/cgram.tab.o -lm
gcc -g -Wall -I. -I./build -DFLEXSPIN_BUILD -o build/fastspin fastspin.c build/common.o build/case.o build/spinc.o build/lexer.o build/symbol.o build/ast.o build/expr.o build/dofmt.o build/flexbuf.o build/lltoa_prec.o build/strupr.o build/strrev.o build/strdupcat.o build/to_utf8.o build/from_utf8.o build/preprocess.o build/functions.o build/cse.o build/loops.o build/types.o build/pasm.o build/outdat.o build/outlst.o build/spinlang.o build/basiclang.o build/clang.o build/outasm.o build/assemble_ir.o build/optimize_ir.o build/inlineasm.o build/compress_ir.o build/outcpp.o build/cppfunc.o build/outgas.o build/cppexpr.o build/cppbuiltin.o build/directive.o build/expand.o build/mbchar.o build/mcpp_eval.o build/mcpp_main.o build/mcpp_system.o build/mcpp_support.o build/version.o build/spin.tab.o build/basic.tab.o build/cgram.tab.o -lm
mkdir -p bin
cp spin2cpp/build/fastspin bin/fastspin
mkdir -p board
cp loadp2/board/P2ES_flashloader.spin2 board/P2ES_flashloader.spin2
bin/fastspin -2 -o board/P2ES_flashloader.bin board/P2ES_flashloader.spin2
Propeller Spin/PASM Compiler 'FastSpin' (c) 2011-2020 Total Spectrum Software Inc.
Version 4.2.0 Compiled on: May 28 2020
P2ES_flashloader.spin2
P2ES_flashloader.spin2
Done.
Program size is 32800 bytes
mkdir -p board
cp -r loadp2/board/sdcard board
(make -C board/sdcard P2CC="pwd
/bin/fastspin -2 -Ipwd
/spin2cpp/include")
/Users/altergator/source/flexgui/bin/fastspin -2 -I/Users/altergator/source/flexgui/spin2cpp/include -o sdboot.binary sdboot.c ff.c sdmm.c
Propeller Spin/PASM Compiler 'FastSpin' (c) 2011-2020 Total Spectrum Software Inc.
Version 4.2.0 Compiled on: May 28 2020
sdboot.c
ff.c
sdmm.c
posixio.c
fputs.c
bufio.c
fmt.c
errno.c
posixio.c
bufio.c
errno.c
gc:73: error: Unknown symbol clkmode
/Users/altergator/source/flexgui/board/sdcard/sdmm.c:579: error: unknown identifier _pinf used in function call
/Users/altergator/source/flexgui/board/sdcard/sdmm.c:579: error: Unknown symbol _pinf
make[1]: *** [sdboot.binary] Error 1
make: *** [board/sdcard/sdboot.binary] Error 2
The P1 loader does not explicitly enable ANSI mode for its console, so it relies on the default system setting (which tends to be "off'").
The Configure Commands dialog, called "Executable Paths," is missing %L description.
After doing a Find text operation, the text that gets highlighted in yellow, remains highlighted no matter what is done to move the cursor, try to select that or other text for editing, etc...
I think this also happens when a compiler error is found and the line of text in error is highlighted.
The highlight should be removed once the user does one of a number of different actions:
When enabling debug I get this error:
"/home/pi/Downloads/flexprop/bin/flexspin" -2 -l -D_BAUD=230400 -O1 -g -I "/home/pi/Downloads/flexprop/include" "/home/pi/Documents/encoder_test_program.spin2"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2021 Total Spectrum Software Inc.
Version 5.0.8 Compiled on: Jan 23 2021
Unable to open file `libsys/fmt.c': No such file or directory
encoder_test_program.spin2
child process exited abnormally
Finished at Sat Jan 23 14:37:33 2021
Is there a package that has to be installed that provides that file?
When relaunching flexgui ($ wish flexgui.tcl) on macOS, any library directories that were previously added via the "Library directories..." menu option, are no longer available. The user is required to re-add those directories for each launch of flexgui. Could those directories be stored as well as changes made in the Configure Commands dialog? Should the flexgui directory contain a .config file of user mods and adds?
I'm not sure if this is the case for other OS's, since macOS is my normal config...
This is the first Github issue I've ever opened, so please be a little lenient with me if I'm missing any details. I'm running the latest version of flexprop as of this writing, and for work I have almost all of my code inside a microsoft onedrive folder. I've found that FlexProp can open these files just fine, and can even compile them, but for whatever reason it cannot compile and run them on the P2--this is the error message I get when I try to do that (with personal info omitted)
C:/Users/userName/Desktop/OneDrive - companyName: No such file or directory
Could not open C:/Users/userName/Desktop/OneDrive - companyName
Press enter to continue...
The actual code is a few folders in, but I THINK I know what the issue is. My onedrive folder is named (and I can't change it, because Microsoft) "OneDrive - Company Name, Inc", and given the error message, it seems flexprop really doesn't like the comma. (In windows you can't even put a comma in a folder name, so this is definitely an extremely rare edge case. hopefully, it isn't too hard to patch).
Hi Eric,
I noticed that some of the documentation files such as readme.md and help.txt mention "FlexPropGUI" as well as "FlexProp". There are also some places in the documentation where files are misnamed (e.g. they mention flexpropgui.zip instead of flexprop.zip).
The code appears to use "FlexProp" everywhere so probably the documentation needs to be updated to use "FlexProp" only, not "FlexPropGUI".
If you're interested, I can submit a Pull Request :-).
Thanks!
===Jac
on macOS...
After compiling, uploading, running P2 binaries, via PropLoader/WiFi, when I quit the terminal (Control-]), I noticed that a proploader process is still running. In fact, all previous proploader processes are still running. This showed up as my MacBook Pro fan running hard. I used macOS's Activity Monitor to see about 6 proploader processes taking up quite a lot of my CPU time. I had to force-quit the processes to get my fan to spin-down.
I noticed that this was during use of flexprop's new internal terminal option!
Is there a possibility that proploader processes are not being unloaded at the end of a terminal session.
In the flexgui editor: The Cut menu and Command-X features are disabled when selecting text within the listing window, which is as intended. But, the menu shows Cut as 'enabled'. The attached image shows how a typical application (Safari on macOS) disables the Cut menu when un-editable text is selected.
For testing a P2D2 board I downloaded flexprop 5.0.8 on my windows (work) laptop. Closing the app is not working and shows the below error message
Note that the app is started from C: drive (C:\Users<user>\Downloads\flexprop) and that no changes have been made after extraction
Only way to quit is to end the task through the task manager.
There are currently 2 versions of loadp2 sources... One in this repository and one in Dave Hein's p2gcc repository (https://github.com/davehein/p2gcc). Can the spin2gui repository include loadp2 sources as a sub-module to ensure both are kept in sync? There's a lot going on in P2 development at this time and keeping these as a single source could help Parallax forum users as they develop new tools.
Requirement: May need to have Dave Hein create a separate loadp2 repository from the p2gcc source repository.
When trying to "Compile and Flash" in flexprop, while using the "-SINGLE" upload mode (required at this time with Cluso's RetroBlade2 board), loadp2 fails to find the binary file...
Compiler/Loader output from flexprop (with the -SINGLE option):
$ /Users/altergator/flexprop/bin/loadp2 -p /dev/cu.usbserial-P6mhwic9 -b230400 @0=/Users/altergator/flexprop/board/P2ES_flashloader.bin,@8000+/Users/altergator/Documents/P2ESCode/StingrayP2/stingrayController.binary -T -k -SINGLE; osascript -e 'tell application "Wish" to activate'; exit 0
@0=/Users/altergator/flexprop/board/P2ES_flashloader.bin,@8000+/Users/altergator/Documents/P2ESCode/StingrayP2/stingrayController.binary: No such file or directory
Press enter to continue...
Compiler/Loader output from flexprop (removed -SINGLE option):
$ /Users/altergator/flexprop/bin/loadp2 -p /dev/cu.usbserial-P6mhwic9 -b230400 @0=/Users/altergator/flexprop/board/P2ES_flashloader.bin,@8000+/Users/altergator/Documents/P2ESCode/StingrayP2/stingrayController.binary -T -k; osascript -e 'tell application "Wish" to activate'; exit 0
( Entering terminal mode. Press Ctrl-] to exit. )
P2-ES Flash Programmer
Erasing flash...
Programming...
Done
Saving session...completed.
Running the same commands on the command line result in the same issue... Seems to be a loadp2 problem, unless the -SINGLE mode is reserved for RAM uploads only.
A flexgui feature request...
Currently... When the Find text dialog appears, after a previous attempt to find some other text, the cursor is placed in front of the previous text. The user then has to move the cursor to the far end of that text in order to delete it and type in new search text. This forces the user to use a mouse, trackpad or touch of the screen to place the cursor to the end of the field.
It would be better to have the cursor placed at the end of any previous search text to allow the user to quickly delete and replace that text! There would be no need to remove the user’s hand from the keyboard to move the cursor. Saves a step in the “find” process!
When trying to build from source the build fails with
In file included from frontends/lexer.c:35:
./build/basic.tab.h:53:5: error: redeclaration of enumerator ‘YYEMPTY’
53 | YYEMPTY = -2,
| ^~~~~~~
In file included from frontends/lexer.c:31:
./build/spin.tab.h:53:5: note: previous definition of ‘YYEMPTY’ was here
53 | YYEMPTY = -2,
| ^~~~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:54:5: error: redeclaration of enumerator ‘YYEOF’
54 | YYEOF = 0, /* "end of file" */
| ^~~~~
In file included from frontends/lexer.c:31:
./build/spin.tab.h:54:5: note: previous definition of ‘YYEOF’ was here
54 | YYEOF = 0, /* "end of file" */
| ^~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:55:5: error: redeclaration of enumerator ‘YYerror’
55 | YYerror = 256, /* error */
| ^~~~~~~
In file included from frontends/lexer.c:31:
./build/spin.tab.h:55:5: note: previous definition of ‘YYerror’ was here
55 | YYerror = 256, /* error */
| ^~~~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:56:5: error: redeclaration of enumerator ‘YYUNDEF’
56 | YYUNDEF = 257, /* "invalid token" */
| ^~~~~~~
In file included from frontends/lexer.c:31:
./build/spin.tab.h:56:5: note: previous definition of ‘YYUNDEF’ was here
56 | YYUNDEF = 257, /* "invalid token" */
| ^~~~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:187:28: error: conflicting types for ‘yytoken_kind_t’
187 | typedef enum yytokentype yytoken_kind_t;
| ^~~~~~~~~~~~~~
In file included from frontends/lexer.c:31:
./build/spin.tab.h:186:28: note: previous declaration of ‘yytoken_kind_t’ was here
186 | typedef enum yytokentype yytoken_kind_t;
| ^~~~~~~~~~~~~~
In file included from frontends/lexer.c:39:
./build/cgram.tab.h:53:5: error: redeclaration of enumerator ‘YYEMPTY’
53 | YYEMPTY = -2,
| ^~~~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:53:5: note: previous definition of ‘YYEMPTY’ was here
53 | YYEMPTY = -2,
| ^~~~~~~
In file included from frontends/lexer.c:39:
./build/cgram.tab.h:54:5: error: redeclaration of enumerator ‘YYEOF’
54 | YYEOF = 0, /* "end of file" */
| ^~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:54:5: note: previous definition of ‘YYEOF’ was here
54 | YYEOF = 0, /* "end of file" */
| ^~~~~
In file included from frontends/lexer.c:39:
./build/cgram.tab.h:55:5: error: redeclaration of enumerator ‘YYerror’
55 | YYerror = 256, /* error */
| ^~~~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:55:5: note: previous definition of ‘YYerror’ was here
55 | YYerror = 256, /* error */
| ^~~~~~~
In file included from frontends/lexer.c:39:
./build/cgram.tab.h:56:5: error: redeclaration of enumerator ‘YYUNDEF’
56 | YYUNDEF = 257, /* "invalid token" */
| ^~~~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:56:5: note: previous definition of ‘YYUNDEF’ was here
56 | YYUNDEF = 257, /* "invalid token" */
| ^~~~~~~
In file included from frontends/lexer.c:39:
./build/cgram.tab.h:164:28: error: conflicting types for ‘yytoken_kind_t’
164 | typedef enum yytokentype yytoken_kind_t;
| ^~~~~~~~~~~~~~
In file included from frontends/lexer.c:35:
./build/basic.tab.h:187:28: note: previous declaration of ‘yytoken_kind_t’ was here
187 | typedef enum yytokentype yytoken_kind_t;
I installed bison 3.5.1 and the issue was gone.
Compile & Run bombed for a file in a directory with a space with the error: "too many files specified on command line"
Looking at the output the problem is obvious:
/Users/bart/Code/Prop2/Others/flexgui/bin/loadp2.mac -b230400 /Users/bart/Code/Prop2/Others/propeller/resources/FPGA Examples/NTSC_256_x_192.binary -9/Users/bart/Code/Prop2/Others/propeller/resources/FPGA Examples -k; osascript -e 'tell application "Wish" to activate'; exit 0
The directory is "FPGA Examples", so that looks like two files to load2p
. I think just wrapping each arg for each external program invocation with single-quotes would solve most cases (files/directories that themselves contain single-quotes being the corner case).
flexprop version: 5.9.4-beta...
terminating terminal mode on macOS results in an exec error message... Appears to expect flexprop.mac as an application!
$ /Users/altergator/flexprop//bin/loadp2 -p /dev/cu.usbserial-A601RZ6G -b230400 /Users/altergator/Documents/P2ESCode/CALLD-Example/calld.binary -9/Users/altergator/Documents/P2ESCode/CALLD-Example -k -T -SINGLE; osascript -e 'tell application "flexprop.mac" to activate'; exit 0
( Entering terminal mode. Press Ctrl-] or Ctrl-Z to exit. )
35:43: execution error: Can’t get application "flexprop.mac". (-1728)
Saving session...completed.
When Find and/or Replace commands are executed more than once, the previously searched-for text is NOT selected/highlighted when the Find/Replace window is displayed. If the user needs to replace the search-text with new search criteria, they must click and drag (or even worse, type the 'delete-key' repetitively) to remove the previous search-text. If the previous search-text was already selected/highlighted, the user could just start typing new criteria or type the 'delete-key' once to remove old text.
I tested the following change to gui.tcl and it appears to work. I'm not sure if this is a total fix because of my own lack of tcl experience, so buyer-beware.
$ diff -c gui.tcl gui.tcl.ORIG
*** gui.tcl 2021-02-01 08:35:34.000000000 -0800
--- gui.tcl.ORIG 2021-02-01 08:32:05.000000000 -0800
*** 2023,2034 ****
grid columnconfigure $w 1 -weight 1
$t tag config hilite -background yellow
focus $w.f
$w.f selection range 0 end
$w.f selection range 0 end
When editing in most editors on modern operating systems (macOS. Linux, WIN10) a triple click in a text edit field or editable text window will select the entire line of text. This really helps when editing and wanting to replace a line of text or remove it, quickly. I often find myself triple-clicking in flexprop only to realize that I did not get a fully selected line and my editing needs to stop and retrace what I meant to happen :-)
There is tcl library code within the flexprop sources that does handle triple clicks:
./tcl_library/tk8.7/text.tcl
./tcl_library/tk8.7/ttk/entry.tcl
./tcl_library/tk8.7/entry.tcl
Compilation under Ubuntu 20.10 fails with the following errors:
/usr/bin/ld: build/common.o:/home/marco/git/flexprop/spin2cpp/frontends/common.c:40: multiple definition of allparse'; /tmp/ccauqf0s.o:/home/marco/git/flexprop/spin2cpp/spin2cpp.c:38: first defined here /usr/bin/ld: build/common.o:/home/marco/git/flexprop/spin2cpp/frontends/common.c:88: multiple definition of
gl_progname'; /tmp/ccKTEd6u.o:/home/marco/git/flexprop/spin2cpp/cmdline.c:39: first defined here
The attached simple patch defines the duplicated variables as extern and seems to fix the problem, but maybe a better definition fix should be more appropriate.
When I clicked on the ZIP file on the Release 5.9.10 page, Chrome for Windows showed an error message "flexprop5.9.10.zip is not commonly downloaded and may be dangerous". I had to click the "Keep" option in the popup button to make it download the zip file (which I then proceeded to use for building the installer, as I always do when there's a new release).
I don't know if this is just a problem on my PC, and I don't know if this has anything to do with the firewall issue that was reported earlier this week. but I thought I'd mention it.
If I'm not mistaken, Chrome doesn't normally show the "Keep" button. The default setting is to deny the download; you have to make a change to the Chrome security and privacy settings to allow it show the override button.
The picture shows the bottom corner of the Chrome browser window. It changed the file name when I took the screenshot, because I already had it downloaded before.
===Jac
I ran make install
without installing all of the dependencies and src/version.tcl
ended up empty, which caused flexprop to fail with Error in startup script: can't read "spin2gui_version": no such variable
. To fix this I installed the missing package and then ran make clean
and then make install
again but since src/version.tcl
wasn't removed make thought it was still up to date and didn't try to regenerate it. Deleting src/version.tcl
and running make install
with the proper dependencies installed worked.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.