Flash size Problem 1MB

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Flash size Problem 1MB

Re: Flash size Problem 1MB

by Oli » Tue Dec 19, 2023 4:38 pm

One thing that I did wrong:
I only exchanged the IP in the browser, between different devices, also ESP32.
So update at least website, or new window.
This explains the thing with the green bar.

The connection to the browser is interrupted only by reboot from the ESP, I usually observe the serial, if possible

Ö, ü, ä, I will remove,

I don't know on a double comment:
'code 'explanation
I always try to comment a lot, after 5 years I don't know anything else :-)
And then I comment on a command with a comment ...

And right, I always used an external editor for copy past,
I think that has brought problems



I thank everyone again

I have now tested other 1MB, it has nothing to do with the flash size, it was a wrong way,
Although the error was different with different flash sizes.

I used Dout 40MHz,
But there were only "non ascii" problems

Now I get a little work to format all ".bas" accordingly,

Now I'm up to 1.48 and I hope that the ESP8266 project will not be quiet, some KB code still has space for the new version.

I have successfully soldered this flash w25q64fvssig , 20 pieces 8MB for € 6, are very compatible.
https://aliexpress.com/item/1005006131987936.html

Re: Flash size Problem 1MB

by cicciocb » Tue Dec 19, 2023 4:29 pm

I did a little investigation and, in fact, the problem is that oli is using an external editor that do not use the unicodes; in fact the character ü is inserted as character &hFC and this is not allowed.

A good test is simple to do :

Code: [Local Link Removed for Guests]

wlog chr$(&hfc)
and you'll see that the browser disconnect (the connection light becomes red).

BUT, inserting the same character using the browser in the editor page of Annex, the right unicode character is inserted so this works.

Code: [Local Link Removed for Guests]

wlog "ü" 
You can see that the character is, in reality composed of 2 bytes in that way :

Code: [Local Link Removed for Guests]

a$ = "ü"
wlog len(a$)

Conclusion : avoid to use "non ascii" characters but, if you really need, use an the annex code editor or an external text editor that handle the unicodes.

This is applicable to then ESP32 too

Re: Flash size Problem 1MB

by Fernando Perez » Tue Dec 19, 2023 1:51 pm

But have you tried doing what I say?
I don't understand why only the first character bothers and not the rest.

Re: Flash size Problem 1MB

by cicciocb » Tue Dec 19, 2023 1:19 pm

Just for your information, the "special" characters are handled as UNICODE and are composed of 2 bytes (or more).

For this reason, when they are transferred from / to the module can be considered as a binary content and rejected by the browser.

Re: Flash size Problem 1MB

by Fernando Perez » Tue Dec 19, 2023 11:59 am

Well the mystery is deeper.
I have tried it on an ESP-01, 1Mb, and the only accented character that seems to stop the recording process is the u with an umlaut in the first word gerdückt. (it is &HFC in hexadecimal)
Try deleting just that ü and the program will save and run normally.
And it is deeper because I think it only affects the first u that appears, because the one on line 11 does not seem to affect it.
https://mega.nz/file/2e5UzLzQ#DHyb4Kv8E ... JnF6SiH6bA

Re: Flash size Problem 1MB

by cicciocb » Tue Dec 19, 2023 11:34 am

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Tue Dec 19, 2023 10:37 am Tested the program with standard ESP01 with 8MB memory.
Pasted the code into the editor window.
It would not even save (or saveas).
It saves and runs ok if the comments with accented characters are removed.
The mystery seems to be solved then.

The problem comes from the accented characters present in the document.
This issue is not present on the ESP32 as, if I remember well, I did a fix to avoid this problem some time ago.

Re: Flash size Problem 1MB

by bugs » Tue Dec 19, 2023 10:37 am

Tested the program with standard ESP01 with 8MB memory.
Pasted the code into the editor window.
It would not even save (or saveas).
It saves and runs ok if the comments with accented characters are removed.

Code: [Local Link Removed for Guests]

