Update farmbot-arduino-firmware submodule to be built in
farmbot_firmware apppull/974/head
parent
58e382268a
commit
0a9c664d17
|
@ -48,7 +48,6 @@ upload.sh
|
||||||
*.img
|
*.img
|
||||||
artifacts
|
artifacts
|
||||||
RELEASE_NOTES
|
RELEASE_NOTES
|
||||||
*.hex
|
|
||||||
# lagger can't be disabled.
|
# lagger can't be disabled.
|
||||||
/log
|
/log
|
||||||
.make_state
|
.make_state
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
[submodule "farmbot_firmware/c_src/farmbot-arduino-firmware"]
|
||||||
|
path = farmbot_firmware/c_src/farmbot-arduino-firmware
|
||||||
|
url = git@github.com:Farmbot/farmbot-arduino-firmware.git
|
||||||
|
ignore = dirty
|
|
@ -4,7 +4,6 @@ defmodule FarmbotCore.Project do
|
||||||
@version Mix.Project.config[:version] || Mix.raise("Missing Project key version")
|
@version Mix.Project.config[:version] || Mix.raise("Missing Project key version")
|
||||||
@commit Mix.Project.config[:commit] || Mix.raise("Missing Project key commit")
|
@commit Mix.Project.config[:commit] || Mix.raise("Missing Project key commit")
|
||||||
@branch Mix.Project.config[:branch] || Mix.raise("Missing Project key branch")
|
@branch Mix.Project.config[:branch] || Mix.raise("Missing Project key branch")
|
||||||
@arduino_commit Mix.Project.config[:arduino_commit] || Mix.raise("Missing Project key arduino_commit")
|
|
||||||
|
|
||||||
@target Mix.target()
|
@target Mix.target()
|
||||||
@env Mix.env()
|
@env Mix.env()
|
||||||
|
@ -24,9 +23,7 @@ defmodule FarmbotCore.Project do
|
||||||
@compile {:inline, branch: 0}
|
@compile {:inline, branch: 0}
|
||||||
def branch, do: @branch
|
def branch, do: @branch
|
||||||
|
|
||||||
@doc "*#{@arduino_commit}*"
|
def arduino_commit, do: FarmbotFirmware.Project.arduino_commit()
|
||||||
@compile {:inline, arduino_commit: 0}
|
|
||||||
def arduino_commit, do: @arduino_commit
|
|
||||||
|
|
||||||
@doc "*#{@target}*"
|
@doc "*#{@target}*"
|
||||||
@compile {:inline, target: 0}
|
@compile {:inline, target: 0}
|
||||||
|
|
|
@ -9,14 +9,6 @@ defmodule FarmbotCore.MixProject do
|
||||||
System.cmd("git", ~w"rev-parse --verify HEAD") |> elem(0) |> String.trim()
|
System.cmd("git", ~w"rev-parse --verify HEAD") |> elem(0) |> String.trim()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp arduino_commit do
|
|
||||||
opts = [cd: Path.join("c_src", "farmbot-arduino-firmware")]
|
|
||||||
|
|
||||||
System.cmd("git", ~w"rev-parse --verify HEAD", opts)
|
|
||||||
|> elem(0)
|
|
||||||
|> String.trim()
|
|
||||||
end
|
|
||||||
|
|
||||||
def project do
|
def project do
|
||||||
[
|
[
|
||||||
app: :farmbot_core,
|
app: :farmbot_core,
|
||||||
|
@ -30,7 +22,6 @@ defmodule FarmbotCore.MixProject do
|
||||||
target: @target,
|
target: @target,
|
||||||
branch: @branch,
|
branch: @branch,
|
||||||
commit: commit(),
|
commit: commit(),
|
||||||
arduino_commit: arduino_commit(),
|
|
||||||
build_embedded: false,
|
build_embedded: false,
|
||||||
start_permanent: Mix.env() == :prod,
|
start_permanent: Mix.env() == :prod,
|
||||||
aliases: aliases(),
|
aliases: aliases(),
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,27 @@
|
||||||
|
PREFIX=$(PWD)/priv
|
||||||
|
BUILD=$(PWD)/_build
|
||||||
|
ARDUINO_SRC_DIR=$(PWD)/c_src/farmbot-arduino-firmware
|
||||||
|
|
||||||
|
.PHONY: all clean fbos_arduino_firmware
|
||||||
|
|
||||||
|
all: fbos_arduino_firmware
|
||||||
|
|
||||||
|
fbos_arduino_firmware:
|
||||||
|
cd $(ARDUINO_SRC_DIR) && \
|
||||||
|
make all \
|
||||||
|
BUILD_DIR=$(BUILD) \
|
||||||
|
FBARDUINO_FIRMWARE_SRC_DIR=$(ARDUINO_SRC_DIR)/src \
|
||||||
|
BIN_DIR=$(PREFIX)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
cd $(ARDUINO_SRC_DIR) && \
|
||||||
|
make clean \
|
||||||
|
BUILD_DIR=$(BUILD) \
|
||||||
|
FBARDUINO_FIRMWARE_SRC_DIR=$(ARDUINO_SRC_DIR)/src \
|
||||||
|
BIN_DIR=$(PREFIX)
|
||||||
|
|
||||||
|
$(PREFIX):
|
||||||
|
mkdir -p $(PREFIX)
|
||||||
|
|
||||||
|
$(BUILD):
|
||||||
|
mkdir -p $(BUILD)
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 2c30fb1df3ffcc9b213487f2ccaab35b5ba2578c
|
|
@ -0,0 +1,8 @@
|
||||||
|
defmodule FarmbotFirmware.Project do
|
||||||
|
@arduino_commit Mix.Project.config()[:arduino_commit] ||
|
||||||
|
Mix.raise("Missing Project key arduino_commit")
|
||||||
|
|
||||||
|
@doc "*#{@arduino_commit}*"
|
||||||
|
@compile {:inline, arduino_commit: 0}
|
||||||
|
def arduino_commit, do: @arduino_commit
|
||||||
|
end
|
|
@ -191,7 +191,7 @@ defmodule FarmbotFirmware.StubTransport do
|
||||||
{:reply, :ok, state, {:continue, resp_codes}}
|
{:reply, :ok, state, {:continue, resp_codes}}
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_call({tag, {:software_version_read, _}} = code, _from, state) do
|
def handle_call({_tag, {:software_version_read, _}}, _from, state) do
|
||||||
resp_codes = [
|
resp_codes = [
|
||||||
GCODE.new(:report_software_version, ["8.0.0.S"])
|
GCODE.new(:report_software_version, ["8.0.0.S"])
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,11 +3,20 @@ defmodule FarmbotFirmware.MixProject do
|
||||||
@version Path.join([__DIR__, "..", "VERSION"]) |> File.read!() |> String.trim()
|
@version Path.join([__DIR__, "..", "VERSION"]) |> File.read!() |> String.trim()
|
||||||
@elixir_version Path.join([__DIR__, "..", "ELIXIR_VERSION"]) |> File.read!() |> String.trim()
|
@elixir_version Path.join([__DIR__, "..", "ELIXIR_VERSION"]) |> File.read!() |> String.trim()
|
||||||
|
|
||||||
|
defp arduino_commit do
|
||||||
|
opts = [cd: Path.join("c_src", "farmbot-arduino-firmware")]
|
||||||
|
|
||||||
|
System.cmd("git", ~w"rev-parse --verify HEAD", opts)
|
||||||
|
|> elem(0)
|
||||||
|
|> String.trim()
|
||||||
|
end
|
||||||
|
|
||||||
def project do
|
def project do
|
||||||
[
|
[
|
||||||
app: :farmbot_firmware,
|
app: :farmbot_firmware,
|
||||||
version: @version,
|
version: @version,
|
||||||
elixir: @elixir_version,
|
elixir: @elixir_version,
|
||||||
|
arduino_commit: arduino_commit(),
|
||||||
start_permanent: Mix.env() == :prod,
|
start_permanent: Mix.env() == :prod,
|
||||||
test_coverage: [tool: ExCoveralls],
|
test_coverage: [tool: ExCoveralls],
|
||||||
preferred_cli_env: [
|
preferred_cli_env: [
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"dialyxir": {:hex, :dialyxir, "1.0.0-rc.4", "71b42f5ee1b7628f3e3a6565f4617dfb02d127a0499ab3e72750455e986df001", [:mix], [{:erlex, "~> 0.1", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm"},
|
"dialyxir": {:hex, :dialyxir, "1.0.0-rc.4", "71b42f5ee1b7628f3e3a6565f4617dfb02d127a0499ab3e72750455e986df001", [:mix], [{:erlex, "~> 0.1", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm"},
|
||||||
"earmark": {:hex, :earmark, "1.2.6", "b6da42b3831458d3ecc57314dff3051b080b9b2be88c2e5aa41cd642a5b044ed", [:mix], [], "hexpm"},
|
"earmark": {:hex, :earmark, "1.2.6", "b6da42b3831458d3ecc57314dff3051b080b9b2be88c2e5aa41cd642a5b044ed", [:mix], [], "hexpm"},
|
||||||
"ecto": {:hex, :ecto, "2.2.9", "031d55df9bb430cb118e6f3026a87408d9ce9638737bda3871e5d727a3594aae", [:mix], [{:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: true]}, {:decimal, "~> 1.2", [hex: :decimal, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.8.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
|
"ecto": {:hex, :ecto, "2.2.9", "031d55df9bb430cb118e6f3026a87408d9ce9638737bda3871e5d727a3594aae", [:mix], [{:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: true]}, {:decimal, "~> 1.2", [hex: :decimal, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.8.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
|
||||||
"elixir_make": {:hex, :elixir_make, "0.4.2", "332c649d08c18bc1ecc73b1befc68c647136de4f340b548844efc796405743bf", [:mix], [], "hexpm"},
|
"elixir_make": {:hex, :elixir_make, "0.5.2", "96a28c79f5b8d34879cd95ebc04d2a0d678cfbbd3e74c43cb63a76adf0ee8054", [:mix], [], "hexpm"},
|
||||||
"erlex": {:hex, :erlex, "0.1.6", "c01c889363168d3fdd23f4211647d8a34c0f9a21ec726762312e08e083f3d47e", [:mix], [], "hexpm"},
|
"erlex": {:hex, :erlex, "0.1.6", "c01c889363168d3fdd23f4211647d8a34c0f9a21ec726762312e08e083f3d47e", [:mix], [], "hexpm"},
|
||||||
"esqlite": {:hex, :esqlite, "0.2.4", "3a8a352c190afe2d6b828b252a6fbff65b5cc1124647f38b15bdab3bf6fd4b3e", [:rebar3], [], "hexpm"},
|
"esqlite": {:hex, :esqlite, "0.2.4", "3a8a352c190afe2d6b828b252a6fbff65b5cc1124647f38b15bdab3bf6fd4b3e", [:rebar3], [], "hexpm"},
|
||||||
"ex_doc": {:hex, :ex_doc, "0.19.1", "519bb9c19526ca51d326c060cb1778d4a9056b190086a8c6c115828eaccea6cf", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.7", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
|
"ex_doc": {:hex, :ex_doc, "0.19.1", "519bb9c19526ca51d326c060cb1778d4a9056b190086a8c6c115828eaccea6cf", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.7", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -37,15 +37,15 @@ defmodule FarmbotOS.SysCalls.FlashFirmware do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp find_hex_file("arduino") do
|
defp find_hex_file("arduino") do
|
||||||
Application.app_dir(:farmbot_core, ["priv", "arduino_firmware.hex"]) |> assert_exists()
|
Application.app_dir(:farmbot_firmware, ["priv", "arduino_firmware.hex"]) |> assert_exists()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp find_hex_file("farmduino") do
|
defp find_hex_file("farmduino") do
|
||||||
Application.app_dir(:farmbot_core, ["priv", "farmduino.hex"]) |> assert_exists()
|
Application.app_dir(:farmbot_firmware, ["priv", "farmduino.hex"]) |> assert_exists()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp find_hex_file("farmduino_k14") do
|
defp find_hex_file("farmduino_k14") do
|
||||||
Application.app_dir(:farmbot_core, ["priv", "farmduino_k14.hex"]) |> assert_exists()
|
Application.app_dir(:farmbot_firmware, ["priv", "farmduino_k14.hex"]) |> assert_exists()
|
||||||
end
|
end
|
||||||
|
|
||||||
defp find_hex_file(hardware) when is_binary(hardware),
|
defp find_hex_file(hardware) when is_binary(hardware),
|
||||||
|
|
Loading…
Reference in New Issue