Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions cmake/rp2350.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ set(RP2350_DEFINITIONS
PICO_CONFIG_HEADER=pico_sdk_config.h
PICO_NO_FPGA_CHECK=1
PICO_FLASH_SIZE_BYTES=4194304
MCU_FLASH_SIZE=4096
MCU_RAM_SIZE=520
# Tell pico_stdio_usb that TinyUSB device mode is already linked by the application.
# Without this, stdio_usb_init() would call tusb_init() a second time AND set up its
Expand Down
1 change: 1 addition & 0 deletions cmake/sitl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ endif()

set(SITL_DEFINITIONS
SITL_BUILD
MCU_FLASH_SIZE=2048
)

function (target_sitl name)
Expand Down
2 changes: 0 additions & 2 deletions src/main/target/RP2350_PICO/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@
#undef RP2350_FAST_CODE
#define RP2350_FAST_CODE FAST_CODE

#define TARGET_FLASH_SIZE 4096

#define LED_STRIP_TIMER 1
#define SOFTSERIAL_1_TIMER 2
#define SOFTSERIAL_2_TIMER 3
Expand Down
2 changes: 0 additions & 2 deletions src/main/target/SITL/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@
#undef USE_SPI

// Some dummys
#define MCU_FLASH_SIZE 2048

#define LED_STRIP_TIMER 1
#define SOFTSERIAL_1_TIMER 2
#define SOFTSERIAL_2_TIMER 3
Expand Down
5 changes: 5 additions & 0 deletions src/main/target/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

#pragma once

// The preprocessor reads an undefined MCU_FLASH_SIZE as 0, which would quietly build a target as a 512 KB board
#ifndef MCU_FLASH_SIZE
#error "MCU_FLASH_SIZE (KiB) must be defined by the MCU's cmake file"
#endif

#if defined(STM32F7) || defined(STM32H7)
#define USE_ITCM_RAM
#endif
Expand Down
5 changes: 5 additions & 0 deletions src/main/target/common_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
extern uint8_t __config_start;
extern uint8_t __config_end;

// HoTT text mode is part of HoTT telemetry
#if !defined(USE_TELEMETRY_HOTT)
# undef USE_HOTT_TEXTMODE
#endif

// Backward compatibility for I2C OLED display
#if !defined(USE_I2C)
# undef USE_DASHBOARD
Expand Down
1 change: 1 addition & 0 deletions src/test/unit/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ extern SysTick_Type *SysTick;
#define WS2811_DMA_TC_FLAG 1
#define WS2811_DMA_HANDLER_IDENTIFER 0

#define MCU_FLASH_SIZE 512
#include "target/common.h"
#include "target.h"

Expand Down
Loading