Skip to content

Commit

Permalink
flash_range_program Addr is a flash block index, not a memory address.
Browse files Browse the repository at this point in the history
…Fixes #52
  • Loading branch information
JeremyGrosser committed Dec 17, 2023
1 parent 86b3aa9 commit 7e8683c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/drivers/rp-flash.adb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ package body RP.Flash is

RP.ROM.flash_exit_xip;

RP.ROM.flash_range_program (Addr => To_Address (Offset),
RP.ROM.flash_range_program (Addr => Interfaces.Unsigned_32 (Offset),
Data => Source,
Count => Interfaces.C.size_t (Length));
RP.ROM.flash_flush_cache;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/rp-rom.ads
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ is
Address => ROM_Func_Lookup (ROM_Table_Code ('R', 'E'));

procedure flash_range_program
(Addr : System.Address;
(Addr : Unsigned_32;
Data : System.Address;
Count : Interfaces.C.size_t)
with Import,
Expand Down

0 comments on commit 7e8683c

Please sign in to comment.