Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
552766c
chore: pin for 2.11
pfeerick Feb 7, 2025
376ccbf
chore: run `companion_translations`
pfeerick Feb 7, 2025
686cf1c
chore: codename
pfeerick Feb 10, 2025
7c1dc65
chore(ci): build for 2.11
pfeerick Feb 17, 2025
c860469
First building commit of Zorro Blue v2
ModalAIMax Mar 25, 2025
8996101
Removed SDRAM from h7 linker script
ModalAIMax Mar 25, 2025
4a2ce3e
Ported setup code from H7RS, now running
ModalAIMax Mar 25, 2025
c594b43
Added bootloader support
ModalAIMax Mar 25, 2025
beaa1de
Defined clock configuration, based on H7RS clock config
ModalAIMax Mar 26, 2025
75f6097
Added battery voltage monitoring over i2c
ModalAIMax Mar 27, 2025
e575f23
Fixed bootloader and USB
ModalAIMax Mar 28, 2025
724b58e
gitignore binaries
ModalAIMax Mar 28, 2025
143a87f
Fixed gitignore changes
ModalAIMax Mar 28, 2025
c1c36b5
Fixed bootloader initialization
ModalAIMax Mar 31, 2025
1a7736d
Fixed bootloader flashing and switched intmodule UART to UART8
ModalAIMax Mar 31, 2025
6871be6
Removed unnecessary warning
ModalAIMax Mar 31, 2025
fec826d
Cleaned up system init
ModalAIMax Mar 31, 2025
1a07f11
Switched connectors J7 and J8
ModalAIMax Apr 1, 2025
636a9cc
Added a fix for battery voltage min/max being incorrect
ModalAIMax Apr 2, 2025
a870bda
Updated to new Zorro pinout
ModalAIMax Apr 18, 2025
b15b305
zorro-blue enable usb passthrough to flash internal module
benjinne Jun 10, 2025
ad88b51
zorro-blue disable rtc module
benjinne Jun 10, 2025
fe3e618
zorro-blue add flag to allow removing bootloader
benjinne Jun 10, 2025
3110aec
modal_zorro add to switch_config
benjinne Jul 28, 2025
e258720
modalai h7 increase flash-size
benjinne Aug 8, 2025
015fc4c
modalai cmakelists cleanup
benjinne Aug 8, 2025
b02f215
zorro-blue bootloader fix attempt
benjinne Aug 11, 2025
4201b72
zorro-blue system_init don't include extram since this h7 board doesn…
benjinne Aug 12, 2025
0d87293
zorro-blue re-add bootloader to firmware
benjinne Aug 12, 2025
37e7932
zorro-blue revert bootloader debug
benjinne Aug 12, 2025
91ae6f4
zorro-blue revert unrelated changes back to main
benjinne Aug 12, 2025
e0d480d
zorro-blue fix bootloader not responding by removing empty per5ms in …
benjinne Aug 12, 2025
5741d48
zorro-blue cleanup
benjinne Aug 12, 2025
c70e80b
rever FPU_FLAGS order
benjinne Aug 22, 2025
3f6b66f
standardize system_clock.c not use clock hal library since it's run …
benjinne Aug 22, 2025
9869ef6
remove setting f_pfnVectors since it's not set upstream and SCB->VTOR…
benjinne Aug 22, 2025
a7dc659
h753 add disck_cache and _dram_addr to better match other h7 boards
benjinne Aug 22, 2025
b5d639b
h753 make bootloader run from ITCMRAM to improve avoid flash conflic…
benjinne Aug 22, 2025
1205ee1
h753 make firmware run from RAM_D1 (doesn't fit in ITCMRAM) to improv…
benjinne Aug 22, 2025
3c4e0d4
system_init add _dram_addr and mpu protection for dram
benjinne Aug 22, 2025
8e718a6
modalai cpp remove setting clock and begin with enable_irq
benjinne Aug 22, 2025
f86edfc
remove Jolly Mon codename since it's outdated
benjinne Aug 22, 2025
0e172ae
modalai remove setting GPIOH 2
benjinne Aug 22, 2025
cc6f564
hal_keys.py reset bracket to main
benjinne Aug 22, 2025
3278606
modalai target move to switch definitions instead of press
benjinne Aug 22, 2025
de3b944
move mixerTask back to menusTask and add WDG_RESET
benjinne Aug 22, 2025
0366cdb
modalai align bootloader with sector size to ensure bootloader firmw…
benjinne Aug 23, 2025
de79180
ModalAI reduce slow settings save time from 5s to 1s. fixed settings …
benjinne Aug 25, 2025
c0ee87c
modalai fix model joystick settings
benjinne Aug 25, 2025
d64a154
RADIO_MODAL disable MPU for dram region since it breaks advanced usb_…
benjinne Sep 2, 2025
8e7d402
undo abnormal_reboot section removal
benjinne Sep 2, 2025
d239e86
Move heap to RAM_D3 to fix joystick hid descriptor memcpy unaligned a…
benjinne Sep 16, 2025
a22cc66
modalai hide values/bars and logical switches
benjinne Oct 16, 2025
5f5ab68
modalai always boot to telemetry screen
benjinne Oct 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ compile_commands.json
/.idea
/.vs
CMakeUserPresets.json
.bin
.elf
**.bin
**.elf
11 changes: 8 additions & 3 deletions radio/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set_property(CACHE TRANSLATIONS PROPERTY STRINGS ${RADIO_LANGUAGES})
set(DEFAULT_MODE "" CACHE STRING "Default sticks mode")
set(POPUP_LEVEL 2 CACHE STRING "Popup level")

option(HELI "Heli menu" ON)
option(HELI "Heli menu" OFF)
option(FLIGHT_MODES "Flight Modes" ON)
option(CURVES "Curves" ON)
option(GVARS "Global variables" ON)
Expand All @@ -28,6 +28,9 @@ option(SEMIHOSTING "Enable debugger semihosting" OFF)
option(JITTER_MEASURE "Enable ADC jitter measurement" OFF)
option(WATCHDOG "Enable hardware Watchdog" ON)
option(ASTERISK "Enable asterisk icon (test only firmware)" OFF)
if(SDL2_FOUND)
option(SIMU_AUDIO "Enable simulator audio." ON)
endif()
option(LUA "Enable LUA support" ON)
option(SIMU_DISKIO "Enable disk IO simulation in simulator. Simulator will use FatFs module and simulated IO layer that uses \"./sdcard.image\" file as image of SD card. This file must contain whole SD card from first to last sector" OFF)
option(SIMU_LUA_COMPILER "Pre-compile and save Lua scripts in simulator." ON)
Expand All @@ -37,7 +40,7 @@ option(TEMPLATES "Model templates menu" OFF)
option(TRACE_SIMPGMSPACE "Turn on traces in simpgmspace.cpp" ON)
option(TRACE_LUA_INTERNALS "Turn on traces for Lua internals" OFF)
option(TRACE_AUDIO "Traces audio enabled" OFF)
option(DEBUG_SEGGER_RTT "Debug output to Segger RTT" OFF)
option(DEBUG_SEGGER_RTT "Debug output to Segger RTT" ON)
option(DEBUG_WINDOWS "Turn on windows traces" OFF)
option(DEBUG_YAML "Turn on YAML traces" OFF)
option(DEBUG_LABELS "Turn on Labels traces" OFF)
Expand Down Expand Up @@ -96,6 +99,8 @@ elseif(PCB STREQUAL STM32H7S78_DK)
include(targets/stm32h7s78-dk/CMakeLists.txt)
elseif(PCB STREQUAL X9E OR PCB STREQUAL X9D+ OR PCB STREQUAL X9D OR PCB STREQUAL X7 OR PCB STREQUAL X9LITE OR PCB STREQUAL X9LITES OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
include(targets/taranis/CMakeLists.txt)
elseif(PCB STREQUAL M207)
include(targets/modalai/CMakeLists.txt)
else()
message(FATAL_ERROR "Unknown PCB '${PCB}'")
endif()
Expand Down Expand Up @@ -548,7 +553,7 @@ find_program(BASH bash
set(OPT "s" CACHE STRING "Optimization mode (0/1/2/s)")

set(COMMON_FLAGS "-mcpu=${MCU} -mthumb -fomit-frame-pointer -fverbose-asm -Wa,-ahlms=firmware.lst")
set(COMMON_FLAGS "${COMMON_FLAGS} -gdwarf-2 -fno-exceptions -fdata-sections -ffunction-sections")
set(COMMON_FLAGS "${COMMON_FLAGS} -ggdb -fno-exceptions -fdata-sections -ffunction-sections")
set(COMMON_FLAGS "${COMMON_FLAGS} -DHSE_VALUE=${HSE_VALUE}")
set(COMMON_FLAGS "${COMMON_FLAGS} -O${OPT} ${FPU_FLAGS}")
set(COMMON_FLAGS "${COMMON_FLAGS} ${WARNING_FLAGS}")
Expand Down
Binary file modified radio/src/bitmaps/128x64/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Highest heap address */
HEAP_ADDRESS = ORIGIN(RAM_D3) + LENGTH(RAM_D3) - 16;

/* Highest address of the user mode stack */
STACK_ADDRESS = ORIGIN(DTCMRAM) + LENGTH(DTCMRAM) - 16; /* end of RAM */

/* Maximum bootloader code size */
BOOTLOADER_SIZE = 0x20000; /* Align to 128KB sector boundary on STM32H753 */

/* Required amount of stack for interrupt stack (Main stack) */
MAIN_STACK_SIZE = 8192;

/* Generate a link error if heap and stack don't fit into RAM */
MIN_HEAP_SIZE = 0; /* required amount of heap */

/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
}

REGION_ALIAS("REGION_TEXT_STORAGE", FLASH);
REGION_ALIAS("REGION_TEXT", ITCMRAM); /* Todo: setting this to ITCMRAM this should fix bootloader instruction cache?*/
REGION_ALIAS("REGION_ISR_VECT", DTCMRAM);
REGION_ALIAS("REGION_DATA", DTCMRAM);
REGION_ALIAS("REGION_BSS", RAM_D1);
REGION_ALIAS("REGION_RAM", RAM_D1);
51 changes: 51 additions & 0 deletions radio/src/boards/generic_stm32/linker/stm32h753/extra_sections.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

/* Task stacks */
.ccm (NOLOAD) :
{
. = ALIGN(4);
_sccm = .;
*(.ccm)
. = ALIGN(4);
_eccm = .;
} > DTCMRAM

/* Reserve stack space */
.stack (NOLOAD) :
{
. = ALIGN(4);
. = . + MAIN_STACK_SIZE;
. = ALIGN(4);
} > DTCMRAM

/* Fast code */
.iram :
{
. = ALIGN(4);
_siram = .;
*(.iram)
. = ALIGN(4);
_eiram = .;
} > ITCMRAM AT> REGION_TEXT_STORAGE

_stext_iram = LOADADDR(.iram);

/* Disk cache buffers */
.disk_cache (NOLOAD) :
{
. = ALIGN(4);
*(.disk_cache)
} > RAM_D1

/* Extra DMA section */
.dram (NOLOAD) :
{
. = ALIGN(4);
_s_dram = .;
*(.dram)
. = ALIGN(4);
_e_dram = .;
} > RAM_D2

_dram_addr = ADDR(.dram);

PROVIDE(_heap_start = ORIGIN(RAM_D3));
33 changes: 33 additions & 0 deletions radio/src/boards/generic_stm32/linker/stm32h753/layout.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* Highest heap address */
HEAP_ADDRESS = ORIGIN(RAM_D3) + LENGTH(RAM_D3) - 16;

/* Highest address of the user mode stack */
STACK_ADDRESS = ORIGIN(DTCMRAM) + LENGTH(DTCMRAM); /* end of RAM */

/* Maximum bootloader code size */
BOOTLOADER_SIZE = 0x20000; /* Align to 128KB sector boundary on STM32H753 */

/* Required amount of stack for interrupt stack (Main stack) */
MAIN_STACK_SIZE = 8192;

/* Generate a link error if heap and stack don't fit into RAM */
MIN_HEAP_SIZE = 0; /* required amount of heap */

/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
}

REGION_ALIAS("REGION_BOOTLOADER", FLASH);
REGION_ALIAS("REGION_TEXT_STORAGE", FLASH);
REGION_ALIAS("REGION_TEXT", RAM_D1);
REGION_ALIAS("REGION_ISR_VECT", DTCMRAM);
REGION_ALIAS("REGION_DATA", DTCMRAM);
REGION_ALIAS("REGION_BSS", RAM_D1);
REGION_ALIAS("REGION_RAM", RAM_D1);
2 changes: 2 additions & 0 deletions radio/src/buzzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ inline void beep(uint8_t) { }
#define AUDIO_TRIM_END(f)
#define AUDIO_PLAY(p)
#define IS_AUDIO_BUSY() false
#define AUDIO_KEY_PRESS()
#define AUDIO_KEY_ERROR()
#endif /* BUZZER */

#define AUDIO_RESET()
Expand Down
6 changes: 6 additions & 0 deletions radio/src/dataconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ enum MainViews {
VIEW_SWITCHES,
VIEW_COUNT
};
#elif defined(PCBMODALAI)
enum MainViews {
VIEW_INPUTS,
VIEW_CHAN_MONITOR,
VIEW_COUNT
};
#else
enum MainViews {
VIEW_OUTPUTS_VALUES,
Expand Down
9 changes: 9 additions & 0 deletions radio/src/datastructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ static inline void check_struct()
CHKSIZE(FrSkyLineData, 4);
CHKTYPE(TelemetryScreenData, 24);
CHKSIZE(ModelHeader, 12);
#elif defined(PCBM207)
CHKSIZE(LimitData, 11);
CHKSIZE(TimerData, 12);
CHKSIZE(FrSkyBarData, 6);
CHKSIZE(FrSkyLineData, 4);
CHKTYPE(TelemetryScreenData, 24);
CHKSIZE(ModelHeader, 12);
#elif defined(PCBTARANIS)
CHKSIZE(LimitData, 13);
CHKSIZE(TimerData, 17);
Expand Down Expand Up @@ -100,6 +107,8 @@ static inline void check_struct()

#if defined(RADIO_TPRO) || defined(RADIO_TPROV2) || defined(RADIO_BUMBLEBEE)
CHKSIZE(ModelData, 6355);
#elif defined(RADIO_MODAL)
CHKSIZE(ModelData, 6329);
#elif defined(RADIO_T14) || defined(RADIO_T12MAX)
CHKSIZE(ModelData, 6329);
#elif defined(RADIO_FAMILY_T20)
Expand Down
11 changes: 10 additions & 1 deletion radio/src/edgetx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void checkValidMCU(void)
#define TARGET_IDCODE 0x419
#elif defined(STM32F413xx)
#define TARGET_IDCODE 0x463
#elif defined(STM32H750xx) || defined(STM32H747xx)
#elif defined(STM32H750xx) || defined(STM32H747xx) || defined(STM32H753xx)
#define TARGET_IDCODE 0x450
#elif defined(STM32H7RS)
#define TARGET_IDCODE 0x485
Expand Down Expand Up @@ -386,6 +386,10 @@ void generalDefault()
setDefaultOwnerId();
#endif

#if defined(MANUFACTURER_MODALAI)
g_eeGeneral.disableRtcWarning = 1;
#endif

#if defined(RADIOMASTER_RTF_RELEASE)
// Those settings are for headless radio
g_eeGeneral.USBMode = USB_JOYSTICK_MODE;
Expand Down Expand Up @@ -1385,7 +1389,11 @@ void edgeTxInit()
ViewMain::instance();
#elif defined(GUI)
// TODO add a function for this (duplicated)
#if defined(PCBMODALAI) && defined(DEFAULT_VIEW_TELEMETRY)
menuHandlers[0] = menuViewTelemetry;
#else
menuHandlers[0] = menuMainView;
#endif
menuHandlers[1] = menuModelSelect;
#endif

Expand Down Expand Up @@ -1552,6 +1560,7 @@ void edgeTxInit()
#endif
#endif


#if defined(GUI)
if (calibration_needed) {
cancelSplash();
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/128x64/model_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ void onModelAntennaSwitchConfirm(const char * result)
#define TRAINER_BLUETOOTH_ROW (g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH ? TRAINER_BLUETOOTH_M_ROW : (g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH ? TRAINER_BLUETOOTH_S_ROW : HIDDEN_ROW))
#define TRAINER_PPM_PARAMS_ROW (g_model.trainerData.mode == TRAINER_MODE_SLAVE ? (uint8_t)2 : HIDDEN_ROW)
#define TRAINER_ROWS LABEL(Trainer), 0, IF_BT_TRAINER_ON(TRAINER_BLUETOOTH_ROW), TRAINER_CHANNELS_ROW, TRAINER_PPM_PARAMS_ROW
#elif defined(PCBX7) || defined(PCBX9LITE)
#elif defined(PCBX7) || defined(PCBX9LITE) || defined(PCBMODALAI)
#if defined(BLUETOOTH)
#define TRAINER_BLUETOOTH_ROW (g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH ? TRAINER_BLUETOOTH_M_ROW : (g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH ? TRAINER_BLUETOOTH_S_ROW : HIDDEN_ROW)),
#else
Expand Down
5 changes: 5 additions & 0 deletions radio/src/gui/128x64/view_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ void menuMainView(event_t event)
menuChannelsViewCommon(event);
break;

#ifndef PCBMODALAI
case VIEW_OUTPUTS_VALUES:
case VIEW_OUTPUTS_BARS:
// scroll bar
Expand Down Expand Up @@ -510,8 +511,12 @@ void menuMainView(event_t event)
case VIEW_TIMER2:
drawTimerWithMode(87, 5 * FH, 1, RIGHT | DBLSIZE);
break;
#endif

case VIEW_INPUTS:
#ifdef PCBMODALAI
view = VIEW_INPUTS; // hide logical switches
#endif
if (view == VIEW_INPUTS) {
// Sticks + Pots
doMainScreenGraphics();
Expand Down
47 changes: 47 additions & 0 deletions radio/src/hal/adc_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ const etx_hal_adc_inputs_t* _hal_adc_inputs = nullptr;

static uint16_t adcValues[MAX_ANALOG_INPUTS] __DMA_NO_CACHE;

#if defined(RADIO_MODAL)
#include "voxlpm_i2c_driver.h"
#elif defined(CSD203_SENSOR)
extern uint16_t getCSD203BatteryVoltage(void);
#endif

bool adcInit(const etx_hal_adc_driver_t* driver)
{
// Init buffer, provides non random values before mixer task starts
Expand Down Expand Up @@ -299,6 +305,47 @@ JitterMeter<uint16_t> avgJitter[MAX_ANALOG_INPUTS];
tmr10ms_t jitterResetTime = 0;
#endif

uint16_t getBatteryVoltage()
{
#if defined(RADIO_MODAL)
#if defined(POWER_I2C)
return voxl_pm_get_voltage();
#else
return 500;
#endif
#elif defined(CSD203_SENSOR) && !defined(SIMU)
return getCSD203BatteryVoltage() / 10;
#else
// using filtered ADC value on purpose
if (adcGetMaxInputs(ADC_INPUT_VBAT) < 1) return 0;
int32_t instant_vbat = anaIn(adcGetInputOffset(ADC_INPUT_VBAT));

// TODO: remove BATT_SCALE / BATTERY_DIVIDER defines
#if defined(VBAT_MOSFET_DROP)
// 1000 is used as multiplier for both numerator and denominator to allow to stay in integer domain
return (uint16_t)((instant_vbat * ADC_VREF_PREC2 * ((((1000 + g_eeGeneral.txVoltageCalibration)) * (VBAT_DIV_R2 + VBAT_DIV_R1)) / VBAT_DIV_R1)) / (2*RESX*1000)) + VBAT_MOSFET_DROP;
#elif defined(BATT_SCALE)
instant_vbat =
(instant_vbat * BATT_SCALE * (128 + g_eeGeneral.txVoltageCalibration)) /
BATTERY_DIVIDER;
// add voltage drop because of the diode TODO check if this is needed, but
// removal will break existing calibrations!
instant_vbat += VOLTAGE_DROP;
return (uint16_t)instant_vbat;
#elif defined(VOLTAGE_DROP)
instant_vbat = ((instant_vbat * (1000 + g_eeGeneral.txVoltageCalibration)) /
BATTERY_DIVIDER);
// add voltage drop because of the diode
// removal will break existing calibrations!
instant_vbat += VOLTAGE_DROP;
return (uint16_t)instant_vbat;
#else
return (uint16_t)((instant_vbat * (1000 + g_eeGeneral.txVoltageCalibration)) /
BATTERY_DIVIDER);
#endif
#endif
}

static uint32_t apply_low_pass_filter(uint32_t v, uint32_t v_prev,
bool is_main_input)
{
Expand Down
2 changes: 1 addition & 1 deletion radio/src/storage/storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "edgetx_types.h"

#if defined(SIMU)
#if defined(SIMU) || defined(PCBMODALAI)
#define WRITE_DELAY_10MS 100
#elif defined(RTC_BACKUP_RAM)
#define WRITE_DELAY_10MS 1500 /* 15s */
Expand Down
2 changes: 2 additions & 0 deletions radio/src/storage/yaml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ elseif((PCB STREQUAL X9D) OR (PCB STREQUAL X9D+))
else()
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_x9d.cpp)
endif()
elseif(PCB STREQUAL M207)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_128x64.cpp)
else()
message(FATAL_ERROR "PCB '${PCB}' is not supported by YAML storage")
endif()
Expand Down
2 changes: 2 additions & 0 deletions radio/src/storage/yaml/yaml_datastructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#else
#include "yaml_datastructs_x10.cpp"
#endif
#elif defined(PCBM207)
#include "yaml_datastructs_128x64.cpp"
#elif defined(PCBTX15)
#include "yaml_datastructs_tx15.cpp"
#elif defined(PCBPL18)
Expand Down
3 changes: 3 additions & 0 deletions radio/src/targets/common/arm/stm32/flash_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ uint32_t isFirmwareStart(const uint8_t * buffer)
if ((block[0] & 0xFFFF0000) != 0x20020000) {
return 0;
}
// The following is board specific code! (so is the above line but our layout conforms with that)
#ifndef PCBMODALAI
// First ISR pointer in FLASH
if ((block[1] & 0xF0000000) != 0x90000000) {
return 0;
Expand All @@ -257,6 +259,7 @@ uint32_t isFirmwareStart(const uint8_t * buffer)
if ((block[2] & 0xF0000000) != 0xC0000000) {
return 0;
}
#endif
#else
// Stack pointer in RAM
if ((block[0] & 0xFFFC0000) != 0x20000000) {
Expand Down
Loading