Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 14:37 29 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite/PicoMiteVGA V5.07.04 betas

     Page 1 of 7    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 12:48pm 01 Feb 2022
Copy link to clipboard 
Print this post

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Fixes bug in datetime$
fixes bug in play wav command skipping a small amount of output at the beginning of playing
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 382
Posted: 01:08pm 01 Feb 2022
Copy link to clipboard 
Print this post

Thank you a lot wav playback problem is solved! I am so happy :)

Greetings
Daniel
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 06:58am 06 Feb 2022
Copy link to clipboard 
Print this post

Peter
v5.07.04b1 source code - arm-none-eabi-gcc v10.3:
I am currently trying to compile your code on a RaspberryPi.
In FileIO.c line 1108, you have char buf[PATH_MAX];
However PATH_MAX define is nowhere to be found!
Could you please advise.
Best Regards
led
PS
Temporarily, I've thrown in #define PATH_MAX=192 in FileIO.h,
(file size set at 63 chars?) the code compiles perfectly..THANKS!
Slightly smaller uf2 file, hope no introduced bugs with gcc v10.3
Miss you George
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 08:17am 06 Feb 2022
Copy link to clipboard 
Print this post

  Quote  In FileIO.c line 1108, you have char buf[PATH_MAX];
However PATH_MAX define is nowhere to be found!


PATH_MAX should be defined in <sys/stat> but this seems to be a strange header and the code you reference doesn't work at all on the Windows build as <sys/stat> contains something completely different
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 10:00am 06 Feb 2022
Copy link to clipboard 
Print this post

Peter
Do not understand your last response, but assume something more is forthcoming.

Just noticed this on v5.07.04b1 (also on v5.07.03)

Keyboard buffer problem(s):
1. At the prompt type "option list"<ENTER>
2. Hit <UP_ARROW> key
3. Prompt now shows "Option lis" with cursor positioned on deleted 't' character
...
4. Steps 1-3 above
5. Hit <BACKSPACE> key
6. Entire line moves one char closer to '>' prompt (removes the <SPACE> char).
7. Any further <BACKSPACE> correctly removes chars in the keyboard buffer
8. Complete the original line "option list" (already with one <SPACE> to left)
9. Command accepted ok.
led
edit: minor correction
Edited 2022-02-06 20:03 by led-bloon
Miss you George
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 10:16am 06 Feb 2022
Copy link to clipboard 
Print this post

  Quote  Do not understand your last response, but assume something more is forthcoming.


It's not. PATH_MAX should be defined in sys/stat.h

  Quote  Keyboard buffer problem(s):


Which version? your build or mine? Works perfectly on my VGA build and on 5.07.03 with an SSD1963
Edited 2022-02-06 20:25 by matherp
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 10:34am 06 Feb 2022
Copy link to clipboard 
Print this post

Peter
Will go and look for <sys/stat.h> (to complete my setup)
The keyboard errors I am experiencing are with my compile of
v5.07.04b1 and your v5.07.03.uf2.
I am using minicom  so that may be the problem, however I have
not noticed it before.  Maybe I wasn't looking for it.
Thankyou
led
Edited 2022-02-06 20:35 by led-bloon
Miss you George
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 10:40am 06 Feb 2022
Copy link to clipboard 
Print this post

led-bloon

Please don't post "errors" seen in your own builds unless you can replicate with my released versions. I can't, won't and will never support any build other than my own. Nor will I ever support anyone setting up and building my code as it is completely unrealistic to support toolchains other than the one I use. Sorry
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3845
Posted: 11:31am 06 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  Please don't post "errors" seen in your own builds unless you can replicate with my released versions ...


thwill approaches the field with trepadation, donning his hard-hat and flame-proof underwear .

Peter, where exactly should @led-bloon post questions that arise where he is trying to build the public PicoMite source then ?

The mistake (if any) is not posting such questions on TBS, but in addressing questions directly to you, posting in your "official release" threads, or expecting you to respond - though you've somewhat made that bed for yourself as (through effort if not intention) you are the high-priest of the recent generation of 'mites and the most prolific participant on TBS.

What you've provided for us all is a gift, I personally am sorry it also comes as a burden to you.

With respect to PATH_MAX I'm a bit suprised that the PicoMite has any dependency on this at all since it's specific to the O/S file-system and the PicoMite is neither running Windows or Linux/Raspbian, I think it should really be a constant in the PicoMite source code and/or coming from "ffconf.h", though I'm not seeing anything there.

@led-bloon, should you want to use them (a mistake I think) then the standard Linux versions are in:

#include <linux/limits.h> // 4096


or,

#define _POSIX_C_SOURCE 1
#include <limits.h> // 256


With some debate about whether that length includes the byte for the trailing '/0' or not.

Best wishes,