'00=Taste  13=LEDbl   12=Relais-rt  
pin.mode 00, input   '
PIN.MODE 12, OUTPUT  'Relais rt LED 1=ein, 0=aus
PIN.MODE 13, OUTPUT  'bl LED        0=ein, 1=aus
'PIN.MODE 02, OUTPUT  '
'PIN.MODE 03, input   'RX
'PIN.MODE 01, OUTPUT  'TX
'PIN.MODE 15, input  '
'pin.mode 14, input  '
'pin.mode 16, input  '
'pin.mode 04, input  '
Anf:
'if PIN(14) = 0 then PIN(12) = 1 else PIN(12) = 0
PIN(13)  = PIN(00) 
PIN(12)  = PIN(00)
wlog PIN(12) ,  PIN(13)
pause 600
goto Anf
Version 1.47

Re: Flash size Problem 1MB

by cicciocb » Tue Dec 19, 2023 9:23 am

I see that there are disconnections between the module and the WEB browser; this can be caused by several reasons :
- The power supply of the module is too weak or not stable
- There are "non standard" character transferred between the module and the browser
- The module is too far from the WIFI router (signal too weak)
- The Flash memory inside the module is not supported

Oli, what is the module that you are using?
Could you give the details of what are you using?
How it is supplied? (I mean in terms of power supply)
Have you tried with a "standard" ESP8266 module like a wemos or ESP01 ?
Have you tried to remove the special "non standard" ASCII characters from your program?

I saw that there are several ü ö .....
Maybe these character are not well handled by the ESP8266

One interesting thing that you can do is to open the browser in "inspect mode" (right click on the window and select 'Inspect')
image.png
You'll have a debug page; look in the console tab and see if there are some error messages (In the picture below I voluntarily generated an error sending a bad character with wlog chr$(253) )

Try and let me know
image.png

Re: Flash size Problem 1MB

by Electroguard » Tue Dec 19, 2023 12:13 am

Hi Oli, the videos and your commentary are helpful.

I can only suggest what I might do in similar circumstances.
Always start the device in a new window, to ensure the Editor page is created with the correct javascript code (the same goes for all device pages).
Understandably it would probably cause errors if loading an esp8266 script into an esp32 Editor window or vice versa.

Open the File Manager to create a backup zip on computer of all files from the device, then unzip them on the computer to check that all files can be loaded into a computer text editor ok, with no signs of corruption.
It is especially important to check that the bottom of the scripts are still intact ... because if a file Save fails for any reason, it can leave a partial incomplete file of that name, which may cause errors when trying to load, and certainly when trying to run.
That is why I always end my scripts with:
'-------- End ------
which makes it obvious if the end of the script is missing.

Assuming that the files all look ok on the computer, I would either Format the device files system from Config page, or re-flash the device again.
Then I would upload each required file one at a time, checking that each loaded into the Editor ok.

If any file failed, I would rename it from File Manager to prevent trying to save to that same area of file space again, then try uploading the same file again - after re-checking it loaded and looked ok on computer again... cos clearly something was either wrong with that file, or the file space.

And from bitter experience I have found that after any sort of problem, it always pays to remove and replace device power to do a complete clean startup again, so everything is refreshed... cos the interpreter can sometimes 'get its nickers in a twist'.

If I find a file that is causing a problem, it could be completely commented out so that it is inactive, then try loading it again - if it then loads ok, parts of it can be selectively un-commented until either some faulty code is found, or the script is eventually complete.

Or any particular file which may be causing a problem can be redone by adding a few lines at a time to the Editor and re-Saving.
But remember that any Save error will corrupt the previous file of that name, so Save each edit with a different suffix, ie: file3a, then file3b next, etc.
Keep the last few saves, but remember to keep deleting earlier unwanted files to avoid using up all of the precious file space.


There are only a few possible causes to diagnose:
Faulty hardware - try a different device.
Faulty or corrupt firmware or file system - try re-flashing with an older version.
Faulty file - redo the file from minimum, making any necessary correction.
User impatience - allow time for each operation to fully complete before clicking the interpreter to do more (file operations can sometimes be slow).

Hope that helps to find the cause of the problem.

Re: Flash size Problem 1MB

by Oli » Mon Dec 18, 2023 10:46 pm

I try my best :-)

The problem does not occur with every file,
for some more often, but always with the sample,
I see an interference of code lengths and errors,
With certain file sizes, the error comes,
Smal works and bigger too,

I tested different browsers


Of course there are better controllers,
But please from the hardware perspective,
There are millions of devices on the market
I don't know any ESP32 device, just test boards.
https://templates.blakadder.com/plug.html
https://templates.blakadder.com/relay.html
And now Ali sells compatible ESP boards for all Tuya devices, for soldering

Top