Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… K8800-2.0.x

* '2.0.x' of https://github.com/MarlinFirmware/Marlin:
  Add NUCLEO-F767ZI dev board (MarlinFirmware#19373)
  If needed, home before G34 (MarlinFirmware#19713)
  TFT followup fixes (MarlinFirmware#19710)
  Watchdog Refresh for LVGL Asset Load (MarlinFirmware#19724)
  Fix mega2560ext environment (MarlinFirmware#19730)
  [cron] Bump distribution date (2020-10-15)
  [cron] Bump distribution date (2020-10-14)
  Fix SET_SOFT_ENDSTOP_LOOSE w/out soft endstops (MarlinFirmware#19734)
  • Loading branch information
Susis Strolch committed Oct 15, 2020
2 parents 1550bed + 222b7a7 commit 5b4e7aa
Show file tree
Hide file tree
Showing 13 changed files with 251 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
#define START_FLASH_ADDR 0x08000000
#define END_FLASH_ADDR 0x08100000

#elif MB(REMRAM_V1)
#elif MB(REMRAM_V1, NUCLEO_F767ZI)

// For STM32F765VI in RemRam v1
// SRAM (0x20000000 - 0x20080000) (512kb)
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
#define BOARD_REMRAM_V1 5001 // RemRam v1
#define BOARD_TEENSY41 5002 // Teensy 4.1
#define BOARD_T41U5XBB 5003 // T41U5XBB Teensy 4.1 breakout board
#define BOARD_NUCLEO_F767ZI 5004 // ST NUCLEO-F767ZI Dev Board

//
// Espressif ESP32 WiFi
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/gcode/calibrate/G34.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@

void GcodeSuite::G34() {

if (homing_needed()) return;
// Home before the alignment procedure
if (!all_axes_known()) home_all_axes();

SET_SOFT_ENDSTOP_LOOSE(true);
TEMPORARY_BED_LEVELING_STATE(false);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2020-10-13"
#define STRING_DISTRIBUTION_DATE "2020-10-15"
#endif

/**
Expand Down
17 changes: 15 additions & 2 deletions Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,24 @@ void spiFlashErase_PIC() {
W25QXX.init(SPI_QUARTER_SPEED);
//erase 0x001000 -64K
for (pic_sectorcnt = 0; pic_sectorcnt < (64 - 4) / 4; pic_sectorcnt++) {
watchdog_refresh();
W25QXX.SPI_FLASH_SectorErase(PICINFOADDR + pic_sectorcnt * 4 * 1024);
}
//erase 64K -- 6M
for (pic_sectorcnt = 0; pic_sectorcnt < (PIC_SIZE_xM * 1024 / 64 - 1); pic_sectorcnt++)
for (pic_sectorcnt = 0; pic_sectorcnt < (PIC_SIZE_xM * 1024 / 64 - 1); pic_sectorcnt++) {
watchdog_refresh();
W25QXX.SPI_FLASH_BlockErase((pic_sectorcnt + 1) * 64 * 1024);
}
}

#if HAS_SPI_FLASH_FONT
void spiFlashErase_FONT() {
volatile uint32_t Font_sectorcnt = 0;
W25QXX.init(SPI_QUARTER_SPEED);
for (Font_sectorcnt = 0; Font_sectorcnt < 32-1; Font_sectorcnt++)
for (Font_sectorcnt = 0; Font_sectorcnt < 32-1; Font_sectorcnt++) {
watchdog_refresh();
W25QXX.SPI_FLASH_BlockErase(FONTINFOADDR + Font_sectorcnt * 64 * 1024);
}
}
#endif

Expand Down Expand Up @@ -410,6 +415,7 @@ uint8_t public_buf[512];
return;
}

watchdog_refresh();
disp_assets_update_progress(fn);

W25QXX.init(SPI_QUARTER_SPEED);
Expand All @@ -422,18 +428,21 @@ uint8_t public_buf[512];
totalSizeLoaded += pfileSize;
if (assetType == ASSET_TYPE_LOGO) {
do {
watchdog_refresh();
pbr = file.read(public_buf, BMP_WRITE_BUF_LEN);
Pic_Logo_Write((uint8_t *)fn, public_buf, pbr);
} while (pbr >= BMP_WRITE_BUF_LEN);
}
else if (assetType == ASSET_TYPE_TITLE_LOGO) {
do {
watchdog_refresh();
pbr = file.read(public_buf, BMP_WRITE_BUF_LEN);
Pic_TitleLogo_Write((uint8_t *)fn, public_buf, pbr);
} while (pbr >= BMP_WRITE_BUF_LEN);
}
else if (assetType == ASSET_TYPE_G_PREVIEW) {
do {
watchdog_refresh();
pbr = file.read(public_buf, BMP_WRITE_BUF_LEN);
default_view_Write(public_buf, pbr);
} while (pbr >= BMP_WRITE_BUF_LEN);
Expand All @@ -443,6 +452,7 @@ uint8_t public_buf[512];
SPIFlash.beginWrite(Pic_Write_Addr);
#if HAS_SPI_FLASH_COMPRESSION
do {
watchdog_refresh();
pbr = file.read(public_buf, SPI_FLASH_PageSize);
TERN_(MARLIN_DEV_MODE, totalSizes += pbr);
SPIFlash.writeData(public_buf, SPI_FLASH_PageSize);
Expand All @@ -463,6 +473,7 @@ uint8_t public_buf[512];
else if (assetType == ASSET_TYPE_FONT) {
Pic_Write_Addr = UNIGBK_FLASH_ADDR;
do {
watchdog_refresh();
pbr = file.read(public_buf, BMP_WRITE_BUF_LEN);
W25QXX.SPI_FLASH_BufferWrite(public_buf, Pic_Write_Addr, pbr);
Pic_Write_Addr += pbr;
Expand All @@ -482,9 +493,11 @@ uint8_t public_buf[512];

disp_assets_update();
disp_assets_update_progress("Erasing pics...");
watchdog_refresh();
spiFlashErase_PIC();
#if HAS_SPI_FLASH_FONT
disp_assets_update_progress("Erasing fonts...");
watchdog_refresh();
spiFlashErase_FONT();
#endif

Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ void tft_lvgl_init() {

//spi_flash_read_test();
#if ENABLED(SDSUPPORT)
watchdog_refresh();
UpdateAssets();
#endif

watchdog_refresh();
mks_test_get();

touch.Init();
Expand Down Expand Up @@ -474,7 +477,8 @@ void lv_encoder_pin_init() {
#endif


static uint8_t buttons = newbutton;
static uint8_t buttons = 0;
buttons = newbutton;
static uint8_t lastEncoderBits;

#define encrot0 0
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/lcd/tft/touch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,6 @@ bool Touch::get_point(int16_t *x, int16_t *y) {
if (is_touched && calibration.orientation != TOUCH_ORIENTATION_NONE) {
*x = int16_t((int32_t(*x) * calibration.x) >> 16) + calibration.offset_x;
*y = int16_t((int32_t(*y) * calibration.y) >> 16) + calibration.offset_y;
#if (TFT_ROTATION & TFT_ROTATE_180)
*x = TFT_WIDTH - *x;
*y = TFT_HEIGHT - *y;
#endif
}
return is_touched;
}
Expand Down
8 changes: 5 additions & 3 deletions Marlin/src/lcd/tft_io/ili9328.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@
#define ILI9328_GATE_SCANCTL1_DATA 0x2700
#endif

// #define ILI9328_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9328_ETMOD_AM) | \
// IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9328_ETMOD_ID1) | \
// IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ILI9328_ETMOD_ID0)
/*
#define ILI9328_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9328_ETMOD_AM) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9328_ETMOD_ID1) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ILI9328_ETMOD_ID0)
*/

#define ILI9328_ETMOD_ORIENTATION (ILI9328_ETMOD_AM | ILI9328_ETMOD_ID1 | ILI9328_ETMOD_ID0)

Expand Down
8 changes: 5 additions & 3 deletions Marlin/src/lcd/tft_io/r65105.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@
#define R61505_DRVCTRL_DATA 0x2700
#endif

// #define R61505_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, R61505_ETMOD_AM) | \
// IF_0((TFT_ORIENTATION) & TFT_INVERT_X, R61505_ETMOD_ID0) | \
// IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, R61505_ETMOD_ID1)
/*
#define R61505_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, R61505_ETMOD_AM) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, R61505_ETMOD_ID0) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, R61505_ETMOD_ID1)
*/

#define R61505_ETMOD_ORIENTATION (R61505_ETMOD_AM | R61505_ETMOD_ID0 | R61505_ETMOD_ID1)

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ inline float home_bump_mm(const AxisEnum axis) {
extern soft_endstops_t soft_endstop;
#define apply_motion_limits(V) NOOP
#define update_software_endstops(...) NOOP
#define SET_SOFT_ENDSTOP_LOOSE() NOOP
#define SET_SOFT_ENDSTOP_LOOSE(V) NOOP

#endif // !HAS_SOFTWARE_ENDSTOPS

Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@
#include "stm32f7/pins_THE_BORG.h" // STM32F7 env:STM32F7
#elif MB(REMRAM_V1)
#include "stm32f7/pins_REMRAM_V1.h" // STM32F7 env:STM32F7
#elif MB(NUCLEO_F767ZI)
#include "stm32f7/pins_NUCLEO_F767ZI.h" // STM32F7 env:NUCLEO_F767ZI
#elif MB(TEENSY41)
#include "teensy4/pins_TEENSY41.h" // Teensy-4.x env:teensy41
#elif MB(T41U5XBB)
Expand Down
Loading

0 comments on commit 5b4e7aa

Please sign in to comment.