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

[WIP] Add basic FOTA capable bootloader #27

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 251 additions & 1 deletion Cargo.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/jonlamb-gh/oxcc"

[dependencies.oxcc-bootloader]
path = "oxcc-bootloader/"
version = "0.1.0"

[dependencies.panic-abort]
version = "0.3.1"
optional = true
Expand Down
8 changes: 6 additions & 2 deletions memory.x
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ MEMORY
/* NOTE K = KiBi = 1024 bytes */

/* STM32F767ZI 2 MByte FLASH, 512 KByte RAM */
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
/* FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K */

/* Using OxCC bootloader, user firmware starts at 0x0802_0000 */
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = (2048K - 128K)
/* First 8 bytes are reserved for the bootloader sticky flag word */
RAM (xrw) : ORIGIN = 0x20000008, LENGTH = (512K - 8)
}

/* This is where the call stack will be allocated. */
Expand Down
21 changes: 21 additions & 0 deletions oxcc-bootloader/.gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
target remote :3333

# print demangled symbols by default
set print asm-demangle on

monitor arm semihosting enable

# # send captured ITM to the file itm.fifo
# # (the microcontroller SWO pin must be connected to the programmer SWO pin)
# # 8000000 must match the core clock frequency
# monitor tpiu config internal itm.fifo uart off 8000000

# # OR: make the microcontroller SWO pin output compatible with UART (8N1)
# # 2000000 is the frequency of the SWO pin
# monitor tpiu config external uart off 8000000 2000000

# # enable ITM port 0
# monitor itm port 0 on

load
step
3 changes: 3 additions & 0 deletions oxcc-bootloader/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target
**/*.rs.bk
.idea
Loading