Skip to content

Commit

Permalink
Adjust xmake.lua to produce elf-in-uf2
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 authored and HU90m committed Jul 3, 2024
1 parent a796594 commit d3cd8a2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ option("board")

function convert_to_uf2(target)
local firmware = target:targetfile()
local binary_file = firmware .. ".bin"
os.execv("llvm-objcopy", {"-Obinary", firmware, binary_file })
-- 0x00101000 is the sonata software entry address
os.execv("uf2conv", { binary_file, "-b0x00101000", "-co", firmware .. ".uf2" })
os.execv("llvm-strip", { firmware, "-o", firmware .. ".strip" })
os.execv("uf2conv", { firmware .. ".strip", "-f0x6CE29E60", "-co", firmware .. ".uf2" })
end

includes("all")
Expand Down

0 comments on commit d3cd8a2

Please sign in to comment.