Skip to content

Commit

Permalink
Update mp1-boot (blue light to show freeze mode)
Browse files Browse the repository at this point in the history
Cmake: build bootloader with new conf

Update mp1-boot conf (Freeze pin moved to debug header)
  • Loading branch information
danngreen committed Nov 20, 2024
1 parent 81d96b5 commit 6e57df2
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
4 changes: 2 additions & 2 deletions firmware/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@ endif()

add_custom_target(
bootloader
COMMAND make --no-print-directory BOARD_CONF=../board_conf/mmp11_conf.hh ${BOOTLOADER_TOOLCHAIN_OPT}
COMMAND make --no-print-directory BOARD_CONF=../board_conf/mmp11_with_expanders_conf.hh ${BOOTLOADER_TOOLCHAIN_OPT}
COMMENT "Building MP1-Boot (FSBL)"
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bootloader/mp1-boot
VERBATIM
)

add_custom_target(
bootloader-dfu
COMMAND make --no-print-directory BOARD_CONF=board_conf/mmp11_conf.hh ${BOOTLOADER_TOOLCHAIN_OPT}
COMMAND make --no-print-directory BOARD_CONF=board_conf/mmp11_with_expanders_conf.hh ${BOOTLOADER_TOOLCHAIN_OPT}
COMMENT "Building DFU Bootloader"
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bootloader/mp1-usb-dfu
VERBATIM
Expand Down
46 changes: 46 additions & 0 deletions firmware/bootloader/board_conf/mmp11_with_expanders_conf.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#pragma once
#include "drivers/clocks.hh"
#include "drivers/i2c_conf.hh"
#include "drivers/leds.hh"

namespace Board
{

using RedLED = Led<GPIO::E, PinNum::_14, LedActive::Low>; // button LED red
using GreenLED = Led<GPIO::B, PinNum::_15, LedActive::Low>; // button LED green
using RedLED2 = RedLED;
using GreenLED2 = GreenLED;

using OrangeLED = RedLED2;
using BlueLED = Led<GPIO::A, PinNum::_9, LedActive::Low>; // button LED blue

// Boot Select pin: press Rotary encoder to select DFU USB
constexpr bool UseBootSelect = true;
constexpr PinConf BootSelectPin{GPIO::E, PinNum::_15};

// Freeze mode: jumper on debug header (left-most column)
constexpr bool UseFreezePin = true;
constexpr PinConf FreezePin{GPIO::D, PinNum::_3}; //DEBUG1 of debug header

constexpr uint32_t ConsoleUART = UART7_BASE;
constexpr PinConf UartRX{GPIO::B, PinNum::_3, PinAF::AF_13};
constexpr PinConf UartTX{GPIO::B, PinNum::_4, PinAF::AF_13};

namespace NORFlash
{
constexpr bool HasNORFlash = true;
constexpr PinConf d2{GPIO::F, PinNum::_7, PinAF::AF_9};
constexpr PinConf d3{GPIO::A, PinNum::_1, PinAF::AF_9};
} // namespace NORFlash

namespace PMIC
{
constexpr bool HasSTPMIC = false;
constexpr I2C_Config I2C_config{};
} // namespace PMIC

constexpr uint32_t HSE_Clock_Hz = 24000000;
constexpr uint32_t MPU_MHz = 800;
constexpr auto ClockType = SystemClocks::HSEClockSource::Resonator;

} // namespace Board
2 changes: 1 addition & 1 deletion firmware/bootloader/mp1-boot
Submodule mp1-boot updated 1 files
+7 −3 src/main.cc

0 comments on commit 6e57df2

Please sign in to comment.