@msrobots said:
I seem to have some problem alike this, but the other way around.
I need absolute JMPs inside COG ram and FlexSpin seems to code relative JMPs. Any way to force absolute JMPs (just JMP, CALL not needed) inside COG code out of a normal DAT section, not inline.
@ersmith Is it planned for the near future to implement the byte/word/long array DEBUG commands? They are very useful when dealing with buffers. Or the byte_array can also be used to reverse little-endian to big-endian longs.
@ersmith said:
I think they're already handled in -gbrk debugging. Doing them in plain -g debugging is a little hard, because in that version DEBUG gets translated into printf, and there's no printf format for printing arrays.
Unfortunatelly, I found out that I can't really use -gbrk debugging when Spin2 and C are combined in one project. The brk debugging of Spin2 seems to override printf output completely if it uses up too much of the available bandwith. Printf output is then supressed completely.
@ersmith Is it planned for the near future to implement the byte/word/long array DEBUG commands? They are very useful when dealing with buffers. Or the byte_array can also be used to reverse little-endian to big-endian longs.
@ersmith said:
I think they're already handled in -gbrk debugging. Doing them in plain -g debugging is a little hard, because in that version DEBUG gets translated into printf, and there's no printf format for printing arrays.
Unfortunatelly, I found out that I can't really use -gbrk debugging when Spin2 and C are combined in one project. The brk debugging of Spin2 seems to override printf output completely if it uses up too much of the available bandwith. Printf output is then supressed completely.
Do you have an example of that that you could share? Both printf and debug are using the same smartpin code, so I don't see why either would be able to override the other.
@ersmith You have to see this one to believe it. This hangs the compiler with an "out of memory" error after about 15 seconds:
dim i as ubyte
i = 10
print i
And this compiles fine:
dim x as ubyte
x = 10
print x
Here is the error:
"D:/Flex2Gui/flexgui/bin/flexspin" -2 -l --tabs=3 -D_BAUD=230400 -O0 --charset=utf8 -I "D:/Flex2Gui/flexgui/include" "D:/Flex2Gui/flexgui/P2 Libs/compilercrashtest2.bas"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2023 Total Spectrum Software Inc. and contributors
Version 5.9.24 Compiled on: Jan 7 2023
FATAL ERROR: out of memory
compilercrashtest2.bas
fmt.c
vfs.c
child process exited abnormally
Finished at Sat Jan 21 16:47:50 2023
I have reinstalled Flex twice, rebooted the machine, etc. It's really bizarre! Did "i" get taken out of the lexicon?
EDIT: This behavior is the same between 5.9.24 and 5.9.26
@JRoark said:
@ersmith You have to see this one to believe it. This hangs the compiler with an "out of memory" error after about 15 seconds:
dim i as ubyte
i = 10
print i
And this compiles fine:
dim x as ubyte
x = 10
print x
Here is the error:
"D:/Flex2Gui/flexgui/bin/flexspin" -2 -l --tabs=3 -D_BAUD=230400 -O0 --charset=utf8 -I "D:/Flex2Gui/flexgui/include" "D:/Flex2Gui/flexgui/P2 Libs/compilercrashtest2.bas"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2023 Total Spectrum Software Inc. and contributors
Version 5.9.24 Compiled on: Jan 7 2023
FATAL ERROR: out of memory
compilercrashtest2.bas
fmt.c
vfs.c
child process exited abnormally
Finished at Sat Jan 21 16:47:50 2023
I have reinstalled Flex twice, rebooted the machine, etc. It's really bizarre! Did "i" get taken out of the lexicon?
EDIT: This behavior is the same between 5.9.24 and 5.9.26
Thanks, Jeff. This was a really strange bug, and is basically a conflict between the "i" variable at top level and an "i" in one of the library functions, due to a bug in how nested structures are implemented in C (which is used in that library) which only manifests when there is no optimization. It'll be fixed in the next release. In the meantime, you can avoid it by turning on any optimization at all, which in fact I would recommend since -O0 produces pretty terrible code.
Comments
JMP #\address
the\
forces absoluteAah, thank you @TonyB_
now my error makes more sense...
Mike
Unfortunatelly, I found out that I can't really use -gbrk debugging when Spin2 and C are combined in one project. The brk debugging of Spin2 seems to override printf output completely if it uses up too much of the available bandwith. Printf output is then supressed completely.
Do you have an example of that that you could share? Both printf and debug are using the same smartpin code, so I don't see why either would be able to override the other.
@ersmith You have to see this one to believe it. This hangs the compiler with an "out of memory" error after about 15 seconds:
And this compiles fine:
Here is the error:
I have reinstalled Flex twice, rebooted the machine, etc. It's really bizarre! Did "i" get taken out of the lexicon?
EDIT: This behavior is the same between 5.9.24 and 5.9.26
Thanks, Jeff. This was a really strange bug, and is basically a conflict between the "i" variable at top level and an "i" in one of the library functions, due to a bug in how nested structures are implemented in C (which is used in that library) which only manifests when there is no optimization. It'll be fixed in the next release. In the meantime, you can avoid it by turning on any optimization at all, which in fact I would recommend since -O0 produces pretty terrible code.