Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Bootloader Upgrade #138

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

eiln
Copy link

@eiln eiln commented Oct 19, 2024

  • reliably works now
  • discontiguous address segments support
  • reduced flash time from 7.34s -> 1.33s
  • slight BL build improvements

Instead of having to dig around cmake cache

Signed-off-by: Eileen Yoon <eyn@gmx.com>
Now that we have a --bootloader flag in per_build.py

Signed-off-by: Eileen Yoon <eyn@gmx.com>
Signed-off-by: Eileen Yoon <eyn@gmx.com>
Depends on discontiguous segments support

Signed-off-by: Eileen Yoon <eyn@gmx.com>
Signed-off-by: Eileen Yoon <eyn@gmx.com>
Count the number of words written instead of incrementing the
current address directly. Needed for discontiguous segments support

Signed-off-by: Eileen Yoon <eyn@gmx.com>
Instead of padding firmware with zeros / sending zeros from daqapp,
properly handle jumps in address segments. Use local segments_written
counter and add command to reset relative segment base address

API changes:
BLCMD_START: firmware size != flash region to delete if discontiguous.
Send end_addr - start_addr as num words to erase from 0x8002000
BLCMD_SET_SIZE: set unpadded size (sum of segments) i.e. num words to
transfer separately
BLCMD_SET_ADDR: set relative base address of current segment

TODO Breaks daqapp but not the standalone bl.py impl
TODO checksum/handshake for addr changes

Signed-off-by: Eileen Yoon <eyn@gmx.com>
Don't send the command from daqapp side instead of commenting
it out here

Signed-off-by: Eileen Yoon <eyn@gmx.com>
daqapp side polls for the WAIT message. If the flag is not true
at boot we have to wait a whole systick cycle for the flag to be set
true.

Signed-off-by: Eileen Yoon <eyn@gmx.com>
So we don't have to wait a whole systick cycle waiting for WAIT command

Signed-off-by: Eileen Yoon <eyn@gmx.com>
Should be &= ~mask not &= !mask

CAN_RF0R_FOVR0 > 0 and anything & !1 is always 0 so currently it zeros out the
entire register instead of clearing the single RFOR bit

TODO there's an identical chunk of daq code

Signed-off-by: Eileen Yoon <eyn@gmx.com>
No use, clogs bus

Signed-off-by: Eileen Yoon <eyn@gmx.com>
@eiln eiln changed the title Bootloader Upgrade [DRAFT] Bootloader Upgrade Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant