Comments (13)
As of ab41166 reading external flash seems to work correctly, but writing to it and erasing it does not. Unsetting memory mapped mode no longer causes a crash.
from rustworks.
Note that external flash is actually supposed to be read as 32 bit integers, not individual bytes. This is shown (working) in a3d80ab.
from rustworks.
One issue I noticed in external_flash.rs
is that you use self.qspi.cr.write
instead of modify
in send_command_full
, which will some settings to their reset value.
from rustworks.
Hmm, I tried using modify instead of write for cr
but now attempts to write memory cause the calculator to either crash or freeze (without reseting, so I am going to assume it is waiting for the abort).
from rustworks.
For reference, here are the changes I made:
self.qspi.cr.write(|w| w.abort().set_bit());
to
self.qspi.cr.modify(|_, w| w.abort().set_bit());
and then I also tried
self.qspi.cr.write(|r, w| unsafe { w.bits(r.bits()) }.abort().set_bit());
from rustworks.
Thanks to #8 all that is left is to create a bootloader that also allows flashing of the QPI external flash via tools such as probe-rs
and dfu-util
.
from rustworks.
There is a boot loader project called loadstone that looks interesting and is probably worth exploring...
EDIT:
Might be worth waiting for loadstone to directly use embedded-hal to make porting it to stm32f730 easier if the loadstone route is taken.
Will continue to explore alternative methods of using external flash for main program storage.
from rustworks.
Flash algo attempt (fixed by rfuest in nw-rs/flash-algo#1): https://github.com/willemml/rsworks-flash-algo
from rustworks.
Do you still have the issue?
I have worked on QSPI flash drivers, I can help if needed.
from rustworks.
Currently the only things left to do are to allow probe-run to use the flash also (so add a command line argument to take custom chip definition yaml, which needs to be done in the probe-run repo), add dfu support and a boot loader.
from rustworks.
@npc15 if you have any tips (or want to help with) creating a dfu bootloader (or even just a bootloader in general for the QSPI flash) it would be greatly appreciated, my current blocker is moving the code off of internal flash and onto QSPI (the end goal being to have the bare minimum on the internal flash).
from rustworks.
@npc15 if you have any tips (or want to help with) creating a dfu bootloader (or even just a bootloader in general for the QSPI flash) it would be greatly appreciated, my current blocker is moving the code off of internal flash and onto QSPI (the end goal being to have the bare minimum on the internal flash).
Ok sure,
will give you an update soon
from rustworks.
As of 5a52fe6 DFU flashing of external flash works, booting not yet implemented.
from rustworks.
Related Issues (10)
- dfu-util: File size is too big: Success HOT 1
- Matrix community? HOT 6
- Emulators? HOT 13
- Roadmap (or similar equivalent) HOT 2
- Unit tests
- ERROR - Task dfu not found HOT 4
- Use PTR constant instead of deprecated ptr() function on registers and peripherals HOT 2
- Remove alloc dependency HOT 1
- Better documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rustworks.