diff --git a/radio/src/CMakeLists.txt b/radio/src/CMakeLists.txt index a7cbe9122..e4fd3b316 100644 --- a/radio/src/CMakeLists.txt +++ b/radio/src/CMakeLists.txt @@ -743,10 +743,10 @@ if(ARCH STREQUAL ARM) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_ASM_COMPILE_OBJECT " -o ") - set(COMMON_FLAGS "-mcpu=${MCU} -mthumb -fomit-frame-pointer -fverbose-asm -Wa,-ahlms=opentx.lst -O${OPT} -gdwarf-2 -DHSE_VALUE=${HSE_VALUE} -fno-exceptions -fdata-sections -ffunction-sections ${WARNING_FLAGS}") + set(COMMON_FLAGS "-mcpu=${MCU} -mthumb -fomit-frame-pointer -fverbose-asm -Wa,-ahlms=firmware.lst -O${OPT} -gdwarf-2 -DHSE_VALUE=${HSE_VALUE} -fno-exceptions -fdata-sections -ffunction-sections ${WARNING_FLAGS}") set(CMAKE_C_FLAGS "${COMMON_FLAGS} -Wimplicit") set(CMAKE_CXX_FLAGS "${COMMON_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "-mcpu=${MCU} -mthumb -nostartfiles -lm -T${RADIO_SRC_DIRECTORY}/${LINKER_SCRIPT} -Wl,-Map=opentx.map,--cref,--no-warn-mismatch,--gc-sections") + set(CMAKE_EXE_LINKER_FLAGS "-mcpu=${MCU} -mthumb -nostartfiles -lm -T${RADIO_SRC_DIRECTORY}/${LINKER_SCRIPT} -Wl,-Map=firmware.map,--cref,--no-warn-mismatch,--gc-sections") if(PCB STREQUAL TARANIS) add_subdirectory(targets/${TARGET_DIR}/bootloader) @@ -808,6 +808,7 @@ endif() add_custom_target(firmware.lss COMMAND avr-objdump -h -S firmware.elf > firmware.lss DEPENDS firmware.elf + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) if(CPU_FAMILY STREQUAL STM32) diff --git a/radio/src/bitmaps/horus/shutdown.png b/radio/src/bitmaps/horus/shutdown.png index 8f3307020..609936958 100644 Binary files a/radio/src/bitmaps/horus/shutdown.png and b/radio/src/bitmaps/horus/shutdown.png differ diff --git a/radio/src/gui/horus/bitmaps.cpp b/radio/src/gui/horus/bitmaps.cpp index 86f511979..7e71b8768 100644 --- a/radio/src/gui/horus/bitmaps.cpp +++ b/radio/src/gui/horus/bitmaps.cpp @@ -200,31 +200,31 @@ const uint8_t * const LBM_MODEL_ICONS[] = { * Model selection screen bitmaps */ -const uint8_t LBM_LIBRARY_ICON[] = { +const uint8_t LBM_LIBRARY_ICON[] __attribute__((aligned(32))) = { #include "mask_library.lbm" }; -const uint8_t LBM_LIBRARY_SLOT[] = { +const uint8_t LBM_LIBRARY_SLOT[] __attribute__((aligned(32))) = { #include "mask_library_slot.lbm" }; -const uint8_t LBM_LIBRARY_CURSOR[] = { +const uint8_t LBM_LIBRARY_CURSOR[] __attribute__((aligned(32))) = { #include "mask_library_category_index.lbm" }; -const uint8_t LBM_SCORE0[] = { +const uint8_t LBM_SCORE0[] __attribute__((aligned(32))) = { #include "mask_library_score_0.lbm" }; -const uint8_t LBM_SCORE1[] = { +const uint8_t LBM_SCORE1[] __attribute__((aligned(32))) = { #include "mask_library_score_1.lbm" }; -const uint8_t LBM_STAR0[] = { +const uint8_t LBM_STAR0[] __attribute__((aligned(32))) = { #include "mask_library_star_0.lbm" }; -const uint8_t LBM_STAR1[] = { +const uint8_t LBM_STAR1[] __attribute__((aligned(32))) = { #include "mask_library_star_1.lbm" }; @@ -232,30 +232,30 @@ const uint8_t LBM_STAR1[] = { * Other */ -const uint8_t LBM_ASTERISK[] = { +const uint8_t LBM_ASTERISK[] __attribute__((aligned(32))) = { #include "asterisk.lbm" }; -const uint8_t LBM_POINT[] = { +const uint8_t LBM_POINT[] __attribute__((aligned(32))) = { #include "mask_point.lbm" }; -const uint8_t LBM_CURVE_POINT[] = { +const uint8_t LBM_CURVE_POINT[] __attribute__((aligned(32))) = { #include "mask_cvpoint.lbm" }; -const uint8_t LBM_CURVE_POINT_CENTER[] = { +const uint8_t LBM_CURVE_POINT_CENTER[] __attribute__((aligned(32))) = { #include "mask_cvpoint_center.lbm" }; -const uint8_t LBM_CURVE_COORD_SHADOW[] = { +const uint8_t LBM_CURVE_COORD_SHADOW[] __attribute__((aligned(32))) = { #include "mask_coord_shadow.lbm" }; -/* -const uint8_t LBM_SHUTDOWN[] = { + +const uint8_t LBM_SHUTDOWN[] __attribute__((aligned(32))) = { #include "shutdown.lbm" }; -const uint8_t LBM_SLEEP[] = { +const uint8_t LBM_SLEEP[] __attribute__((aligned(32))) = { #include "sleep.lbm" -}; */ \ No newline at end of file +}; \ No newline at end of file diff --git a/radio/src/gui/horus/gui.h b/radio/src/gui/horus/gui.h index 355263f69..45dbbbbdb 100644 --- a/radio/src/gui/horus/gui.h +++ b/radio/src/gui/horus/gui.h @@ -119,6 +119,7 @@ extern const uint8_t LBM_STAR0[]; extern const uint8_t LBM_STAR1[]; // Other icons +extern const uint8_t LBM_SPLASH[]; extern const uint8_t LBM_ASTERISK[]; extern const uint8_t LBM_POINT[]; extern const uint8_t LBM_CURVE_POINT[]; diff --git a/radio/src/gui/horus/lcd.cpp b/radio/src/gui/horus/lcd.cpp index d82f15b7c..2f979094a 100644 --- a/radio/src/gui/horus/lcd.cpp +++ b/radio/src/gui/horus/lcd.cpp @@ -870,17 +870,17 @@ inline void lcdDrawBitmapDMA(coord_t x, coord_t y, coord_t width, coord_t height #endif #if !defined(BOOT) -void lcdDrawBitmap(coord_t x, coord_t y, const uint8_t * bmp, coord_t offset, coord_t width, int scale) +void lcdDrawBitmap(coord_t x, coord_t y, const uint8_t * bmp, coord_t offset, coord_t height, int scale) { - int w = getBitmapWidth(bmp); - int height = getBitmapHeight(bmp); + int width = getBitmapWidth(bmp); + int h = getBitmapHeight(bmp); - if (!width || width > w) { - width = w; + if (!height || height > h) { + height = h; } - if (x+width > LCD_W) { - width = LCD_W-x; + if (x+height > LCD_W) { + height = LCD_W-x; } if (width == 0 || height == 0) { @@ -888,12 +888,12 @@ void lcdDrawBitmap(coord_t x, coord_t y, const uint8_t * bmp, coord_t offset, co } if (scale == 0) { - lcdDrawBitmapDMA(x, y, width, height, bmp+4); + lcdDrawBitmapDMA(x, y, width, height, bmp + 4 + offset*width*2); } else if (scale < 0) { for (coord_t i=0, row=0; row