Tom
Edited 2022-02-06 21:40 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 12:51pm 06 Feb 2022
Copy link to clipboard 
Print this post

  Quote  Peter, where exactly should @led-bloon post questions that arise where he is trying to build the public PicoMite source then ?

In a separate thread. But how anyone is supposed to help I'm not sure
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3845
Posted: 01:14pm 06 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  In a separate thread. But how anyone is supposed to help I'm not sure


They setup a Raspberry Pi tool-chain of their own and download led-bloon's fork (assuming it exists) and start trying to help. Now there may be nobody who is going to do this (I'm afraid I'm not, too much else on my plate), but that isn't your problem, it's led-bloon's.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 02:08pm 06 Feb 2022
Copy link to clipboard 
Print this post

hi Led,
   once you have a build environment set up, i'd be interested in duplicating it on a linux machine.

as for finding out the value that happens (randomly?) to be used for PATH_MAX, the simplest solution is to identify where you can cause it to be exceeded in an MMbasic program. ie, it may specify the maximum length of the string passed to a particular MMbasic command; exercise that command with different lengths of string passed in, and see at what length an error is generated by MMbasic.

given that MMbasic strings are limited to 255 characters, it is unlikely that any useful value of PATH_MAX is going to exceed 255. or possibly 510 if a path and filename can be concatenated internally.


cheers,
rob   :-)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 03:43pm 06 Feb 2022
Copy link to clipboard 
Print this post

I built it without problem on Linux using the pico SDK etc

Didn't have issues with PATH_MAX (though I think it's not ANSI C, not that it has to be).

Maybe resort to the likes of
#ifndef PATH_MAX
#define PATH_MAX 256
#endif

but I'm puzzled why it worked for me yet not for someone else.

John
Edited 2022-02-07 01:45 by JohnS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3532
Posted: 08:37pm 06 Feb 2022
Copy link to clipboard 
Print this post

Are there any strange characters in your path? Doeet the path contain multiple branches? Print it to a file an view in a hex editor.
PicomiteVGA PETSCII ROBOTS
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 202
Posted: 09:45pm 06 Feb 2022
Copy link to clipboard 
Print this post

  Quote  Please don't post "errors" seen in your own builds unless you can replicate
with my released versions.

As is CLEARLY stated in my last post, I had the same problem in MY build
of v5.07.04b1 AND your v5.07.03.uf2 file on the same piece of hardware
(I purposefully tried checking it was not my build in the first instance!).
However, since you confirmed that there is no bug, I accepted that it was
something funny going on in my setup. Matter closed (with thanks).

@thwill - there will be no fork - just amusing myself and seeing if it can be done
@robert.rozee - JohnS to the rescue
@JohnS  - As Peter has stated - everything depends on your tool-chain .. period!
Gotta love this forum and the people here
Have a great day everyone
led
Miss you George
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 10:12pm 06 Feb 2022
Copy link to clipboard 
Print this post

  led-bloon said  @JohnS  - As Peter has stated - everything depends on your tool-chain .. period!

I can dig out details if you wish.

John
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 09:56am 07 Feb 2022
Copy link to clipboard 
Print this post

what worries me a little, is where does PATH_MAX get picked up from on Peter's builds? and equally importantly, on other folk's builds.

the picomite version of MMbasic uses FatFs (by ChaN) according to the credits. yet nowhere in the source tree of the MMbasic source code (including FatFs) is PATH_MAX defined. i would expect PATH_MAX to have been defined within or somewhere close by to FatFs.

if (as seems the only alternative) the value is being picked up somewhere outside of the MMbasic source tree, then this is just plain wrong. we are cross-compiling here, and PATH_MAX is in this scenario a constant specific to the target, not the host.

if a host has a value for PATH_MAX defined somewhere as 4k (for instance), and this value is used in compiling MMbasic, then the resulting interpreter binary, running on a RP2040, will be 4k short of the expected available RAM.

i also worry if there are other constants in a similar position to PATH_MAX, where the value picked up by the compiler is host specific, rather than target specific. is anyone in a position to (or know how to) run a check for this?


cheers,
rob   :-)
Edited 2022-02-07 19:57 by robert.rozee
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3845
Posted: 10:21am 07 Feb 2022
Copy link to clipboard 
Print this post

I believe I said much the same about 7 posts up .

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 10:29am 07 Feb 2022
Copy link to clipboard 
Print this post

God you lot are anally retentive

The relevant code is just a, cut and paste from wherever I found it, algorithm for tidying up silly path names e.g.

fred/bert/../eric = fred/eric

Set it to anything sensible. On my system it is 1024
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3845
Posted: 10:46am 07 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  God you lot are anally retentive


Isn't that practically the definition of an Engineer. You must have been in management / retired too long .

Presumably the opposite of "anally retentive" is too noisome to contemplate .

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
     Page 1 of 7    
Print this page
© JAQ Software 2024