Comments (2)
Reason I found it was that I'd swapped use of #ifdef FLASH_CONTENT (which is a structure) for FLASH_STORAGE (which is the actual controlling define?) in main, but not both entries, and initflash was not called.
This lead to the flash not being intialised, and so the data being empty every start - and that lead me to investigate flash. I found the non-inialisation fault, but then found that the flash values did not survive reboot.
I enabled 'DEBUG_SOFTWARE_SERIAL' which enables console logs after 'Ec\n' on ascii....
The flash writer was running, and incrementing the pointer, and the address was in the 0x8000xxxx range...
but this warning could be the key:
'Warning! Cannot find a linker script for the required board! Firmware will be linked with a default linker script!'
(but; is this just a generic warning - we specify linker script in command line arguments in platformio.ini?)
the flash code relies on the data begin in a special segment ('.myFlashSection') which must be 2048 aligned, (and beyond the end of code?).
It works like this:
An area the size of one erase block is created outside of the code area, filled with 0xff in the initial flash image. (is there some way this is made to be not present in the image?)
If the flash magic is not at the start, it's erased and initialised.
When reading, the flash read looks for the END of used data, and so reads the most recently written. Only if a new block will not fit is an erase operation done, and the data starts to be written from the start again.
Flash values are kept in RAM after read. When writing a flash variable, it is written to RAM.
only by using 'Fm1234\n' in ascii can the RAM be written to flash..
I'll try to load the old firmware and see if that worked..... If i get a chance.
from bipropellant-hoverboard-firmware.
I just did a few commits; nothing I think i changed should have changed anything, but flash IS working. So not quite understanding what was wrong; probably just me. Anyway, new commits add memory dump and flash dump to ascii
from bipropellant-hoverboard-firmware.
Related Issues (20)
- Can not connect to target HOT 7
- Low torque at slow speed
- Test UART Example
- Compile error HOT 2
- 2 hoverboards + arduino\raspberry pi
- HallTimeDiff for wheel 0 is sometimes wrong
- No motor movement HOT 3
- How to use nunchuck
- current sensing and measurement HOT 4
- ADC not working HOT 1
- Cannot run the ASCII Protocol HOT 1
- Working Processor swap to STM32 on YST-DXT-J20 V4 Motherboard : no motor control yet
- Support for custom Sideboard firmware?
- Running rough after pin soldering?! Help? HOT 1
- platformIO compile errors HOT 1
- ADC Control Mode with Joystick does not work in reverse
- One sensor board and one control UART
- Special Firmware request for kids
- Crash in protocol_process_ReadValue due to missing Initialisation of newMsg
- missing sscanf argument validation
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 bipropellant-hoverboard-firmware.