- Posts: 1433
Devo12: Using parallel flash via USB (library)?
- rbe2012
- Topic Author
- Offline
- So much to do, so little time...
Less
More
05 Feb 2014 12:52 #19857
by rbe2012
Devo12: Using parallel flash via USB (library)? was created by rbe2012
I want to get rid of flashing the library in my Devo12 every time I change some minor settings... one way is replacing the SPI Flash what will be done next, the other is making the parallel flash accessible via USB.
First I tried to make it readable via USB - no problems.
Then I tried to make it writable in the firmware - no real problems.
Third I had to erase sectors - and this is where my problem starts.
The used parallel flash chip (S29GL128P) has a sector size of 128kB. This means that I can only erase areas of this size.
The file system which is installed via the library uses a sector size of 4kB which is good to handle. But deviation does only read - it never erases something so it has not to care for the physical sector size.
We only have (limited) FAT support in deviation. So the only chance to make the file system writable via USB is to create a file system which has a sector size of 128kB. Deviation should be able to read this.
And if Windows would recognize such a file system we could read and write files to the parallel flash (limited to ~120 files due to the big sector size, but enough for media-, template and language folder and errors.txt, datalog.bin).
I have used utils/mkfat/mkfat.py to create a file system with 128kB clusters (and 4kB sectors) and it seems to work in the tx (although some weird screen behavior which I haven't investigated - most probably due to missing files in the library), but Windows (Vista) does not recognize it and even my favorite tool for examining storage devices (the freeware HxD) does not load it.
So does anybody have other ideas of making the parallel device accessible? I am at my limits...
If interested I can describe what I have done so far, but since it does not work really I won't do that in advance.
First I tried to make it readable via USB - no problems.
Then I tried to make it writable in the firmware - no real problems.
Third I had to erase sectors - and this is where my problem starts.
The used parallel flash chip (S29GL128P) has a sector size of 128kB. This means that I can only erase areas of this size.
The file system which is installed via the library uses a sector size of 4kB which is good to handle. But deviation does only read - it never erases something so it has not to care for the physical sector size.
We only have (limited) FAT support in deviation. So the only chance to make the file system writable via USB is to create a file system which has a sector size of 128kB. Deviation should be able to read this.
And if Windows would recognize such a file system we could read and write files to the parallel flash (limited to ~120 files due to the big sector size, but enough for media-, template and language folder and errors.txt, datalog.bin).
I have used utils/mkfat/mkfat.py to create a file system with 128kB clusters (and 4kB sectors) and it seems to work in the tx (although some weird screen behavior which I haven't investigated - most probably due to missing files in the library), but Windows (Vista) does not recognize it and even my favorite tool for examining storage devices (the freeware HxD) does not load it.
So does anybody have other ideas of making the parallel device accessible? I am at my limits...
If interested I can describe what I have done so far, but since it does not work really I won't do that in advance.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
Less
More
- Posts: 4402
05 Feb 2014 16:27 - 05 Feb 2014 16:27 #19878
by PhracturedBlue
Replied by PhracturedBlue on topic Devo12: Using parallel flash via USB (library)?
There are 2 options I've explored:
Adding a wear-leveling layer. that would allow us to keep the 4kb sectors and still do read/write. I have one for Deviation, but it is incredibly slow. I had planned to put the lookup table in RAM which would greatly increase performance, but I never finished working on it.
Use the java dfu program I wrote. When I stopped working on it, I was implementing internal filesystem support which would end up with an explorer-like window that you could copy files to, as well as opening in an editor, deleting, etc. It would also support just taking the zip file produced by 'make zip' and install it for you. A lot of coding is still necessary to get there though.
Adding a wear-leveling layer. that would allow us to keep the 4kb sectors and still do read/write. I have one for Deviation, but it is incredibly slow. I had planned to put the lookup table in RAM which would greatly increase performance, but I never finished working on it.
Use the java dfu program I wrote. When I stopped working on it, I was implementing internal filesystem support which would end up with an explorer-like window that you could copy files to, as well as opening in an editor, deleting, etc. It would also support just taking the zip file produced by 'make zip' and install it for you. A lot of coding is still necessary to get there though.
Last edit: 05 Feb 2014 16:27 by PhracturedBlue.
Please Log in or Create an account to join the conversation.
- rbe2012
- Topic Author
- Offline
- So much to do, so little time...
Less
More
- Posts: 1433
05 Feb 2014 20:46 #19890
by rbe2012
Replied by rbe2012 on topic Devo12: Using parallel flash via USB (library)?
The second sounds good, but is far beyond my coding skills.
Maybe the easiest way is to replace the SPI flash (25VF032B80-4L-S2 for 1.80€), - cutting off the pins, desoldering them one by one and soldering a bigger one could be an easy solution at least for all who are able to mod the tx with rf modules.
Can you imagine that this will be supported by deviation? Like "size(SPI)==2MB ? {mount parallel flash and search media folder there} : {get everything from SPI}"? I wanted a method to get rid off the library flashing which has a chance to get into the mainstream code...
Maybe the easiest way is to replace the SPI flash (25VF032B80-4L-S2 for 1.80€), - cutting off the pins, desoldering them one by one and soldering a bigger one could be an easy solution at least for all who are able to mod the tx with rf modules.
Can you imagine that this will be supported by deviation? Like "size(SPI)==2MB ? {mount parallel flash and search media folder there} : {get everything from SPI}"? I wanted a method to get rid off the library flashing which has a chance to get into the mainstream code...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
Less
More
- Posts: 4402
05 Feb 2014 21:29 #19897
by PhracturedBlue
Replied by PhracturedBlue on topic Devo12: Using parallel flash via USB (library)?
sure, on the devo12, supporting a single large flash would be easy Having it accessible from hardware.ini is likely not too hard either, but I am not confident there are enough customers to be worth supporting it. As long as the flash chip uses the SST instruction set and a 4kB page size, it should work. The 32Mbit SST chip would certainly work. I think the 64Mbit would as well though it is untested.
I dunno how big our images are on the devo12, but I guess the largest is ~307kB so the 32Mbit chip is likely fine.
But this problem will basically go away if I ever finish the Java app, which leads me to prefer that solution over a hardware hack. I also don't change the 'media' folder very often, so you don't normally need to re-upload the lib on upgrading the firmware.
I dunno how big our images are on the devo12, but I guess the largest is ~307kB so the 32Mbit chip is likely fine.
But this problem will basically go away if I ever finish the Java app, which leads me to prefer that solution over a hardware hack. I also don't change the 'media' folder very often, so you don't normally need to re-upload the lib on upgrading the firmware.
Please Log in or Create an account to join the conversation.
- rbe2012
- Topic Author
- Offline
- So much to do, so little time...
Less
More
- Posts: 1433
06 Feb 2014 10:56 #19929
by rbe2012
Replied by rbe2012 on topic Devo12: Using parallel flash via USB (library)?
You're right in all points.
I also believe the 32Mbit chip will work since it has the same internal structure and command set. The 64Mbit chip only seems to be available in bigger packages (TSOP-20 or something like this).
I actually don't know how big my images are but the media folder contains about 1.5MB which will easily fit into the 2MB additional SPI flash.
For me it is ok to flash the library - I have changed files inside maybe 5 times... but others are developing new themes and might have more headache with that (but they will use the emulator instead).
The Java app sounds really good. Aren't here some Java specialists who could support you?
I also believe the 32Mbit chip will work since it has the same internal structure and command set. The 64Mbit chip only seems to be available in bigger packages (TSOP-20 or something like this).
I actually don't know how big my images are but the media folder contains about 1.5MB which will easily fit into the 2MB additional SPI flash.
For me it is ok to flash the library - I have changed files inside maybe 5 times... but others are developing new themes and might have more headache with that (but they will use the emulator instead).
The Java app sounds really good. Aren't here some Java specialists who could support you?
Please Log in or Create an account to join the conversation.
Time to create page: 0.036 seconds
- Home
- Forum
- Development
- Development
- Devo12: Using parallel flash via USB (library)?