Comments (4)
Are you seeing expected behavior?
Toboot entry is forced after updating: https://github.com/im-tomu/tomu-bootloader/blob/master/booster/main.c#L74
The boot_count
value out o be 0, which is why the BOOT_FAILED_TOO_MANY_TIMES
code is surprising. What is the order of operations that you're doing?
from toboot.
Sorry, I wasn't clear. I meant the situation when reflashing the bootloader itself using an external programmer.
What I'm doing is that I have both the bootloader and an application already in flash, and then I use OpenOCD and J-Link to flash a new version of the bootloader through the SWD pins, without touching the application. After I reset run
in OpenOCD, I expect the bootloader to run and boot the application.
However, the process of reflashing the bootloader through SWD seems to scramble some of the RAM, at least the boot token. I expect the RAM is used as a buffer during flashing, or something. So what happens is that the bootloader looks at the reset cause, and sees that it is not PORST
, and therefore expects the boot token to be valid, even though it contains some random fluff after the flashing. (I don't have the exact memory values available right now.)
Everything works fine after power-toggling the device, so it's just an inconvenience for toboot developers.
from toboot.
Since it's generally a 32-bit machine, what if we only consider the boot_count
to be valid if board_model
is correctly set? Most processes (such as OpenOCD) will overwrite entire words, so those would invalidate the boot_count
value as well.
from toboot.
I feel using an eight-bit number for this purpose is a bit hazardous. And I doubt anything would scramble the second word in RAM while leaving the first one (magic number) intact. So I still think just having a special value in the magic
field should be enough.
from toboot.
Related Issues (20)
- Come up with a way to update the bootloader HOT 1
- Toboot must clear entire application area HOT 10
- API docs improvements HOT 4
- Clarify license HOT 1
- TOMU detects as "ComNav GNSS receiver" on Windows 10 HOT 2
- Remove the old Silicon Labs bootloader HOT 4
- Update the openocd / blackmagic flashing documentation to refer to toboot HOT 1
- The dfu bootloader flash pattern looks identical to blinky HOT 5
- tomu_flash.conf should wipe the device HOT 1
- Figure out how to use openocd without needing to overwrite the system file HOT 2
- toboot always runs on power cycle HOT 4
- Autorun flag behaviour is opposed to documented one HOT 4
- LUFA ? HOT 1
- Signed tags
- Clarify API license HOT 5
- Packet-sized control transfers broken
- Clarify documentation points.
- Please make a new release :)
- toboot reflash is a bit vague
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 toboot.