B. Edits from Stanford Doggo repository - iangohy/SUTDoggo GitHub Wiki

B.1 ODrive firmware

cp tup.config.default tup.config
  • Edit the value of CONFIG_BOARD_VERSION according to the ODrive you are using:

    ODrive model Value Remarks
    3.1 v3.1 Untested
    3.2 v3.2 Untested
    3.3 v3.3 Untested
    3.4 24v v3.4-24V Untested
    3.4 48v v3.4-48V Untested
    3.5 24v v3.5-24V
    3.5 48v v3.5-48V
    3.6 24v v3.6-24V Requires change to Tupfile.lua
    3.6 24v v3.6-56V Requires change to Tupfile.lua / Untested
  • Note: for ODrive 3.6 and later: An addition to Tupfile.lua is required (based on the main branch of the ODrive repo).

    elseif boardversion == "v3.5-48V" then
        boarddir = 'Board/v3'
        FLAGS += "-DHW_VERSION_MAJOR=3 -DHW_VERSION_MINOR=5"
        FLAGS += "-DHW_VERSION_VOLTAGE=48"
    ### ADDITIONAL PART STARTS HERE
    elseif boardversion == "v3.6-24V" then
        boarddir = 'Board/v3'
        FLAGS += "-DHW_VERSION_MAJOR=3 -DHW_VERSION_MINOR=6"
        FLAGS += "-DHW_VERSION_VOLTAGE=24"
    elseif boardversion == "v3.6-56V" then
        boarddir = 'Board/v3'
        FLAGS += "-DHW_VERSION_MAJOR=3 -DHW_VERSION_MINOR=6"
        FLAGS += "-DHW_VERSION_VOLTAGE=56"
    ### ADDITIONAL PART ENDS HERE
    elseif boardversion == "" then

B.2 Doggo firmware code

In Doggo's src folder, change the original #include library lines of datalog.cpp and imu.cpp from arduino.h to Arduino.h and of debug.h from ChRT.h to ChRt.h.