Chat freely about anything...

User avatar
By Mmiscool
#28886 This is very nice. I am glad to see that basic is not a dead language and other people have been thinking about it.

Just to clarify this a compiler. The project I am working on is an interpreter.
User avatar
By dkinzer
#28888
pvvx wrote:How to find out the available disk space to save the maximum file?
I am not sure what you are asking. Can you explain in more detail what you are wanting to know?
pvvx wrote:ZBasic built-in programmer not check types of Flash on modules ESP8266?
That is correct. The default is 512KB of Flash. If you have a 2MB Flash you can use the compiler directive shown below near the beginning of the main .bas file as described in the manual.
Code: Select allOption DeviceParameter FlashSize "2M"
Last edited by dkinzer on Sat Sep 12, 2015 10:29 am, edited 1 time in total.
User avatar
By pvvx
#28897
dkinzer wrote:
pvvx wrote:How to find out the available disk space to save the maximum file?
I am not sure what you are asking. Can you explain in more detail what you are wanting to know?

1) How to get free space Spiffs to save the file?
Example: The user sends a file/data by TCP. How to send in advance the maximum length of the receive data to record them on Spiffs?
2) What is the speed of writing data to the disk when SPIFFS 8MB of free space to 20%? Less than 1 KB / s? Opening a file more than a few seconds? :D Throw this Spiffs. SPIFFS = gruesome file system
PS: Standard recording speed flash (+ erase) on ESP8266 = 160...200 kilobytes per second. (WiFi - > HTTP -> Content-Type:multipart/form-data) https://www.youtube.com/watch?v=TOnhBxb8wsQ :!:
dkinzer wrote:
pvvx wrote:ZBasic built-in programmer not check types of Flash on modules ESP8266?
That is correct. The default is 512KB of Flash. If you have a 2MB Flash you can use the compiler directive shown below near the beginning of the main .bas file as described in the manual.
Code: Select allOption FlashSize "2M"

Which option for W25Q128FV Flash? Option FlashSize "16M" ?
User avatar
By dkinzer
#28913
pvvx wrote:How to find out the available disk space to save the maximum file?
There is no ZBasic System Library routine to get the SPIFFS free space. That is a good thing to add.

It is possible to add C code to a ZBasic app so one could add functionality as needed. However, the SPIFFS control structure currently isn't public - another good idea to add.

pvvx wrote:SPIFFS = gruesome file system
If you have a better one, you can add it to your ZBasic app and use it in place of SPIFFS. You would need to define your own interface to it but you can make external functions available to ZBasic by importing the definitions. This advanced topic is discussed in section 6.8 of the ZBasic Language Reference.

pvvx wrote:Which option for W25Q128FV Flash?
I misstated the option to specify the Flash size, it is actually "Option DeviceParameter FlashSize" and for the Flash chip you referred to it would be
Code: Select allOption DeviceParameter FlashSize "16M"

Other compiler directives are explained in the manuals.